Causality in Backtesting
Causality in backtesting refers to the requirement that the sequence of events in a simulation must strictly mirror the logical flow of real-world trading. This means that an action taken at time T must be based only on information available at or before time T. Violating this principle creates a disconnect between the simulation and reality, rendering the results invalid.
In derivatives trading, this involves ensuring that order execution, slippage, and market impact are modeled correctly. If a backtest assumes a trade can be executed at a price that was not actually available at that timestamp, it violates causality.
This is often subtle, involving issues like the order of events within a single bar or the delay in receiving market data. Establishing causality requires precise timestamps and an accurate reconstruction of the market state.
Without it, a strategy may appear to have high profitability while relying on impossible execution assumptions. Ensuring causality is the cornerstone of credible quantitative research.
It forces the developer to account for the physical constraints of the trading environment and the reality of order flow.