Look-ahead bias: when a backtest knows too much.
By Axiom Systematic · Published · Educational research note
Look-ahead bias occurs when a historical decision uses information that was not available at the time. A simulation can be internally consistent and still contain this error if its timestamps describe the period being measured rather than the time the information became usable.
A hypothetical reporting timeline
Suppose a company’s quarterly accounts cover a period ending on 30 September. In this fictional example, the figures are first published on 15 November. A research dataset labels the record “30 September” because that is the reporting period end.
| Date | Event | Available to the model? |
|---|---|---|
| 30 September | Reporting period ends | No published figures yet |
| 1 October | A simulated portfolio decision | Only information already released |
| 15 November | Figures first published | Potentially, after the actual release time |
If the backtest joins those figures to a 1 October decision using the period-end label, it gives the model information from the future. The result does not test the process that a researcher or trader could have followed on that date.
Use the availability timestamp
The important question is: “Could the proposed decision have used this value at this time?” A robust dataset distinguishes the period covered, the publication timestamp and, where relevant, the time the data became available through the chosen vendor.
An after-close publication may need to enter a later decision. Revisions need their own availability dates. Replacing an original observation with a later corrected value can change the historical information set even when the observation’s period label stays the same.
Timing also applies to prices and transformations
A signal computed from a completed session’s closing data cannot justify a trade placed earlier in that same session. The execution timestamp must follow the information required to construct the signal.
Preprocessing can leak future information too. For example, fitting a scaling transformation on an entire dataset before splitting training and evaluation periods lets the training process use properties of future observations. Fit transformations using the information available within each development window.
A practical review
- Identify the availability timestamp for every feature, not just its observation date.
- Check a small number of decisions against the underlying release timeline by hand.
- Keep original and revised observations distinguishable.
- Apply preprocessing inside each training window.
- Verify that execution assumptions follow signal availability.
- Record changes to the universe and the treatment of securities that leave it.
Chronological validation is necessary, but not sufficient
A time-ordered split prevents some inappropriate uses of future training observations. It does not repair a feature that already contains future information. The information timeline needs to be correct before the model is evaluated.
The TimeSeriesSplit documentation provides a concrete implementation of chronological splits and an optional gap. It is a tool for defining evaluation windows, not a guarantee that the underlying financial data are free from leakage.
For the surrounding process, read our quantitative research methodology. Once timing assumptions are explicit, trading costs are another part of testing whether a simulated decision could be implemented.
Axiom Systematic is in pre-launch development. General information only; no investment product is offered. Read the legal notice.