File size: 1,536 Bytes
2b5698f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
V5 Trading System — Design and Roadmap

Goal
----
Build a production-ready V5 trading system for XAUUSD that is robust to market costs and suitable for live paper/live trading. Focus on risk controls, walk-forward validation, realistic fills, and a live inference API.

Key Requirements
----------------
- Realistic backtests with slippage, commissions, partial fills, and order types
- Walk-forward training & validation to reduce overfitting
- Modular model artifacts: tree-only + Keras artifacts (same as V4) but with versioning
- Live inference API with strict risk manager, position sizing, and circuit-breakers
- Paper-trade adapter to test on real exchange simulator/broker sandbox
- Monitoring & alerting (P&L, drawdown, latency, model drift)

Milestones
----------
1. V5 spec + scaffolding (this doc + FastAPI scaffold)
2. Realistic backtester improvements
3. Walk-forward validation pipeline
4. Ensemble retrain with robust techniques
5. Live inference + paper-trade adapter
6. Monitoring, HF model card, and deployment

Acceptance Criteria
-------------------
- Backtest Sharpe > target (configurable) on OOS sets with realistic costs
- Max drawdown within risk budget
- Live inference latency < 100ms per request (p95) on target hardware
- Automated rollback on model drift or large drawdown

Notes
-----
Start from existing V4 codebase for feature engineering and model saving. Reuse safe serialization approach. Incrementally add safety features and validate each milestone with tests.