Trading term

What is Backtesting?

Backtesting runs a precisely defined set of trading rules over historical data to see how they would have performed on it. It is the cheapest way there is to reject a bad idea, and a poor way to prove a good one.

The mechanics are simple: define entry, exit and sizing rules precisely enough to be applied mechanically, run them across past data, and record the results. What you get is an equity curve, a win rate, an expectancy and a maximum drawdown — a rough sense of whether the idea has any edge at all.

Its real strength is elimination. Most trading ideas are simply bad, and a backtest kills them in minutes rather than months of live losses. That alone justifies the exercise. What it cannot do is prove that an idea will keep working, because the future is not a resample of the past.

The discipline that separates useful backtesting from self-deception is holding data back. Develop on one period, then test once on a period you have never looked at. If performance holds up out-of-sample, you have weak evidence of an edge. If it collapses, you fitted the noise — and if you then go back and re-tune, the held-out data is contaminated and no longer tells you anything.

The test that happens on data you held back
IN-SAMPLE (tuned on this)OUT-OF-SAMPLE (never seen)over-fitted +45R-11R out-of-samplehonest +10R+0.20R per trade in-sample → +0.20R on unseen data.Holding data back is what makes the in-sample result mean anything at all.

The honest system returns +0.20R per trade in-sample and the same again on 20 trades it has never seen. Holding data back is what makes the first number mean anything.

For example

A system tested over 30 trades returns +6R at +0.20R per trade. Run forward onto 20 trades it has never seen, it returns another +4R at the same expectancy. The out-of-sample result is what makes the in-sample result believable.

Go hands-on in Premium

That's Backtesting in theory — it clicks when you read it on a live chart. Practise it hands-on in the TradeWize Premium Trading Psychology & Risk track.

Explore Premium →

Why it matters to you

Backtesting converts 'this looks like it works' into a number, and it does so before any money is at risk. Even when the results are not predictive, defining rules precisely enough to test them forces a clarity most discretionary traders never reach.

Backtests are optimistic by construction

Historical data has survivorship bias, fills are assumed perfect, and spread, commission and slippage are routinely understated or omitted. Add in look-ahead bias — using information that wasn't available at the time — and a backtest reliably overstates performance. Treat the result as a ceiling and subtract generously.

Frequently asked questions

What is backtesting?

It's testing a set of trading rules against historical data to see how they would have performed. It produces an equity curve, win rate, expectancy and drawdown without risking any money.

Is backtesting reliable?

It's reliable for rejecting bad ideas and unreliable for confirming good ones. Historical results overstate performance because of optimistic fills, omitted costs and the ever-present temptation to tune the rules until the past looks good.

What is out-of-sample testing?

It's holding back a portion of the data, developing the strategy on the rest, then testing once on the untouched portion. It's the main defence against curve-fitting — but only if you don't go back and re-tune afterwards.

How many trades does a backtest need?

Enough that a handful of results can't dominate the outcome — a few hundred is a common minimum, and more for rare setups. A backtest over 30 trades tells you almost nothing regardless of how good the numbers look.

Related terms

← Back to the full glossary