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>
51 lines
1.8 KiB
Markdown
51 lines
1.8 KiB
Markdown
# Symbol-Timeframe Model Training Report
|
|
|
|
**Generated:** 2026-01-07 03:40:26
|
|
|
|
## Configuration
|
|
|
|
- **Training Data Cutoff:** 2024-12-31 (excluding 2025 for backtesting)
|
|
- **Dynamic Factor Weighting:** Enabled
|
|
- **Sample Weight Method:** Softplus with beta=4.0, w_max=3.0
|
|
|
|
## Training Results Summary
|
|
|
|
| Model | Symbol | Timeframe | Target | MAE | RMSE | R2 | Dir Accuracy | Train | Val |
|
|
|-------|--------|-----------|--------|-----|------|----|--------------| ----- | --- |
|
|
| GBPUSD_5m_high_h3 | GBPUSD | 5m | high | 0.000504 | 0.000592 | -0.6309 | 98.17% | 310314 | 54762 |
|
|
| GBPUSD_5m_low_h3 | GBPUSD | 5m | low | 0.000548 | 0.000645 | -0.6558 | 98.88% | 310314 | 54762 |
|
|
| GBPUSD_15m_high_h3 | GBPUSD | 15m | high | 0.000887 | 0.001025 | -0.6944 | 98.52% | 104191 | 18387 |
|
|
| GBPUSD_15m_low_h3 | GBPUSD | 15m | low | 0.000955 | 0.001102 | -0.7500 | 98.90% | 104191 | 18387 |
|
|
|
|
## Model Files
|
|
|
|
Models saved to: `/home/isem/workspace-v1/projects/trading-platform/apps/ml-engine/models/symbol_timeframe_models`
|
|
|
|
### Model Naming Convention
|
|
- `{symbol}_{timeframe}_high_h{horizon}.joblib` - High range predictor
|
|
- `{symbol}_{timeframe}_low_h{horizon}.joblib` - Low range predictor
|
|
|
|
## Usage Example
|
|
|
|
```python
|
|
from training.symbol_timeframe_trainer import SymbolTimeframeTrainer
|
|
|
|
# Load trained models
|
|
trainer = SymbolTimeframeTrainer()
|
|
trainer.load('models/symbol_timeframe_models/')
|
|
|
|
# Predict for XAUUSD 15m
|
|
predictions = trainer.predict(features, 'XAUUSD', '15m')
|
|
print(f"Predicted High: {predictions['high']}")
|
|
print(f"Predicted Low: {predictions['low']}")
|
|
```
|
|
|
|
## Notes
|
|
|
|
1. Models exclude 2025 data for out-of-sample backtesting
|
|
2. Dynamic factor weighting emphasizes high-movement samples
|
|
3. Separate models for HIGH and LOW predictions per symbol/timeframe
|
|
|
|
---
|
|
*Report generated by Symbol-Timeframe Training Pipeline*
|