Scripts:
- Update ingest_ohlcv_polygon.py for improved data processing
Reports:
- Add attention model training reports (2x)
- Add standard training reports (2x)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created SignalStore service (src/services/signal_store.py)
- In-memory storage with FIFO eviction (max 10,000 signals)
- 7-day retention policy
- Query by symbol, direction, date range, confidence, AMD phase
- Pagination support
- Optional JSON persistence
- Fast lookup via indexed structure
- Integrated signal storage into PredictionService
- Signals auto-stored on generation
- Query methods exposed to API
- Added API endpoints for historical signals:
- GET /api/signals/history - Query with filters and pagination
- GET /api/signals/latest - Get most recent signals
- GET /api/signals/valid - Get currently valid signals
- GET /api/signals/{signal_id} - Get specific signal
- GET /api/signals/stats - Get store statistics
StoredSignal dataclass includes:
- Core signal data (direction, prices, confidence)
- Attention info (score, flow class, high flow flag)
- Metadata (timeframe, AMD phase, volatility)
- Validity window (timestamp, valid_until)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>