What a Backtest Is

A backtest applies a set of trading rules to past prices to see how they would have performed. Here is what a backtest can tell you, what it cannot and how to read the results.

Rules meet history

A backtest takes precise rules, such as “own SPY when it closes above its 200-day average,” and runs them through historical data day by day. The output shows how an account following those rules would have grown, how deep its losses got and how often it traded.

Reading the results

MeasureWhat it tells you
Ending value or yearly returnHow much the rules earned over the period
Maximum drawdownThe worst peak-to-trough loss you would have lived through
Number of tradesHow active the rules are, and how much costs matter
Win rate and average win vs. lossThe shape of the results
Comparison with buy and holdWhether the rules added anything

Always compare against a simple benchmark.

A real example

In our backtest on SPY prices from March 2007 to September 2026, owning SPY only when it closed above its 200-day average turned $1 into $3.11, versus $5.30 for buy and hold. The worst drop was about 22%, compared with about 57% for buy and hold. The test excluded dividends and interest on cash, so both results understate real returns.

A real chart: SPY monthly bars, 2006 to 2026. Any backtest over this span must survive 2008, 2020 and 2022. Past performance does not predict future results.

What a backtest cannot tell you

Key takeaways

Study SPY’s long history on the Chart page