trading strategy backtest

Look-Ahead Bias: Is Your Trading Strategy Backtest Lying?

November 23, 2026 · 8 min read · Synergy Trading research
Look-Ahead Bias: Is Your Trading Strategy Backtest Lying? | Synergy Trading

Look-ahead bias happens when a trading strategy backtest uses information that wasn't available when the trade would have been placed. It's one of the most common reasons a backtest looks brilliant and then live trading doesn't. Most of the fix comes down to timestamps. For every number your rule reads, ask when you could actually have known it. If the answer is later than the trade, the result is contaminated.

We run into this constantly. Synergy Trading runs a private research lab that tests popular strategies with the same rules every time: realistic costs, a random-entry control, a correction for testing many variants, and a look-ahead check. About 290 ideas have been through that process so far, and only 2 are clean survivors. This post doesn't judge any single strategy, and we haven't run a lab test for it. It explains the bug that quietly breaks a lot of backtests, so you can look for it in your own.

Why a tiny leak makes a huge difference

Markets are noisy, and most real edges are small. So a rule doesn't need to see far ahead to look like genius. If it knows today's close before it buys at today's open, it's sitting the exam with the answer sheet.

The damage shows up in every headline number. Win rate goes up. The Sharpe ratio goes up too. That's return per unit of risk, or roughly how much you earned for all the ups and downs you sat through. The t-statistic tells you how sure we can be that the average trade isn't really zero, and above about 2 is the usual bar. A leaky test clears it easily. None of those numbers are real.

Five ways future data sneaks in

Same-bar signals and fills. This is the classic. Take a rule like: if the close is above the 20-day average, buy. The code works out the signal from today's close but books the fill at today's open. Or it fills at the exact closing price that triggered the signal, as if you could react in zero seconds. A realistic version computes the signal on the close and fills at the next bar's open. On daily charts, that one-bar shift is often the whole difference between a lovely equity curve and a flat one.

Intrabar ordering. A daily bar gives you the high and the low, but not which came first. Say your stop and your target both sit inside the same bar. A backtester that assumes the target was hit first is guessing in your favor every time. Unless you have finer data, the cautious assumption is that the stop got hit first.

Revised data. Economic figures change after they're published. The St. Louis Fed's FRED blog gives a striking example. The first estimate of January 2008 US payrolls showed a loss of 17,000 jobs. Years later the same month showed a gain of 11,000. A rule that trades on the jobs number using today's revised series is trading on a figure nobody saw at the time. That's why the Fed keeps every earlier version, or vintage, in its ALFRED archive. Company figures work the same way. They get restated, and databases often stamp them with the quarter-end date rather than the day they were actually released.

Today's index list. If you test a stock rule on the current members of an index, you've quietly picked companies that did well enough to stay in or get added. This overlaps with what's usually called survivorship bias. Gilles Daniel, Didier Sornette and Peter Wohrmann studied it in Look-Ahead Benchmark Bias in Portfolio Performance Evaluation. They estimated it could be worth up to about 8% a year for the S&P 500. They also found it can inflate Sharpe ratios and understate drawdown risk (maximum drawdown is the worst fall from a peak to a low). Their suggested remedy is to compare a strategy with random strategies under similar constraints.

Indicators that know the whole history. Some tools redraw their past values once new data arrives. Zigzag lines and some pivot or swing-point indicators do this, and so does anything scaled using the average and spread of the full data set. On a chart they look prescient because they were drawn after the fact. If an indicator's old values change when you add new bars, you can't backtest it as it is.

The softer cousin: choosing settings with hindsight

Even with perfect timestamps, picking your settings after seeing the whole period is a kind of peeking. You've used the future to choose the rule. A 2014 paper in the Notices of the American Mathematical Society by David Bailey, Jonathan Borwein, Marcos López de Prado and Qiji Jim Zhu put a number on how quickly this goes wrong. According to the AMS news release, with 5 years of data, trying as few as 45 configurations can turn up one that looks strong on the data it was built on and then does poorly on data it hasn't seen. The authors also pointed out that many backtests never say how many versions were tried. That's why our lab corrects for the number of variants tested, and why the count matters as much as the winner.

How to check your own trading strategy backtest

None of this needs special software. It needs a bit of suspicion and a few deliberate tests:

  • For every input, write down when it became public, and make sure your rule only reads it after that time.
  • Push every entry one bar later. If the edge disappears, it was probably living on a bar you couldn't have traded.
  • When the stop and target both fall inside the same bar, assume the stop was hit first.
  • Build any stock universe from what was in the index on each historical date, not from today's list.
  • Add new data to the end and check whether old indicator values or old signals change. They shouldn't.
  • Run a random-entry control. Take the same trade with the same stop, target and holding time, but enter at random moments, many times over. That shows what luck alone produces. If your strategy doesn't clearly beat that spread, you haven't shown an edge.
  • Count every variant you try, and hold back a slice of data you don't look at until the very end.

One more heuristic: be suspicious of results that look too smooth. A nearly straight equity curve, or a win rate that seems out of line with how noisy the market is, doesn't prove there's a leak. It's a good reason to go looking for one, though. A strategy that beats random entries by a huge, effortless margin deserves the closest look of all.

What this test can't tell you

There's no lab test behind this post. We haven't run a specific strategy here, so we have no numbers of our own to report, and no data period, markets or cost assumptions to describe. The checklist above catches common leaks, but passing it doesn't prove a backtest is clean. A clean backtest can still fail going forward because of trading costs, changing market conditions or overfitting. Past results don't guarantee future results.

Frequently asked questions

What is look-ahead bias in simple terms?

Look-ahead bias is when a backtest uses information that wasn't available at the moment the trade would have been placed. Examples include buying at the open on a signal from that day's close, using revised economic data, or testing on today's index members. It makes results look much better than real trading could.

How can I tell if my backtest has look-ahead bias?

The quickest test is to push every entry one bar later and see whether the edge disappears. Also check when each input became public, assume stops hit before targets inside the same bar, and add new data to see whether old signals change. Results that look too smooth deserve a closer look.

Is look-ahead bias the same as survivorship bias?

Not exactly, but they overlap. Testing a stock rule on today's index members uses future knowledge of which companies did well enough to stay in. Researchers Daniel, Sornette and Wohrmann called this look-ahead benchmark bias and estimated it could be worth up to about 8% a year for the S&P 500.

Why does a strategy work in a backtest but fail in live trading?

Often the backtest was leaking future information, or its settings were picked with hindsight from many variants. Research in the Notices of the American Mathematical Society found that with 5 years of data, trying about 45 configurations can produce one that looks strong on past data and then does poorly on new data.

Want to know how a strategy you follow holds up under these checks? You can request a verdict by emailing hello@synergytrading.net with the subject "Verdict request". It's a waitlist, with no price and no promised date, and nothing is sold yet. Synergy Trading isn't a registered broker-dealer or investment adviser, and nothing here is a recommendation to buy or sell.

Educational research only, not investment advice. Past results do not guarantee future results.

Sources

backtestinglook-ahead biastrading researchdata qualityrisk management

Want your strategy tested?

We run the same test on any rule set: realistic costs, a random-entry control and a look-ahead check. Email us the rules to join the waitlist. Nothing is for sale yet.

Request a verdict

More verdicts

Volume Profile vs Market Profile: A Day Trader's Guide | Synergy Chart
volume profile vs market profile

Volume Profile vs Market Profile: A Day Trader's Guide

How to Read Order Flow in a Selloff: Selling vs Absorption | Synergy Chart
how to read order flow

How to Read Order Flow in a Selloff: Selling vs Absorption

Survivorship Bias Inflates Your Trading Strategy Backtest | Synergy Trading
trading strategy backtest

Survivorship Bias Inflates Your Trading Strategy Backtest