Event-driven backtester
An event-driven backtester processes history one market event at a time, a bar, a quote, a timer, handing each to the strategy and letting it react by placing orders that fill on subsequent events. This mirrors the shape of live execution, where events also arrive in sequence and the future isn’t known yet.
The contrast is a vectorized backtester, which computes over whole arrays of data at once. Vectorized is faster and great for research, but it makes look-ahead bias easy to introduce and glosses over the mechanics of orders and fills. Event-driven backtesting is slower but more realistic, and it’s much harder to fool, which is why it’s the right choice for any strategy headed for live trading, especially when the same code path serves both the backtest and the live run.