Files
XauBot/backtests/ml_v3/training_log_v3_fixed.txt
T

148 lines
29 KiB
Plaintext
Raw Normal View History

2026-02-09 16:45:50.084 | INFO  | src.mt5_connector:connect:177 - Connected to MT5: FinexBisnisSolusi-Demo (Account: 61045904)
2026-02-09 16:45:50.796 | DEBUG  | src.mt5_connector:get_market_data:449 - Fetched 50000 bars for XAUUSD M15
2026-02-09 16:45:51.000 | DEBUG  | src.mt5_connector:get_market_data:449 - Fetched 2000 bars for XAUUSD H1
2026-02-09 16:45:51.006 | DEBUG  | src.feature_eng:calculate_rsi:130 - RSI calculated (period=14)
2026-02-09 16:45:51.009 | DEBUG  | src.feature_eng:calculate_atr:185 - ATR calculated (period=14)
2026-02-09 16:45:51.012 | DEBUG  | src.feature_eng:calculate_macd:243 - MACD calculated (12/26/9)
2026-02-09 16:45:51.015 | DEBUG  | src.feature_eng:calculate_bollinger_bands:301 - Bollinger Bands calculated (period=20, std=2.0)
2026-02-09 16:45:51.017 | DEBUG  | src.feature_eng:calculate_ema_crossover:357 - EMA crossover calculated (9/21)
2026-02-09 16:45:51.019 | DEBUG  | src.feature_eng:calculate_volume_features:403 - Volume features calculated (period=20)
2026-02-09 16:45:51.028 | DEBUG  | src.feature_eng:calculate_ml_features:518 - ML features calculated
2026-02-09 16:45:51.032 | DEBUG  | src.smc_polars:calculate_swing_points:401 - Swing points: 3062 highs, 3079 lows
2026-02-09 16:45:51.035 | DEBUG  | src.smc_polars:calculate_fvg:312 - FVG calculation complete. Bullish: 5696, Bearish: 4721
2026-02-09 16:45:51.057 | DEBUG  | src.smc_polars:calculate_order_blocks:511 - Order Blocks: 2201 bullish, 2164 bearish
2026-02-09 16:45:51.171 | DEBUG  | src.smc_polars:calculate_bos_choch:599 - BOS: 702 bullish, 458 bearish
2026-02-09 16:45:51.171 | DEBUG  | src.smc_polars:calculate_bos_choch:600 - CHoCH: 616 bullish, 617 bearish
2026-02-09 16:45:51.375 | INFO  | backtests.ml_v2.ml_v2_feature_eng:add_all_v2_features:615 - Adding all V2 features (23 new features)...
2026-02-09 16:45:51.378 | DEBUG  | backtests.ml_v2.ml_v2_feature_eng:add_h1_features:233 - H1 features added (8 features)
2026-02-09 16:45:51.385 | DEBUG  | backtests.ml_v2.ml_v2_feature_eng:add_continuous_smc_features:410 - Continuous SMC features added (7 features)
2026-02-09 16:45:51.390 | DEBUG  | backtests.ml_v2.ml_v2_feature_eng:add_regime_features:497 - Regime features added (4 features)
2026-02-09 16:45:51.396 | DEBUG  | backtests.ml_v2.ml_v2_feature_eng:add_price_action_features:593 - Price action features added (4 features)
2026-02-09 16:45:51.397 | INFO  | backtests.ml_v2.ml_v2_feature_eng:add_all_v2_features:643 - All V2 features added (23 total)
[I 2026-02-09 16:45:51,589] A new study created in memory with name: xgboost_opt
================================================================================
ML MODEL V3 TRAINING PIPELINE
Bismillah - Building Exceptional Model
================================================================================
Fetching 50,000 bars of M15 data...
Symbol: XAUUSD
Timeframe: M15
Fetched 50,000 bars
Date range: 2023-12-27 09:45:00 to 2026-02-09 11:45:00
Fetching 2,000 bars of H1 data...
Fetched 2,000 H1 bars
Engineering features...
M15 technical indicators...
SMC structure features...
MLV2 features (H1 + derived)...
Total features: 85 (MLV2 compatible)
Columns with nulls: 38
rsi, atr, atr_percent, bb_middle, bb_upper, bb_lower, bb_width, bb_percent_b, volume_sma, volume_ratio
Filling nulls with forward fill...
Labeling data with Triple Barrier Method (BINARY)...
Starting Triple Barrier Labeling (BINARY: BUY vs SELL)...
Profit target: 0.5 ATR
Stop loss: 0.5 ATR
Max holding: 20 bars
Target Distribution (BINARY):
BUY: 27557 (55.14%)
SELL: 22423 (44.86%)
Unlabeled: 20 (last 20 bars)
Quality Metrics:
Profit barriers hit: 0 ( 0.00%)
Avg bars to profit: 0.0
Avg return (ATR): 0.000
Splitting train/test (stratified, BINARY)...
Train: 39,985 samples
Test: 9,995 samples
Train distribution: BUY=55.1%, SELL=44.9%
Test distribution: BUY=55.1%, SELL=44.9%
Balancing TRAINING set only (BINARY)...
Balancing Classes (BINARY)...
Target distribution: BUY=50%, SELL=50%
Before: BUY=22046, SELL=17939
After: BUY=17939, SELL=17939
Total samples: 35878
Selected 81 features
Sample features: spread, rsi, atr, atr_percent, macd, macd_signal, macd_histogram, bb_middle, bb_upper, bb_lower...
Training XGBoost model (BINARY: BUY vs SELL)...
Training classes: [0 1] (expected: [0, 1])
Class weights: SELL=1.00, BUY=1.00
Class distribution: SELL=17939 (50.0%), BUY=17939 (50.0%)
Running Optuna hyperparameter optimization...
0%| | 0/30 [00:00<?, ?it/s]
0%| | 0/30 [00:06<?, ?it/s]
Best trial: 0. Best value: 0.537269: 0%| | 0/30 [00:06<?, ?it/s]
Best trial: 0. Best value: 0.537269: 3%|3 | 1/30 [00:06<02:59, 6.17s/it]
Best trial: 0. Best value: 0.537269: 3%|3 | 1/30 [00:14<02:59, 6.17s/it]
Best trial: 0. Best value: 0.537269: 3%|3 | 1/30 [00:14<02:59, 6.17s/it]
Best trial: 0. Best value: 0.537269: 7%|6 | 2/30 [00:14<03:33, 7.62s/it]
Best trial: 0. Best value: 0.537269: 7%|6 | 2/30 [00:24<03:33, 7.62s/it]
Best trial: 2. Best value: 0.550875: 7%|6 | 2/30 [00:24<03:33, 7.62s/it]
Best trial: 2. Best value: 0.550875: 10%|# | 3/30 [00:24<03:45, 8.37s/it]
Best trial: 2. Best value: 0.550875: 10%|# | 3/30 [00:29<03:45, 8.37s/it]
Best trial: 2. Best value: 0.550875: 10%|# | 3/30 [00:29<03:45, 8.37s/it]
Best trial: 2. Best value: 0.550875: 13%|#3 | 4/30 [00:29<03:11, 7.37s/it]
Best trial: 2. Best value: 0.550875: 13%|#3 | 4/30 [00:38<03:11, 7.37s/it]
Best trial: 2. Best value: 0.550875: 13%|#3 | 4/30 [00:38<03:11, 7.37s/it]
Best trial: 2. Best value: 0.550875: 17%|#6 | 5/30 [00:38<03:18, 7.93s/it]
Best trial: 2. Best value: 0.550875: 17%|#6 | 5/30 [00:44<03:18, 7.93s/it]
Best trial: 2. Best value: 0.550875: 17%|#6 | 5/30 [00:44<03:18, 7.93s/it]
Best trial: 2. Best value: 0.550875: 20%|## | 6/30 [00:44<02:52, 7.20s/it]
Best trial: 2. Best value: 0.550875: 20%|## | 6/30 [00:53<02:52, 7.20s/it]
Best trial: 2. Best value: 0.550875: 20%|## | 6/30 [00:53<02:52, 7.20s/it]
Best trial: 2. Best value: 0.550875: 23%|##3 | 7/30 [00:53<02:58, 7.75s/it]
Best trial: 2. Best value: 0.550875: 23%|##3 | 7/30 [00:57<02:58, 7.75s/it]
Best trial: 7. Best value: 0.552976: 23%|##3 | 7/30 [00:57<02:58, 7.75s/it]
Best trial: 7. Best value: 0.552976: 27%|##6 | 8/30 [00:57<02:22, 6.46s/it]
Best trial: 7. Best value: 0.552976: 27%|##6 | 8/30 [01:02<02:22, 6.46s/it]
Best trial: 7. Best value: 0.552976: 27%|##6 | 8/30 [01:02<02:22, 6.46s/it]
Best trial: 7. Best value: 0.552976: 30%|### | 9/30 [01:02<02:08, 6.11s/it]
Best trial: 7. Best value: 0.552976: 30%|### | 9/30 [01:06<02:08, 6.11s/it]
Best trial: 7. Best value: 0.552976: 30%|### | 9/30 [01:06<02:08, 6.11s/it]
Best trial: 7. Best value: 0.552976: 33%|###3 | 10/30 [01:06<01:49, 5.48s/it]
Best trial: 7. Best value: 0.552976: 33%|###3 | 10/30 [01:08<01:49, 5.48s/it]
Best trial: 10. Best value: 0.554777: 33%|###3 | 10/30 [01:08<01:49, 5.48s/it]
Best trial: 10. Best value: 0.554777: 37%|###6 | 11/30 [01:08<01:24, 4.43s/it]
Best trial: 10. Best value: 0.554777: 37%|###6 | 11/30 [01:10<01:24, 4.43s/it]
Best trial: 10. Best value: 0.554777: 37%|###6 | 11/30 [01:10<01:24, 4.43s/it]
Best trial: 10. Best value: 0.554777: 40%|#### | 12/30 [01:10<01:06, 3.72s/it]