Labels: component: backtesting, priority: medium
Description
Build the integration layer that wires the replay engine, fill simulator, risk module, and strategy interface into a complete backtesting loop. This is distinct from the replay engine (which just emits events) and the fill simulator (which evaluates single orders). The backtesting harness orchestrates the full cycle: data → signal → risk check → order → fill → portfolio update.
Scope
- Strategy interface: define an abstract
Strategy class with on_book_update, on_fill, and on_trade callbacks.
- Portfolio tracker: maintain positions, cash, realized/unrealized P&L.
- Performance metrics: Sharpe, max drawdown, turnover, win rate, computed at end of run.
- Reproducibility: given the same data and config, produce identical results. No non-determinism from threading or floating-point ordering.
Depends on: #1, #2, #3, #6, #13 (FIXME: links)
Labels:
component: backtesting,priority: mediumDescription
Build the integration layer that wires the replay engine, fill simulator, risk module, and strategy interface into a complete backtesting loop. This is distinct from the replay engine (which just emits events) and the fill simulator (which evaluates single orders). The backtesting harness orchestrates the full cycle: data → signal → risk check → order → fill → portfolio update.
Scope
Strategyclass withon_book_update,on_fill, andon_tradecallbacks.Depends on: #1, #2, #3, #6, #13 (FIXME: links)