StratVerity
Sign inAudit a strategy
← Back to Learn
Trading research

Look-ahead bias in backtests

A strategy can appear profitable when the model sees bars that were not available at the time of decision-making. This is look-ahead bias, and it turns a plausible backtest into a false signal.

What look-ahead bias is

Look-ahead bias happens when a backtest uses information that the strategy would not have had when it needed to decide. Common examples include using the current bar to set a stop, reading a future close to decide a pivot, or relying on a confirmation that is only available after the trade has already been initiated.

Why it matters

Once the future leaks in, the model can optimize its rules against information that would never have existed in real time. The result is a beautiful equity curve that cannot be replicated in a live or paper-trading environment.

How to check it

Audit the signal timing at the exact decision point. Verify that each input uses data available at the bar close or the moment of the signal. The typical practical test is to confirm that the rule only depends on data from the current or previous bars, never on bars that come after the decision point.