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.

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.
Continue learning
Related TradeLuma guides

Strategy Research
Win rate, profit factor, expectancy, and drawdown: reading strategy results properly
22 July 2026 · 9 min read

Strategy Research
Walk-forward and out-of-sample testing for automated strategies
24 July 2026 · 9 min read

Review
Building an automated trading journal that explains every result
1 Aug 2026 · 8 min read
Build a controlled automation workflow with TradeLuma
Configure alerts, test in paper mode, apply execution controls, and follow broker outcomes from one workspace.
