Guides · Updated

How to read a backtest without fooling yourself

A backtest replays a trading rule on past prices. It is useful, and it is very easy to make one say whatever you hoped.

Open the backtest tool →

What a backtest is

A backtest takes a rule, such as “buy when the price closes above its 100-day average”, and applies it day by day to a history of prices, recording what would have been bought and sold and what the account would have been worth.

It answers a narrow question: what would this exact rule have done on this exact history? It does not answer what the rule will do next.

Four ways a backtest misleads

Five questions to ask

Training and test periods

The simplest protection is to split the history. Settings are chosen on the earlier part, the training period. The rule is then run once on the later part, the test period, and that is the number you report. If a rule shines in training and fades in the test, it was fitted to the past and not to anything lasting.

What the tools on this site do

Every study in the Research Lab keeps a test period apart, compares with a benchmark, charges costs, and shows all the settings it tried and not only the winner. Practice data is simulated and labelled, and results from your own files stay in your browser.

Common questions

What is overfitting?
Overfitting is tuning a rule so closely to past data that it captures that data’s accidents instead of anything that will repeat. An overfitted rule looks excellent in the period it was tuned on and ordinary or worse afterwards.
What is drawdown?
Drawdown is the fall from a previous high to a later low, as a percentage. The maximum drawdown is the deepest such fall in the period. It measures how bad it got along the way, which a final return hides.
What is the Sharpe ratio?
It is the average return earned above cash, divided by how much the returns swung. A higher figure means more return for each unit of ups and downs. It says nothing about rare large losses.

Try it

Reading about a rule is not the same as watching it run. The study is free, needs no account, and starts on practice data.

Open the backtest tool →

More guides

Educational explanation with illustrative examples. Not financial advice, and not a recommendation to use any strategy.