Files
xau-ai-trading-bot/backtests/ml_v3/xgboost_model_v3_metadata.json
T
buckybonez c0976c4518 feat: implement Professor AI recommendations v0.2.2 (5 critical fixes)
Exit Strategy v6.6 "Professor AI Validated" - All recommendations implemented

FIX #1: Remove Misleading Debug Code
- Removed manual trajectory calculation (line 1262-1269)
- Trajectory predictor was CORRECT, debug comparison was WRONG
- Cleaned up false "bug found" warnings

FIX #2: Peak Detection Logic (CHECK 0A.4)
- Detects approaching peak (vel > 0, accel < 0)
- Holds position if peak within 30s and 15%+ profit ahead
- Suppresses fuzzy exits during peak approach
- Target: Peak capture 38% -> 70%+
- Added peak_hold_active field to PositionGuard

FIX #3: London False Breakout Filter
- London session + ATR ratio < 1.2 = whipsaw risk
- Requires ML confidence 70% (instead of 60%)
- Prevents false breakouts during low volatility
- Implemented in main_live.py before signal logic

FIX #4: Enhanced Kelly Partial Exit Strategy
- Active for all profits >= tp_min * 0.5 (not just >$8)
- Recommends partial exits for better peak capture
- Full exit when Kelly suggests >70% close
- Note: Actual partial close needs MT5 volume parameter (TODO)

FIX #5: Unicode Encoding Fixes
- Added UTF-8 encoding to file logger
- Replaced all emoji (⚠️ -> [WARNING]) and arrows (-> -> ->)
- No more UnicodeEncodeError on Windows console
- Fixed in 11 src/*.py files

Expected Performance:
- Peak Capture: 38% -> 70%+ (+84%)
- Avg Profit: $2.00 -> $4.50 (+125%)
- Risk/Reward: 0.49 -> 1.2+ (+145%)
- Win Rate: Maintain 76%

Files Modified:
- src/smart_risk_manager.py (peak detection, Kelly, unicode)
- src/trajectory_predictor.py (unicode arrows)
- main_live.py (London filter, UTF-8 encoding)
- src/*.py (unicode cleanup: 11 files)
- VERSION (0.2.1 -> 0.2.2)
- CHANGELOG.md (comprehensive v0.2.2 docs)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 18:16:34 +07:00

106 lines
2.1 KiB
JSON

{
"train_accuracy": 0.5739171637215006,
"test_accuracy": 0.5630815407703852,
"train_samples": 35878,
"test_samples": 9995,
"n_features": 81,
"feature_cols": [
"spread",
"rsi",
"atr",
"atr_percent",
"macd",
"macd_signal",
"macd_histogram",
"bb_middle",
"bb_upper",
"bb_lower",
"bb_width",
"bb_percent_b",
"ema_9",
"ema_21",
"ema_cross_bull",
"ema_cross_bear",
"volume_sma",
"volume_ratio",
"volume_increasing",
"high_volume",
"returns_1",
"returns_5",
"returns_20",
"log_returns",
"price_position",
"dist_from_sma_20",
"volatility_20",
"normalized_range",
"avg_normalized_range",
"close_lag_1",
"close_lag_2",
"close_lag_3",
"close_lag_5",
"higher_high",
"lower_low",
"hh_count_5",
"ll_count_5",
"hour",
"weekday",
"london_session",
"ny_session",
"swing_high",
"swing_low",
"swing_high_level",
"swing_low_level",
"last_swing_high",
"last_swing_low",
"is_fvg_bull",
"is_fvg_bear",
"fvg_top",
"fvg_bottom",
"fvg_mid",
"fvg_signal",
"ob",
"ob_top",
"ob_bottom",
"ob_mitigated",
"bos",
"choch",
"market_structure",
"h1_ema20",
"h1_market_structure",
"h1_ema20_distance",
"h1_trend_strength",
"h1_swing_proximity",
"h1_fvg_active",
"h1_ob_proximity",
"h1_atr_ratio",
"h1_rsi",
"fvg_gap_size_atr",
"ob_width_atr",
"ob_distance_atr",
"confluence_score",
"swing_distance_atr",
"regime_duration_bars",
"regime_transition_prob",
"volatility_zscore",
"crisis_proximity",
"wick_ratio",
"body_ratio",
"gap_from_prev_close"
],
"hyperparameters": {
"max_depth": 3,
"learning_rate": 0.02372312562116949,
"n_estimators": 100,
"min_child_weight": 1,
"gamma": 0.10654204697811255,
"subsample": 0.9364174432522089,
"colsample_bytree": 0.7031796673225155,
"reg_alpha": 0.7974351847252932,
"reg_lambda": 1.9804942417034694
},
"class_distribution_train": {
"SELL": 17939,
"BUY": 17939
},
"model_type": "binary_classification"
}