← Field guide · what a strategy is

What is a backtest?

  • A backtest replays a fully specified strategy against history and reports what it would have produced.
  • It is the only way to compare two ideas without spending years finding out.

What it is

  • You state the strategy in full. Structure, four numbers, universe, period, exit, costs.
  • The rules are replayed day by day against the prices that actually printed.
  • Every trade the rules would have taken is recorded, including the ones you would rather forget.
  • The output is a set of trades, not a verdict. The verdict comes from what you do with them.

What it is good at

  • Comparing two specifications on identical data.
  • Producing enough trades that the answer is not one lucky year.
  • Showing the worst stretch, which live experience delivers only once and expensively.
  • Killing ideas cheaply, which is most of the value.

What it cannot fix

Four limits. None of them is a reason not to backtest; all of them are reasons to read one carefully.

The limitWhat it means
The past is one sampleIt happened once. A strategy can be right about the mechanism and still meet a decade that does not suit it
Fills are assumedYou did not really trade. Every fill is a modelled price and the assumption has to be stated
You knew how it endedYou chose what to test knowing which years were good. That is a bias no amount of care removes entirely
You would not have held onThe test sat through the drawdown without flinching. You are not a test
  • The first three can be measured and bounded. Out-of-sample testing, stated cost assumptions and publishing how many variations were tried all help.
  • The fourth cannot. It is the honest gap between a result and a return.

Where it bites

The most dangerous backtest is the one that works. It is the point at which people stop asking questions.

  • Look-ahead: a rule that quietly uses information the day had not produced yet. It gives the best result on the page and the worst experience in the market.
  • Survivorship: testing on the names that still exist, which quietly removes the disasters.
  • Overfitting: enough settings tried and something always looks brilliant. A leaderboard always returns a winner, even on noise.
  • Silent defaults: a setting nobody chose doing the work — see a default is not an instruction.

What makes one worth believing

  • The specification is published, and it was written before the run.
  • Part of the history was held back and the result held up on it.
  • The number of things tried is stated.
  • The limits are named by the author, before anyone else has to point them out.

Common questions

How many trades does a backtest need?

More than most publish. A few dozen tells you almost nothing about a strategy that wins most of the time and loses rarely — the losses are the part you have not sampled.

Is a backtest the same as paper trading?

No. A backtest replays history quickly and can cover decades. Paper trading is slow and forward-looking, and it tests your behaviour as much as the rules.

Can a backtest prove a strategy works?

It can show a strategy would have worked, on that data, under those assumptions. That is worth a great deal and it is not proof.

Why publish the number of variations tried?

Because trying twenty things and showing the best one produces an impressive number from pure noise. The count is what lets a reader discount it properly.

How this shows up in our tests

Everything on this site comes from backtests, and none has published a result yet.

Two problems in our own data are holding them up, and both are recorded rather than worked around: a point-in-time question about how each trade was judged, and not yet being able to say which wins were quoted prices and which were modelled ones.