Backtesting traps: six ways a strategy test can look better than it will trade
A backtest is a story about the past, told by your own code. It is easy to write a flattering one without meaning to. Below are six traps that catch most first systems, each with the check that exposes it. The examples use futures, but the same mistakes turn up on stocks and crypto.
1. Overfitting: too many knobs
Every parameter you add lets the strategy fit the past more closely, noise included. A moving-average system with two lengths and a stop is one thing. Add a time filter, a volatility filter and a day-of-week rule, and almost any history can be made to look good.
The check: count your parameters, then nudge each one by 10 to 20 percent and rerun. A real edge degrades gently. A fitted one falls off a cliff.
2. Optimising and judging on the same data
If the same data picks the parameters and grades them, the result is circular. Walk-forward testing breaks the circle. You optimise on one window and test on the next. Then both windows move forward in time, and only the out-of-sample pieces count. MultiCharts builds walk-forward testing and genetic optimisation into the platform. On other tools you may have to split the data by hand, which is tedious but still worth doing.
3. Look-ahead bias
Look-ahead bias means the code uses information it could not have had at the time. The classic cases are acting on a bar's close inside that same bar, or setting an intraday stop from a daily high that had not printed yet. The check is manual: step through a handful of trades bar by bar and ask what the system knew at each moment. Bar replay in MultiCharts and market replay in Quantower make this quick.
4. Leaving out costs
Commissions, exchange fees and slippage turn many profitable-looking intraday systems into losing ones. On the Free plan at NinjaTrader, a micro contract costs $0.39 per side before exchange, clearing and NFA fees, so a round turn starts at $0.78. A scalping system that averages a few dollars per trade has to clear that every single time. Overnight sessions and thin markets need wider slippage assumptions than the regular session.
Put realistic per-side costs and at least one tick of slippage into the test before you look at the equity curve, not after.
5. Too few trades
Thirty trades is an anecdote. With a small sample, one or two outliers decide the whole result. Aim for a few hundred trades spread across quiet and volatile periods, and look at the median trade as well as the average. If the median is negative and the average positive, a handful of lucky trades is carrying the system.
6. Survivorship and dirty data
If you test stocks, a symbol list built from today's index members quietly drops the companies that failed or were delisted along the way, and that flatters the past. In futures, gaps, bad ticks and careless contract rolls do similar damage. Know where your data comes from. MotiveWave and Quantower expect you to bring your own feed, while MultiCharts sells market data as a $49/mo add-on. Sample data, such as the set that comes with the free MultiCharts plan, is fine for learning the tools but not for judging a strategy.
Before you go live
When a strategy survives all six checks, run it on a simulator in real time for a few weeks. Live fills and your own reactions are the part no backtest can model. Then start at the smallest size the market allows, and compare live results with the test every month. Write down in advance what would make you stop, such as a drawdown limit or a number of losing weeks, and decide it while you are calm rather than in the middle of a bad run. Our platform ranking scores each tool on backtesting and replay if you are still choosing where to build.