How to Backtest a Trading Strategy That Holds Up Live
A backtest is a claim about the future dressed up as a report about the past. Done honestly, it is the cheapest information in trading: it shows what your rules would have done through conditions you did not choose. Done the usual way, it is a machine for manufacturing confidence, and the bill for false confidence arrives during the first live losing streak.
What a backtest can and cannot tell you
It can tell you three things with reasonable reliability: whether the edge existed at all in that data, what the losing streaks and drawdowns looked like along the way, and how often the strategy actually trades. That last one is underrated. A strategy producing four signals a month will be overridden by a bored trader long before it proves anything.
It cannot tell you what returns to expect next year, and it cannot test you. Your patience, your fills under pressure, and your willingness to take signal number seven after six straight losers all live outside the data.
Enough samples, or the numbers are noise
Small samples lie with a straight face. Take a strategy whose true win rate is 55%. Simple binomial arithmetic says the measured win rate wobbles around the truth, and the wobble shrinks slowly:
| Trades in the sample | Typical wobble on a true 55% win rate |
|---|---|
| 30 | about ±9 points |
| 100 | about ±5 points |
| 300 | about ±3 points |
So a 30-trade backtest showing 63% is entirely consistent with a strategy that has no edge at all having a decent fortnight. Before a few hundred trades you do not have results, you have anecdotes.
The same logic applies inside the sample. If a filter splits 300 trades across six market conditions, each condition holds fifty trades and the per-condition numbers are back to being noise. Every rule you want to evaluate needs its own adequate sample, which is the quiet reason simple strategies are easier to validate than clever ones.
Honest fills: the spread is part of the strategy
Most self-run backtests fill at prices nobody was offering. Test on mid prices or last-traded prices and every entry and exit is a small fiction, and the fictions compound.
Charge yourself the real costs. Two hundred trades at a one pip round-trip cost, $10 per pip on a standard lot, removes $2,000 from the equity curve at one lot of size, before any slippage. For a strategy targeting 60 pips a trade, that is an accounting detail. For one targeting 6 pips, it is the whole story: a scalping system showing +15% on frictionless fills can be flat or negative once every trade pays its pip.
Stops deserve extra suspicion. They fill at the market's price, not yours, and fast markets fill them worse. An honest test charges full spread on every trade, a slippage allowance on every stop, and swap on anything held across days.
Out-of-sample: the overfitting tripwire
Overfitting is what happens when rules stop describing a market and start memorising a dataset. Every parameter tuned against the full history makes the backtest better and the forecast worse.
The defence is boring and non-negotiable. Build the strategy on one stretch of data, then run it untouched on a stretch it has never seen. Some degradation out-of-sample is expected. Collapse is a verdict.
Memorised strategies are recognisable. Rules that exist to dodge specific historical losses. Performance with a cliff in it, profitable at a setting of 20 and ruinous at 22, which means the edge lives in a coincidence. A rule list that grew every time the previous version showed a losing month. If a small parameter change flips the outcome, there was never an edge, only a fitted curve.
Forward testing: the cheapest tuition available
Paper results survive contact with live markets in stages, so stage it deliberately. Run the strategy forward on a demo or simulated account, where the fills are honest and the money is not, and journal every trade against the backtest's assumptions. Gaps between the two are execution slippage, cherry-picking, or a market that moved on, and all three are cheaper to discover before a fee is on the line.
Size the forward test from the backtest's worst streak, not its average; position sizing built on the best case is a plan to be surprised. When the forward numbers hold, the evaluation itself becomes the final forward test with rules attached, which is the right frame for passing a challenge: same strategy, same size, now with a fee at stake, and on FFUNDED's Advance and Scale plans that fee is refundable. The account is simulated capital throughout the whole journey; what the process protects is the real-money payouts on the other side of it.
Frequently asked questions
How many trades does a reliable backtest need?
A few hundred as a floor, and more if the strategy has several rules or trades several conditions, because each subdivision needs its own sample. At 30 trades, the measured win rate can sit nearly ten points from the truth on luck alone. Undersized samples are the most common reason backtests fail live.
Should a backtest include spread and slippage?
Yes, on every trade, otherwise the results describe a market that does not exist. Charge the full round-trip spread, add a slippage allowance on stop fills, and include swap on positions held overnight. Short-target strategies are the most sensitive: a one pip cost against a six pip target consumes a sixth of every winner.
What is out-of-sample testing?
It means validating a strategy on data that played no part in building it, for example designing rules on two older years and then testing untouched on the most recent one. It exists because tuning rules against the full history produces strategies that memorised the past. Mild degradation out-of-sample is normal; collapse means the edge was fitted, not found.
How long should I forward test before paying for an evaluation?
Until you hold a sample you would defend, not a fixed number of weeks. A frequent intraday strategy can produce a hundred forward trades in a few weeks, while a swing approach may need months to produce thirty. The forward record should match the backtest's character, its win rate, streaks and costs, before an evaluation fee rides on it.
Ready to get funded?
Join the FFUNDED waitlist and be first to get funded for your CFD, futures, and crypto trading.
Join the waitlist