Guide
How to backtest a portfolio
To backtest a portfolio, write down the holdings, weights, rebalancing rule and benchmark, replay them on total-return prices over the longest period your holdings allow, and read return and worst fall together. Then try to break the result by moving the dates and nudging the weights: a backtest is only worth trusting if it survives that.
What a backtest can and can't tell you
A backtest replays a fixed plan on past prices: these holdings, these weights, this rebalancing rule, this benchmark, this period. It shows how the plan behaved in money terms through markets that actually happened: how deep the falls were, how long recoveries took, whether a change made any difference.
It can't tell you what happens next, and every backtest flatters you: you picked the holdings knowing how they turned out, you never panicked, and nothing cost anything unless you said so. Running one takes a minute. The skill is building one you can trust.
Below, each step comes with a follow-along box: we run one real example through all seven, so you can repeat it yourself.
Step 1: Write the rules down before you run anything
Decide everything first: holdings, weights, rebalancing rule, benchmark, period, and what result would change your mind. Then stick to it. The quiet trap is tweaking: nudge a weight, swap a fund, shift the start date, stop when the line looks good. After enough tries the winner is mostly luck. If you do change the rules, note every version you ran.
Follow along: our rules card
We'll test two mixes of the same three funds. 80/20 means four-fifths of the money in stocks and one-fifth in bonds, a growth-leaning mix; 60/40, three-fifths stocks and two-fifths bonds, is the classic balanced portfolio.
Rule Our choice Question How do a stock-heavy and a balanced three-fund mix compare, and what does each risk? Holdings VTI (US stocks), VXUS (international stocks), BND (US bonds) Mix A, 80/20 VTI 48, VXUS 32, BND 20 (percent of the portfolio) Mix B, 60/40 VTI 36, VXUS 24, BND 40 Rebalancing Back to target once a year Benchmark SPY, plus each mix judged on risk Period Longest all three funds share Would change our mind A mix whose worst fall we couldn't sit through
Step 2: Get the data right
- Total return, not price. Prices leave out dividends and interest, which understates stock returns and can make a bond fund look like it went nowhere.
- Only what you could have owned. The youngest holding sets where an honest test can start. A fund estimated back before it existed is not the fund.
- No hindsight in the holdings. Testing today's famous companies over the last decade asks a rigged question: they're famous because they did well. Broad funds avoid most of this survivorship bias.
- One currency. Convert everything into the currency you spend, or exchange-rate moves get mixed in unnoticed.
Follow along: all three funds are broad index funds, priced with dividends reinvested. VXUS is the youngest, so our test starts on 28 January 2011 and runs to 20 November 2026.
Step 3: Choose a period that includes bad times
Use the longest period every holding has data for, and make sure it includes real downturns of different kinds: a stock crash, a rate shock that hits bonds. A plan tested only in a bull market hasn't been tested. Then check how much the answer depends on the dates.
Follow along: same funds, two windows
Last 3 years: yearly return Last 3 years: Sharpe Full period: yearly return Full period: Sharpe 80/20 13.2% 1.08 8.6% 0.68 60/40 11.0% 1.13 7.1% 0.72 SPY 16.3% 1.05 13.2% 0.81 Over the last 3 years every line returned far more than its long-run rate, and on Sharpe ratio the 60/40 mix led SPY. Over the full period SPY led. Same funds, same rules, opposite verdicts. Our period has a gap too: it starts after 2008, so it can't show how these mixes handle a deep stock crash.
Step 4: Pick a fair benchmark
The benchmark answers "compared with what?" Pick the simplest thing you'd otherwise hold with similar risk. A stock portfolio against SPY is fair. A stock-and-bond mix against SPY alone isn't: it will usually lose on return, because holding fewer stocks is the point. Judge it on risk as well.
Follow along: more in stocks meant more growth, so SPY finished well ahead.
- Three-fund 80/20 $37,003
- 80/20, never rebalanced $43,095
- Three-fund 60/40 $29,544
- SPY $71,153
Full period: Indices Lab backtest, total return, mixes rebalanced yearly, single funds held throughout, 28 January 2011 to 20 November 2026. Hypothetical results: past performance does not predict future returns.
$10,000 in SPY grew to $71,153, in the 80/20 mix to $37,003, in the 60/40 mix to $29,544. The 80/20 mix trailed SPY by −4.6 points a year. That's not a failure of the mix; it's the price of its bonds. Whether the price was worth paying is a risk question, Step 6.
Step 5: Model how you would really run it
- Rebalancing. Without it, whatever grows fastest takes over, and your mix quietly turns into a different portfolio. Test the rule as part of the plan.
- Costs and taxes. Each rebalance can cost fees and, in a taxable account, tax. Frequent trading looks better on paper than in an account.
- Contributions. Adding money monthly is a different path from one lump sum.
Follow along: what rebalancing did
80/20 mix Yearly return Volatility Worst fall $10,000 became Rebalanced yearly 8.6% 13.5% 27.9% $37,003 Never rebalanced 9.7% 14.8% 30.5% $43,095 The never-rebalanced version ended with more money, and that's the trap. Stocks outgrew bonds, so it drifted into a more stock-heavy portfolio with bigger swings and a deeper worst fall. It isn't a better 80/20 mix; it stopped being one.
Step 6: Read the results, risk first
- Maximum drawdown and time to recover. The worst fall from a high, and how long it took to get back. Read this first: it's the moment real people sell. Picture it in money, not percent.
- CAGR, the yearly growth rate: the headline, and the easiest number to fool yourself with.
- Volatility and the worst calendar year: how rough the ride was.
- Sharpe and Sortino ratios: return per unit of risk. Good for comparing mixes over the same period, meaningless across different periods.
What to aim for isn't a number. It's a plan whose worst fall you could live with, that does its job against a fair benchmark, and that still looks sensible after Step 7.
Follow along: the full scorecard
| Basket | Yearly return | Volatility | Sharpe | Worst drop | $10,000 became |
|---|---|---|---|---|---|
| Three-fund 80/20 | 8.6% | 13.5% | 0.68 | 27.9% | $37,003 |
| 80/20, never rebalanced | 9.7% | 14.8% | 0.70 | 30.5% | $43,095 |
| Three-fund 60/40 | 7.1% | 10.3% | 0.72 | 22.5% | $29,544 |
| SPY | 13.2% | 17.1% | 0.81 | 33.7% | $71,153 |
Full period: Indices Lab backtest, total return, mixes rebalanced yearly, single funds held throughout, 28 January 2011 to 20 November 2026. Hypothetical results: past performance does not predict future returns. Sharpe uses a 0% risk-free rate.
And the falls, which tell the most:
- Three-fund 80/20 worst fall 27.9% (12 February 2020 to 23 March 2020), longest time below a previous high 2.3 years
- 80/20, never rebalanced worst fall 30.5% (19 February 2020 to 23 March 2020), longest time below a previous high 2.2 years
- Three-fund 60/40 worst fall 22.5% (8 November 2021 to 14 October 2022), longest time below a previous high 2.4 years
- SPY worst fall 33.7% (19 February 2020 to 23 March 2020), longest time below a previous high 1.9 years
Full period: Indices Lab backtest, total return, mixes rebalanced yearly, single funds held throughout, 28 January 2011 to 20 November 2026. Hypothetical results: past performance does not predict future returns.
The 60/40 mix's worst fall wasn't the Covid crash: it came in 2022, when stocks and bonds fell together. It returned −16.1% that year against SPY's −18.2%, and spent 2.4 years below its previous high, against 1.9 years for SPY. The bond cushion didn't cushion. Over the full period the 60/40 mix still had the smaller worst fall and the steadier ride; you only see both sides by reading the whole picture.
Step 7: Try to break your result
A result you can trust is one you tried to break and couldn't:
- Move the dates. Start earlier and later; look at rolling periods. (Step 3 did this.)
- Nudge the weights. If a few points change everything, the result is fragile.
- Split the history. Pick the mix using the first half of the data, then test it on the second half. Most optimized portfolios fail this.
- Remove the star. Drop the best performer. If the plan only worked because of one holding, that's your real bet.
- Compare with the dull option. Equal weights or one broad fund. If the clever version barely beats it, the complexity isn't paying.
Follow along: year by year
Year 80/20 60/40 SPY 2018 −7.2% −5.4% −4.6% 2020 +15.0% +13.2% +18.3% 2022 −17.1% −16.1% −18.2% Neither bad year follows the textbook story. In 2018 both mixes lost more than SPY despite their bonds, and in 2022 the 60/40 mix lost nearly as much as SPY. The reason is in the holdings: the mixes also own international stocks, which SPY doesn't. When a result surprises you, check what each holding did before you draw a lesson, and test more than one kind of bad year.
A checklist before you trust any backtest
- Rules written down before the first run, and every version you tried noted
- Total-return data; every holding existed for the whole period
- Real downturns in the period, and the result checked across windows
- A benchmark with similar risk, not just the stock market
- Rebalancing rule fixed; costs and taxes added or known to be missing
- Worst fall and recovery read before return
- The result survives moved dates, nudged weights and a split history
- Remembered: it's the past, not a forecast
Our methodology explains how every figure here is calculated, and how rebalancing works goes deeper on Step 5. To run your own, start with the portfolio backtest or the preview.
Questions
How far back should a backtest go?
As far as every holding has real data, and long enough to include at least one serious downturn. If your holdings are young, say so in your conclusions or use funds that existed earlier for the same exposure.
Should dividends be included?
Yes. Use total-return prices adjusted for dividends and splits; price-only data understates stock and bond returns and can reverse a comparison.
What is a good result for a backtest?
There is no single number. A good result does what the plan was built for against a fair benchmark, has a worst fall you could sit through, and holds up when you move the dates or change the weights slightly.
How do I avoid overfitting a backtest?
Fix the rules before you run, keep count of the versions you try, prefer simple rules, and test the chosen mix on a period you didn't use to pick it.
Is a backtest a forecast?
No. It shows how a plan behaved in markets that already happened. Use it to understand risk and compare options, not to predict returns.
About this page. Figures on this page come from Indices Lab’s own data, powered by EODHD, and every number is recalculated after each market close; the text is reviewed by a person before it is published. Indices Lab is a research and educational tool: everything here is hypothetical and informational, not investment advice and not a recommendation to buy or sell any security. Past performance does not predict future results. See our methodology.