Skip to content

Backtesting Harness (Integration Layer) #31

@hnaik

Description

@hnaik

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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions