Skip to content

Crypto guide

Backtesting a trading strategy on past data

Updated on

Paper money – Not investment advice

A backtest applies a trading rule to historical prices to see how it would have behaved. It is a checking tool, not a crystal ball.

What a backtest is

The US SEC puts it this way: back-testing applies a strategy to past market conditions to show how it may have performed. Back-tested performance is hypothetical and does not reflect actual performance (SEC / Investor.gov).

The steps of a backtest

  1. Write a precise rule: when to enter, when to exit, what position size.
  2. Pick a long period that contains both rises and falls.
  3. Include realistic fees and price slippage.
  4. Read the results: total gain or loss, worst drop (drawdown), number of trades, share of winning trades.
  5. Check the rule on another period it has not "seen".

On the Trading bot page, bots are tested on real historical prices with simulated fees and slippage, and the optimiser checks every setting on a period it has not seen. Everything stays in paper money.

Traps to avoid

  • Overfitting: tuning a rule until it fits the past perfectly. It is then likely to fail.
  • Cherry-picking: showing only the good periods. The SEC warns about "cherry-picked" performance.
  • Forgetting fees: many small trades can turn an apparent gain into a loss.
  • Confusing past and future: past performance does not predict future performance.

After the backtest

Keep going with paper money in the simulator to see the rule on live prices, and read the charts in Analysis. For exit rules, see Stop-loss and take-profit explained.

Tools to practise

Sources

Official or primary pages consulted on 22 November 2026.

Read next

← All guide articles

The morning crypto brief

Get the crypto brief every morning

A short email around 8 am (Paris time): the day's major cryptos, to learn with play money. Free, one-click unsubscribe.

Play money - Not investment advice

Paper money – Not investment advice