Lookahead Bias: Trading on Tomorrow's News
Lookahead bias is when a backtest uses information that was not available at the moment of the decision. Classic forms: deciding on today's close and filling at today's close; using a company's final, restated figures before they were reported; or scaling an indicator with the full history's highs and lows. It makes a rule look psychic. The test: for every number the rule uses, ask 'could I have known this at that exact moment?' A common safeguard against the classic form: a decision made on one bar's close trades at the NEXT bar's close (or open), a price nobody knew when the decision was made. Costs and slippage are a separate gap and still need modelling.
Key points
- Ask of every input: could I have known this value at that exact moment?
- Data gets revised: the cleaned history you download later may differ from what was first reported
- Safer fills: signal on one bar's close, trade at the next bar's open or later
Related lessons
- What a Backtest Can (and Can't) Tell You
- Every Dataset Has a Clock
- Costs, Slippage & Capacity
- Order Types
This lesson ends with a 5-question quiz.