How we check for lookahead
Lookahead is the most common way a backtest lies: the strategy uses information it could not have had at that moment. BenchAlgo tests for it in several independent ways. A failed check blocks an idea from becoming a Lead or Validated.
Cut the future and compare
The harness runs your strategy on the full data. Then it runs it again with all data after a chosen moment removed. Every decision made before that moment must be identical in both runs. If one decision changes, the strategy was looking ahead.
Change the future and compare
Next the harness keeps the data but alters the part that comes after a decision, for example by scrambling or reshaping it. Earlier decisions must not change. A strategy that reacts to data it should not have seen gives itself away here.
Fills happen at the next bar open
A signal that fires on one bar can only be filled at the open of the next bar. It is never filled at the price that created the signal. The harness owns fills, so a strategy cannot choose a better one.
Stop before target inside a bar
When a single bar touches both the stop and the target, no one can know which came first. We assume the stop was hit first. This is the cautious choice, and the strategy cannot change it.
Replay as if live
The strategy is replayed bar by bar through the same kind of engine that would run it live. Its trades, fills, exits and profit must match the fast backtest exactly. Any difference means the backtest knew something a live engine would not.
Random entries and random direction
These checks ask whether the idea beats chance. The harness replaces your entry times with random ones, and separately your direction with a coin flip. If chance does as well as the idea, the edge is not real.
Double the costs
The idea runs again with fees and slippage doubled. An edge that disappears under higher costs is too thin to rely on.
Walk-forward testing
The idea is tuned on one slice of history and then judged on the next slice, which the tuning never saw. This repeats along the whole history, always moving forward in time.
A sealed holdout
The most recent three months of data are locked away. For now, nothing is tuned, scored or shown on them. They stay as a final exam that no idea has seen.
Why invalid runs still count
Every run counts as a trial, including runs that were invalid or crashed. The more ideas you try on the same data, the easier it is to stumble on a lucky one. The score takes the number of trials into account, and the count is kept per campaign and cannot be reset. Failed attempts cannot be quietly forgotten.
Every report has a Lookahead screen that lists these checks. See how scoring works for the other screens. To run these tests on your own backtester, read how to check a backtest for lookahead bias and how to tell if it is overfit.
Test an idea the strict way
Create a free account and see every check run on your own strategy.