Curriculum/event-driven-backtester
Event-Driven Backtester
research process·L2 · idiom·stub
Replacesthe belief that `df.shift(1) * signal` IS a backtester.
An event-driven backtester processes events in time order, holds state explicitly (position, cash, pending orders), and applies a fill model (queue position, slippage). The trade is throughput for fidelity — vectorised pseudo-backtests run in seconds and mislead about execution; event-driven runs in minutes and matches live performance much more closely.
Prerequisites
Bridges
- strategy-replay-determinismshared mechanismDeterminism (same seed, same data, same result across runs) is a property of the event loop, not the strategy. The same architecture that gives reproducibility in backtests gives reproducibility in live trading via event replay.
- live-trading-vs-simulation-gapshared failure modeThe gap between backtest PnL and live PnL is the integrated cost of every fidelity gap in the fill model — queue position, partial fills, cancel-replace latency. A vectorised backtest hides this gap to zero; an event-driven one with a realistic fill model surfaces it.
This concept is a node in the curriculum DAG. The full lab — page blocks, done state, references — has not been authored yet. The relations above describe where it sits in the graph.
Author at: content/concepts/event-driven-backtester/card.ts