Strategy Research
Backtesting mistakes to avoid before automating a trading strategy
Avoid look-ahead bias, unrealistic fills, overfitting, missing costs, bad data, and other common errors in automated strategy research.
On this page+

A backtest is a model of how rules might have behaved on historical data. It is not a replay of live trading unless the data, order logic, timing, and costs closely match reality. Small modelling mistakes can turn a weak strategy into an impressive report.
Avoid information from the future
Look-ahead bias occurs when a decision uses information that would not have been known at the time. Examples include using a completed higher-timeframe bar before it closed, entering at the same bar's ideal price after calculating with its close, or referencing a revised data series.
Signals should be evaluated using only information available at the decision timestamp. Intrabar assumptions need special care when the stop and target are both touched inside one historical bar.
Model fills and costs realistically
Backtests often assume immediate fills at the signal price. Live orders face spread, slippage, queue position, partial fills, rejected orders, and commissions. Futures strategies also encounter contract rollover and changing liquidity.
Use conservative costs and test worse scenarios. A strategy that remains viable after higher costs and delayed entries is more robust than one that depends on perfect fills.
Do not optimise until history obeys
Trying many parameters and selecting the best result can fit random noise. The more combinations tested, the more likely one will look successful by chance.
Keep the rule set understandable, reserve data for out-of-sample testing, examine neighbouring parameter values, and prefer stable performance over one narrow optimum. Document every change so later results are not mistaken for independent confirmation.
Frequently asked questions
Can a backtest predict future returns?+
No. It can help evaluate historical behaviour and operational logic, but future markets, costs, and fills can differ materially.
Why do live results differ from backtests?+
Differences can come from data, timing, spread, slippage, commissions, contract mapping, rejected orders, implementation details, and changing market conditions.
Keep learning
Continue through the TradeLuma research library.
Browse practical guides across trading, automation, execution, futures, technical analysis, and risk management.
Browse all guides →Continue learning
Related guides.

How to Backtest a Trading Strategy: A Practical Step-by-Step Guide
Learn how to backtest a trading strategy from written rules to clean data, realistic costs, out-of-sample checks, robustness testing, and final review.

Win rate, profit factor, expectancy, and drawdown: reading strategy results properly
Learn how common trading metrics work together and why no single number is enough to judge an automated strategy.

What Makes a Trading Strategy Profitable? Edge, Expectancy and Risk
Learn what makes a trading strategy profitable, including expectancy, payoff ratio, trading costs, drawdown, robustness, and consistent risk management.
