Can you trust a backtest? Six checks before you go live
A backtest is a record of what rules did on old prices under stated costs and execution settings, not a forecast. Trust it only after six ordered checks: no look-ahead or data errors, realistic costs, enough out-of-sample trades, a walk-forward run, no sign of over-optimization, and a small forward test.
By Soren Huang · Published · updated · Editorial policy
Contents
- Can you trust a backtest? Only after six checks
- Check 1: does the backtest peek ahead or run on bad data?
- Check 2: do the results survive commission and slippage?
- Checks 3 and 4: how many out-of-sample trades are enough, and why does walk-forward give you more?
- Check 5: how do you spot over-optimization?
- Check 6: why forward test small before trading full size?
- Frequently asked questions
- References
Can you trust a backtest? Only after six checks
Can you trust a backtest? Only after it passes six checks in a fixed order: no look-ahead or data errors, realistic costs, enough out-of-sample trades, a walk-forward run, no sign of over-optimization, and a small forward test. A backtest is a record of what rules did on old prices under stated costs and execution settings, not a forecast. A failure at any check sends the strategy back to research.
The order matters. A leak in check 1 makes every later number meaningless, and a cost error in check 2 changes which strategies even reach check 3. What backtesting is in futures explains the record itself; how backtesting software compares lists what a tool must let you set before the six checks can be run at all.
Check 1: does the backtest peek ahead or run on bad data?
Most backtests that collapse live used information the trader could not have had at the time. Look-ahead bias is any case where a rule reads a price before that price existed: a fill on the same bar whose close gave the signal, an indicator that repaints past values, a roll gap left in a continuous contract, a bad tick that triggers a stop. Run the one-bar shift test first: fill every signal on the next bar's open instead of the signal bar's close, then compare the two reports. A result that falls apart was leaking. The common leaks are listed in look-ahead bias in backtests.
Check 2: do the results survive commission and slippage?
Compare the gross average trade with the full round-trip cost, because an edge close to that cost disappears with one extra tick of slippage. Put commission, exchange fees and slippage into the search from the first run; adding them afterwards removes most finalists and wastes the search time. The free expectancy calculator shows how much of the average trade survives.
Hypothetical example
Gross average trade $90. Round-trip commission and fees $30. One tick of slippage each side on a $10 tick: $20. Net average trade $40. If slippage doubles to $40, the net falls to $20, less than a quarter of the gross figure.
Checks 3 and 4: how many out-of-sample trades are enough, and why does walk-forward give you more?
Judge the untouched part of the history in completed trades, not years, because the uncertainty of the average trade shrinks only with the square root of the trade count. Out-of-sample data is the part of the history that never helped choose a rule or a setting. Two years of it hold two dozen trades for a monthly swing rule and a thousand for an intraday rule; same dates, very different evidence. The one formula:
average-trade uncertainty = spread of single trades ÷ √N
The spread of single trades is how far single results typically sit from the average, N is the number of out-of-sample trades, and √N is its square root. A few hundred out-of-sample trades is a workable aim; under about 30 is a hint, not a result.
Walk-forward analysis is a test that optimises settings on one window, runs them unchanged on the window that follows, steps forward and repeats, then stitches the test parts into one curve. That stitched curve is the only one you could actually have traded, it holds more out-of-sample trades than a single split of the same history, and it shows whether re-chosen settings keep working as the windows move forward (Pardo, 2008). In AlphaPrime (Valynox), walk-forward is one step of strategy validation, where the pass thresholds are written before the search starts and the later checks stop when a strategy fails an earlier one.
Check 5: how do you spot over-optimization?
The best result from a large search is flattered by the search itself, so read a headline number only after a parameter plateau test, a Monte Carlo reshuffle of the trade order and a check that profit is spread across time. The run below tested NQ daily bars from 2019-01-02 to 2025-06-30, long and short, one contract, with a Bears Power rule as a stand-in instead of the subject itself; it is the one candidate kept out of 1,024 tried, for its return against its drawdown, picking the kept one after the fact flatters it, and no reader can expect those numbers.
Source: AlphaPrime product engine (CPU), run 2026-10-31. NQ daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $10 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $130,510 |
| Max drawdown | $86,105 |
| Trades | 227 |
| Win rate | 52.86% |
| Profit factor | 1.229 |
| Average trade | $574.93 |
| Time in market | 55.42% |

Over-optimization is tuning a rule so closely to one stretch of history that it describes the noise in that stretch. Three tests expose it. First, run the neighbouring settings: a lookback that works at 20 and fails at 18 and 22 is a spike, not a plateau. Second, reshuffle the trade order with the free Monte Carlo simulator and read the drawdown range, not the single value; if you will run several strategies together, the portfolio backtest with its combined drawdown is the number to plan around. Third, count how many quarters contributed. Bailey et al. (2014) show that the more variants a search tries, the more the best one is inflated, and Bailey and López de Prado (2014) give a way to discount a Sharpe ratio for the number of trials. More ways to break a strategy before trusting it are in robustness testing for trading strategies.
Check 6: why forward test small before trading full size?
A short live or simulated run at the smallest contract size turns the backtest assumptions about fills, slippage and session timing into measured numbers. A forward test is a run of the frozen rules on prices that did not exist when the rules were written. Before it starts, write the tolerance: for example, live average trade after costs must stay within a set share of the backtest figure, and measured slippage must not exceed the value used in check 2. After enough trades to read, compare backtest and live results against that tolerance. Inside it, move to the planned size; outside it, go back to check 2 with the measured costs.
Next step: take the strategy you trust most, move every fill from the signal bar's close to the next bar's open, and compare the two reports. That one-bar shift is check 1, and it costs nothing but a few minutes.
Frequently asked questions
If a backtest makes money, will it make money live?
No. A backtest is a record of what rules did on old prices under stated costs and execution settings; it is not a forecast. The six checks narrow the gap between backtest and live results by removing leaks, pricing costs correctly, grading on untouched data and measuring real fills at small size.
How many trades does a backtest need to be reliable?
Count out-of-sample trades, not years. The uncertainty of the average trade shrinks with the square root of the trade count, so four times as many trades halve it. A few hundred out-of-sample trades is a workable aim, and walk-forward analysis produces more of them from the same history.
How do you tell over-optimization from a real edge?
Run the neighbouring settings: a plateau where neighbours agree is a better sign than a single spike. Check that profit is spread across quarters, read the Monte Carlo range of drawdowns rather than one value, and discount the headline result for the number of variants the search tried.
Are backtests reliable at all?
They are reliable as a record of what a set of rules did on past prices under the costs, sessions and fill rules you set. They are not reliable as a prediction of future results. Treat the report as evidence to be checked, and let the six checks decide how much weight it carries.
References
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Bailey, D. H., & López de Prado, M. (2014). The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality. The Journal of Portfolio Management, 40(5), 94–107.
- Pardo, R. (2008). The Evaluation and Optimization of Trading Strategies (2nd ed.). John Wiley & Sons.

