Glossary
Look-ahead bias
A backtest flaw where the simulated rule uses information that was not yet available on the date it supposedly traded.
Look-ahead bias is a flaw in a backtest where the rule acts on information that did not exist yet on the day it supposedly traded. The test quietly peeks at the future, so its results are better than anyone could have achieved in real time. Unlike Overfitting, it is usually a mistake in how the data is lined up, not in how many rules were tried.
Common ways it creeps in
- Same-bar signals. A rule computes a signal from a day's close, or its high or low, and then trades at that same day's open or close.
- Report dates. Financial data stamped with the end of the quarter rather than the date it was filed, which in the US can be weeks later during Earnings Season.
- Revised figures. A test uses today's corrected numbers after a Financial restatement, or revised economic data, instead of what was first published.
- Index membership. Picking stocks from today's index list, which also creates Survivorship bias.
How it is avoided
Careful tests use point-in-time data, which records each value as it was known on each date, and act on a signal only from the next bar onward. Even so, a test free of look-ahead bias is still a description of the past, not a prediction.
