Files
XauBot/backtests/ml_v3/training_log_v3_binary_final.txt
T

153 lines
30 KiB
Plaintext
Raw Normal View History

2026-02-09 16:27:47.265 | INFO  | src.mt5_connector:connect:177 - Connected to MT5: FinexBisnisSolusi-Demo (Account: 61045904)
2026-02-09 16:27:47.976 | DEBUG  | src.mt5_connector:get_market_data:449 - Fetched 50000 bars for XAUUSD M15
2026-02-09 16:27:48.180 | DEBUG  | src.mt5_connector:get_market_data:449 - Fetched 2000 bars for XAUUSD H1
2026-02-09 16:27:48.188 | DEBUG  | src.feature_eng:calculate_rsi:130 - RSI calculated (period=14)
2026-02-09 16:27:48.195 | DEBUG  | src.feature_eng:calculate_atr:185 - ATR calculated (period=14)
2026-02-09 16:27:48.197 | DEBUG  | src.feature_eng:calculate_macd:243 - MACD calculated (12/26/9)
2026-02-09 16:27:48.200 | DEBUG  | src.feature_eng:calculate_bollinger_bands:301 - Bollinger Bands calculated (period=20, std=2.0)
2026-02-09 16:27:48.203 | DEBUG  | src.feature_eng:calculate_ema_crossover:357 - EMA crossover calculated (9/21)
2026-02-09 16:27:48.205 | DEBUG  | src.feature_eng:calculate_volume_features:403 - Volume features calculated (period=20)
2026-02-09 16:27:48.214 | DEBUG  | src.feature_eng:calculate_ml_features:518 - ML features calculated
2026-02-09 16:27:48.218 | DEBUG  | src.smc_polars:calculate_swing_points:401 - Swing points: 3062 highs, 3079 lows
2026-02-09 16:27:48.220 | DEBUG  | src.smc_polars:calculate_fvg:312 - FVG calculation complete. Bullish: 5696, Bearish: 4720
2026-02-09 16:27:48.242 | DEBUG  | src.smc_polars:calculate_order_blocks:511 - Order Blocks: 2201 bullish, 2164 bearish
2026-02-09 16:27:48.364 | DEBUG  | src.smc_polars:calculate_bos_choch:599 - BOS: 702 bullish, 458 bearish
2026-02-09 16:27:48.364 | DEBUG  | src.smc_polars:calculate_bos_choch:600 - CHoCH: 616 bullish, 617 bearish
2026-02-09 16:27:48.366 | DEBUG  | src.feature_eng:calculate_rsi:130 - RSI calculated (period=14)
2026-02-09 16:27:48.367 | DEBUG  | src.feature_eng:calculate_atr:185 - ATR calculated (period=14)
2026-02-09 16:27:48.368 | DEBUG  | src.feature_eng:calculate_macd:243 - MACD calculated (12/26/9)
2026-02-09 16:27:48.369 | DEBUG  | src.feature_eng:calculate_bollinger_bands:301 - Bollinger Bands calculated (period=20, std=2.0)
2026-02-09 16:27:48.370 | DEBUG  | src.feature_eng:calculate_ema_crossover:357 - EMA crossover calculated (9/21)
2026-02-09 16:27:48.371 | DEBUG  | src.feature_eng:calculate_volume_features:403 - Volume features calculated (period=20)
2026-02-09 16:27:48.373 | DEBUG  | src.smc_polars:calculate_swing_points:401 - Swing points: 130 highs, 130 lows
2026-02-09 16:27:48.374 | DEBUG  | src.smc_polars:calculate_fvg:312 - FVG calculation complete. Bullish: 256, Bearish: 155
2026-02-09 16:27:48.376 | DEBUG  | src.smc_polars:calculate_order_blocks:511 - Order Blocks: 90 bullish, 82 bearish
2026-02-09 16:27:48.381 | DEBUG  | src.smc_polars:calculate_bos_choch:599 - BOS: 39 bullish, 20 bearish
2026-02-09 16:27:48.381 | DEBUG  | src.smc_polars:calculate_bos_choch:600 - CHoCH: 19 bullish, 19 bearish
[I 2026-02-09 16:27:48,582] 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:15:00 to 2026-02-09 11:15:00
Fetching 2,000 bars of H1 data...
Fetched 2,000 H1 bars
Engineering features...
M15 technical indicators...
SMC structure features...
H1 higher timeframe features...
Total features: 70
Columns with nulls: 45
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: 27558 (55.14%)
SELL: 22422 (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=22047, SELL=17938
After: BUY=17938, SELL=17938
Total samples: 35876
Selected 69 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=17938 (50.0%), BUY=17938 (50.0%)
Running Optuna hyperparameter optimization...
0%| | 0/30 [00:00<?, ?it/s]
0%| | 0/30 [00:02<?, ?it/s]
Best trial: 0. Best value: 0.547474: 0%| | 0/30 [00:02<?, ?it/s]
Best trial: 0. Best value: 0.547474: 3%|3 | 1/30 [00:02<01:08, 2.37s/it]
Best trial: 0. Best value: 0.547474: 3%|3 | 1/30 [00:09<01:08, 2.37s/it]
Best trial: 0. Best value: 0.547474: 3%|3 | 1/30 [00:09<01:08, 2.37s/it]
Best trial: 0. Best value: 0.547474: 7%|6 | 2/30 [00:09<02:17, 4.91s/it]
Best trial: 0. Best value: 0.547474: 7%|6 | 2/30 [00:12<02:17, 4.91s/it]
Best trial: 0. Best value: 0.547474: 7%|6 | 2/30 [00:12<02:17, 4.91s/it]
Best trial: 0. Best value: 0.547474: 10%|# | 3/30 [00:12<01:54, 4.23s/it]
Best trial: 0. Best value: 0.547474: 10%|# | 3/30 [00:16<01:54, 4.23s/it]
Best trial: 0. Best value: 0.547474: 10%|# | 3/30 [00:16<01:54, 4.23s/it]
Best trial: 0. Best value: 0.547474: 13%|#3 | 4/30 [00:16<01:44, 4.02s/it]
Best trial: 0. Best value: 0.547474: 13%|#3 | 4/30 [00:24<01:44, 4.02s/it]
Best trial: 0. Best value: 0.547474: 13%|#3 | 4/30 [00:24<01:44, 4.02s/it]
Best trial: 0. Best value: 0.547474: 17%|#6 | 5/30 [00:24<02:18, 5.52s/it]
Best trial: 0. Best value: 0.547474: 17%|#6 | 5/30 [00:29<02:18, 5.52s/it]
Best trial: 0. Best value: 0.547474: 17%|#6 | 5/30 [00:29<02:18, 5.52s/it]
Best trial: 0. Best value: 0.547474: 20%|## | 6/30 [00:29<02:05, 5.24s/it]
Best trial: 0. Best value: 0.547474: 20%|## | 6/30 [00:31<02:05, 5.24s/it]
Best trial: 0. Best value: 0.547474: 20%|## | 6/30 [00:31<02:05, 5.24s/it]
Best trial: 0. Best value: 0.547474: 23%|##3 | 7/30 [00:31<01:37, 4.22s/it]
Best trial: 0. Best value: 0.547474: 23%|##3 | 7/30 [00:36<01:37, 4.22s/it]
Best trial: 0. Best value: 0.547474: 23%|##3 | 7/30 [00:36<01:37, 4.22s/it]
Best trial: 0. Best value: 0.547474: 27%|##6 | 8/30 [00:36<01:37, 4.43s/it]
Best trial: 0. Best value: 0.547474: 27%|##6 | 8/30 [00:39<01:37, 4.43s/it]
Best trial: 0. Best value: 0.547474: 27%|##6 | 8/30 [00:39<01:37, 4.43s/it]
Best trial: 0. Best value: 0.547474: 30%|### | 9/30 [00:39<01:23, 3.97s/it]
Best trial: 0. Best value: 0.547474: 30%|### | 9/30 [00:40<01:23, 3.97s/it]
Best trial: 0. Best value: 0.547474: 30%|### | 9/30 [00:40<01:23, 3.97s/it]
Best trial: 0. Best value: 0.547474: 33%|###3 | 10/30 [00:40<01:04, 3.25s/it]
Best trial: 0. Best value: 0.547474: 33%|###3 | 10/30 [00:45<01:04, 3.25s/it]
Best trial: 0. Best value: 0.547474: 33%|###3 | 10/30 [00:45<01:04, 3.25s/it]
Best trial: 0. Best value: 0.547474: 37%|###6 | 11/30 [00:45<01:09, 3.65s/it]
Best trial: 0. Best value: 0.547474: 37%|###6 | 11/30 [00:47<01:09, 3.65s/it]
Best trial: 11. Best value: 0.553777: 37%|###6 | 11/30 [00:47<01:09, 3.65s/it]
Best trial: 11. Best value: 0.553777: 40%|#### | 12/30 [00:47<00:59, 3.28s/it]