- Added RRBacktester import and initialization in PredictionService
- Added BacktestSummary dataclass for typed responses
- Added run_backtest() method with signal generation
- Added _generate_backtest_signals() helper for historical signals
- Added backtester_available property
- Updated POST /api/backtest endpoint to use real backtester
- Added GET /api/backtest/status endpoint for availability check
- Added losing_trades, avg_trade_duration, metrics_by_rr, metrics_by_amd to response
The backtester now uses:
- RRBacktester from src/backtesting/rr_backtester.py
- MetricsCalculator from src/backtesting/metrics.py
- AMD phase filtering and R:R configuration support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added HierarchicalPipeline initialization in PredictionService._load_models()
- Added HierarchicalResult dataclass for typed responses
- Added get_hierarchical_prediction() method for full L0→L1→L2 predictions
- Added get_hierarchical_model_info() method for model introspection
- Added hierarchical_available property
- Added API endpoints:
- GET /api/hierarchical/{symbol} - Full 3-level prediction
- GET /api/hierarchical/{symbol}/models - Model info per symbol
- GET /api/hierarchical/status - Pipeline status
- Updated health endpoint to include hierarchical_available flag
This completes GAP #2: L1→L2 Hierarchical Predictor integration.
The pipeline now uses symbol-specific metamodels (XGBoost or Neural Gating)
to synthesize 5m and 15m base model predictions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add AttentionProvider service to load and serve attention scores
- Integrate attention scoring into PredictionService.generate_signal()
- Add AttentionInfo dataclass to TradingSignal
- Boost confidence by 15% when high flow detected
- Add /api/attention/{symbol} endpoint for direct attention queries
- Add /api/attention/models endpoint to list loaded models
- Add attention field to SignalResponse API model
This completes the L0→L1 integration of the hierarchical ML architecture.
Attention models identify high-flow market moments to improve signal quality.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- PostgreSQL credentials updated to trading_user/trading_dev_2026
- MySQL section marked as deprecated (remote server no longer accessible)
- Table mappings updated to use market_data PostgreSQL schema
- Password redacted from deprecated MySQL config
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>