Skip to content
GetProfitable
Search
Dictionary

Look-ahead bias

Using information in a backtest that would not have been available at the moment the decision is made, which silently inflates results.

The obvious form is trading on a signal computed from the same bar's close. The subtle forms are worse: normalising features with full-sample statistics, using an index constituent list as it stands today, using an earnings number on its report date rather than its release time, or filling a limit order because the price touched the level intraday when your data only has daily bars.

A useful test is the shift test. Delay every signal by one full bar and re-run. A genuine daily effect loses some edge; a look-ahead bug typically loses all of it, or flips negative.

Example: a system using the day's high to set an entry returns 34% a year. The same system entering on the next open returns 3%. The 31-point gap was never available to anyone.

Related: data-leakage

Educational only, not advice. Spotted an error? Post in Site Feedback.