Hierarchical ML Pipeline for trading predictions:
- Level 0: Attention Models (volatility/flow classification)
- Level 1: Base Models (XGBoost per symbol/timeframe)
- Level 2: Metamodels (XGBoost Stacking + Neural Gating)
Key components:
- src/pipelines/hierarchical_pipeline.py - Main prediction pipeline
- src/models/ - All ML model classes
- src/training/ - Training utilities
- src/api/ - FastAPI endpoints
- scripts/ - Training and evaluation scripts
- config/ - YAML configurations
Note: Trained models (*.joblib, *.pt) are gitignored.
Regenerate with training scripts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
OOS Backtest Report
Generated: 2026-01-06 23:22:28
Configuration
- OOS Period: 2024-03-01 to 2025-03-18
- Training Data Cutoff: 2024-03-01 (excluded from training)
Summary by Symbol/Timeframe
| Symbol | TF | Samples | MAE High | MAE Low | Dir Acc High | Dir Acc Low | Signal Acc |
|---|---|---|---|---|---|---|---|
| XAUUSD | 5m | 73226 | 1.0982 | 1.2217 | 91.4% | 93.2% | 91.5% |
| XAUUSD | 15m | 24578 | 2.0019 | 2.3882 | 94.6% | 95.9% | 94.7% |
| EURUSD | 5m | 76858 | 0.0003 | 0.0003 | 98.0% | 98.1% | 98.0% |
| EURUSD | 15m | 25635 | 0.0005 | 0.0006 | 98.6% | 98.8% | 98.6% |
R:R Analysis
Risk/Reward Performance by Symbol
XAUUSD 5m
| R:R | Win Rate | Trades | Expectancy |
|---|---|---|---|
| 1.0 | 51.0% | 45984 | 0.019 |
| 1.5 | 36.2% | 35367 | -0.094 |
| 2.0 | 22.7% | 29182 | -0.318 |
| 2.5 | 13.1% | 25943 | -0.543 |
| 3.0 | 7.4% | 24352 | -0.704 |
XAUUSD 15m
| R:R | Win Rate | Trades | Expectancy |
|---|---|---|---|
| 1.0 | 55.4% | 13514 | 0.107 |
| 1.5 | 39.1% | 9905 | -0.022 |
| 2.0 | 24.5% | 7984 | -0.266 |
| 2.5 | 14.2% | 7033 | -0.501 |
| 3.0 | 8.1% | 6562 | -0.676 |
EURUSD 5m
| R:R | Win Rate | Trades | Expectancy |
|---|---|---|---|
| 1.0 | 44.2% | 30193 | -0.116 |
| 1.5 | 24.5% | 22300 | -0.388 |
| 2.0 | 13.9% | 19565 | -0.583 |
| 2.5 | 7.9% | 18292 | -0.723 |
| 3.0 | 4.8% | 17698 | -0.807 |
EURUSD 15m
| R:R | Win Rate | Trades | Expectancy |
|---|---|---|---|
| 1.0 | 45.7% | 9031 | -0.086 |
| 1.5 | 27.0% | 6721 | -0.324 |
| 2.0 | 15.9% | 5830 | -0.523 |
| 2.5 | 9.1% | 5396 | -0.680 |
| 3.0 | 5.9% | 5213 | -0.762 |
Conclusions
Key Observations
-
Directional Accuracy: The models show high directional accuracy (>90%) in predicting whether price will move up or down.
-
Signal Quality: Signal-based accuracy helps identify when predictions are most reliable.
-
R:R Performance: The expectancy values show the expected return per unit of risk.
- Positive expectancy = profitable strategy
- Expectancy > 0.5 with 2:1 R:R = strong edge
Recommendations
- Focus on configurations with positive expectancy
- Consider combining with DirectionalFilters for additional confirmation
- Use volume/volatility filters during low-quality periods
Report generated by OOS Backtest Pipeline