Method

Look-ahead bias: the number-one backtest trap

7 min read · by the GetBacktest team

Look-ahead bias is the most common — and most costly — backtesting error. It means making a decision using information that wasn't available at the moment of the trade. The result: a gorgeous equity curve in testing… that collapses live. Understanding this bias is understanding why so many “proven” strategies fail.

What look-ahead bias is

A backtest simulates past decisions. Look-ahead happens when a decision relies, even unintentionally, on data that comes after the supposed moment of the trade: the close of a candle not yet finished, a day's high known in advance, an indicator recomputed over the whole series.

It's insidious because it doesn't feel like cheating: you sincerely think you see a great signal, when you only “see” it because you already know what comes next.

Its most common forms

Entering at a candle's close when you'd only have known that close at its end; using the high/low of an already-finished session; fitting an indicator (average, level) computed on future data; or cherry-picking, after the fact, the periods that “work”.

Survivorship bias is a cousin: testing only on assets that still exist today ignores those that disappeared, artificially inflating performance.

Why it ruins a backtest

An ounce of look-ahead is enough to turn a neutral strategy into an apparent cash machine. The catch: that edge doesn't exist in the future, where information arrives in order, one candle at a time.

The outcome is always the same: flawless test results, then brutal disappointment live. Worse, the trader often concludes “it's psychology” when the backtest was flawed from the start.

How to eliminate it

The fix is bar-by-bar replay: the chart is frozen at the present, you advance one candle at a time, and decide only on what's actually visible. No access to the future is possible.

On GetBacktest, upcoming history is hidden server-side: even by inspecting the page, you can't see the next candle. That's a structural guarantee against look-ahead, not merely good intentions.

Don't believe it — prove it

Backtest this concept on real data, tick by tick, and get a robustness verdict. 7 days of Pro free, no card.

Start for free

Frequently asked questions

What is look-ahead bias?

Using, in a backtest, information that didn't exist yet at the moment of the decision — for example the close of a candle that hadn't finished.

How do I know if my backtest has look-ahead?

Check that every decision uses ONLY data closed before entry. If results are too good and degrade live or in walk-forward, suspect look-ahead.

Does manual backtesting avoid look-ahead?

Only if it hides the future. GetBacktest's bar replay reveals candles one by one and hides what's ahead server-side, making cheating impossible even by accident.

Read next

Look-ahead bias: the #1 backtest trap (and how to avoid it) | GetBacktest