Files
XauBot/backtests/v0.6.0_fixed/full_backtest_90d.log
T
GifariKemal 0f9548e5fb 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

7.2 KiB

2026-02-11 08:54:47.924 | INFO | __main__:main:34 - ================================================================================
2026-02-11 08:54:47.924 | INFO | __main__:main:35 - XAUBOT AI v0.6.0 FIXED - BACKTEST RUNNER
2026-02-11 08:54:47.924 | INFO | __main__:main:36 - ================================================================================
2026-02-11 08:54:47.924 | INFO | __main__:main:37 -
2026-02-11 08:54:47.924 | INFO | __main__:main:38 - PROFESSOR'S FIXES APPLIED:
2026-02-11 08:54:47.924 | INFO | __main__:main:39 - [FIX 1] Fuzzy Thresholds: 70-90% tiered (was fixed 90%)
2026-02-11 08:54:47.924 | INFO | __main__:main:40 - [FIX 2] Trajectory Calibration: regime penalty + uncertainty
2026-02-11 08:54:47.924 | INFO | __main__:main:41 - [FIX 3] Session Filter: Sydney/Tokyo DISABLED (00:00-10:00)
2026-02-11 08:54:47.924 | INFO | __main__:main:42 - [FIX 4] Unicode Fix: ASCII only (no emojis)
2026-02-11 08:54:47.924 | INFO | __main__:main:43 - [FIX 5] Max Loss: $25/trade (was $50)
2026-02-11 08:54:47.924 | INFO | __main__:main:44 -
2026-02-11 08:54:47.924 | INFO | __main__:main:45 - Backtest Period: 90 days
2026-02-11 08:54:47.924 | INFO | __main__:main:46 - ================================================================================
2026-02-11 08:54:47.924 | INFO | __main__:main:47 -
2026-02-11 08:54:47.924 | INFO | __main__:main:61 - Step 1/4: Connecting to MT5...
2026-02-11 08:54:50.432 | INFO | src.mt5_connector:connect:177 - Connected to MT5: FinexBisnisSolusi-Demo (Account: 61045904)
2026-02-11 08:54:50.933 | INFO | __main__:main:77 - Step 2/4: Loading XAUUSD M15 data (last 90 days, ~8640 bars)...
2026-02-11 08:54:51.138 | INFO | __main__:main:84 - Loaded 8640 bars
2026-02-11 08:54:51.139 | INFO | __main__:main:85 - Date range: 2025-09-29 16:30:00 to 2026-02-11 03:45:00
2026-02-11 08:54:51.139 | INFO | __main__:main:88 - Step 3/4: Engineering features...
2026-02-11 08:54:51.159 | INFO | __main__:main:91 - Added 56 features
2026-02-11 08:54:51.159 | INFO | __main__:main:94 - Step 4/4: Running backtest with FIXED logic...
2026-02-11 08:54:51.159 | INFO | __main__:main:95 -
2026-02-11 08:54:51.160 | WARNING | src.regime_detector:load:642 - Model file not found: models\hmm_regime.pkl
2026-02-11 08:54:51.160 | WARNING | src.ml_model:load:404 - Model file not found: models\xgboost_model.pkl
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:483 - [BACKTEST FIXED v0.6.0]
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:484 - Date range: 2025-09-30 18:30:00 to 2026-02-10 01:45:00
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:485 - Total bars: 8440
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:486 - FIXES APPLIED:
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:487 - [FIX 1] Fuzzy thresholds: micro=70%, small=75%, medium=85%, large=90%
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:488 - [FIX 2] Trajectory calibration: regime penalty + uncertainty
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:489 - [FIX 3] Session filter: Sydney/Tokyo DISABLED
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:490 - [FIX 4] Unicode: ASCII only
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:491 - [FIX 5] Max loss: $25.0 (was $50)
2026-02-11 08:54:51.163 | INFO | backtest_v0_6_0_fixed:run:492 -
2026-02-11 08:54:51.483 | INFO | __main__:main:188 -
Results saved to: backtests/v0.6.0_fixed/results_20260211_085451.csv
2026-02-11 08:54:51.484 | INFO | src.mt5_connector:disconnect:203 - Disconnected from MT5
2026-02-11 08:54:51.484 | INFO | __main__:main:191 -
Backtest completed!
 
================================================================================
BACKTEST RESULTS - XAUBot AI v0.6.0 FIXED
================================================================================
 
PERFORMANCE METRICS:
Total Trades: 0
Wins: 0
Losses: 0
Win Rate: 0.0%
 
PROFIT ANALYSIS:
Avg Win: $0.00
Avg Loss: $0.00
Win/Loss Ratio: N/A
Micro Profits (<$1): 0/0 (0%)
 
RISK METRICS:
Sharpe Ratio: 0.00
Profit Factor: 0.00
Expectancy: $0.00/trade
Max Drawdown: 0.0% ($0.00)
 
NET RESULTS:
Total Profit: $0.00
Total Loss: -$0.00
Net P/L: $0.00
 
--------------------------------------------------------------------------------
PROFESSOR'S TARGET COMPARISON:
--------------------------------------------------------------------------------
Metric | Target | Actual | Status
--------------------------------------------------------------------------------
Avg Win | $8-12 | $0.00 | [X]
RR Ratio | 1.5:1 or better | N/A | [X]
Micro Profits | <20% | 0% | [OK]
Win Rate | 62-65% | 0.0% | [X]
Sharpe Ratio | 1.5+ | 0.00 | [X]
================================================================================
 
EXIT REASON BREAKDOWN: