A backtest takes a portfolio allocation and looks at how it would have behaved in the past. You choose the weights, for example 60% in stocks and 40% in bonds, and the engine applies them to prices that were actually recorded in a period that has already ended. The result tells you how much that portfolio would have grown and how far it would have fallen in the hard stretches. It describes a path that already happened, and it does not say what will happen in the years ahead.
What it is for
A backtest is there to show the character of an allocation before you invest in it. It shows how the capital grew, how deep the declines were, how much the value swung (the volatility), and how the assets moved relative to one another.
It is especially useful for comparison. If you put two allocations on the same period, you can see which one fell further in the worst stretches, and whether the extra return of one of them was worth the extra swings it asked for.
You can also look at how the portfolio behaved in the hardest market years, such as the collapse of technology stocks in 2000-2002, the financial crisis of 2008-2009, or the sudden drop of 2020. For those years to show up, two conditions have to hold: the instruments you chose need prices that go back that far, and the backtest period has to be able to include them. On the Free plan, history goes back at most 10 years, so 2000-2002 and 2008-2009 stay out of range, and of the three crises only 2020 remains visible. With Plus and Pro the engine uses the full history available for the instruments you chose.
The result holds for the period you chose and does not stretch by itself to other years. Ten years of the American stock market, for example, tell the story of that market in that decade, and the next decade can go very differently. The links between assets change too: the correlations between stocks and bonds can become stronger or weaker from one period to the next. Over time, fund costs, taxation, and the instruments you can buy also change. A backtest is the account of those years. It helps you see how a portfolio behaves, and it does not tell you what it will return in the future.
How the engine works
BacktestFolio simulates the portfolio you set up. You choose the instruments, the weights, the base currency, and the period, and you can add periodic contributions with a DCA plan, rebalancing, and the annual fund costs (TER).
Prices come from the site's historical data. The simulation starts on the first day when every chosen instrument has a price, and it ends on the last day available for all of them. If one ETF has data from 2005 and another only from 2010, the simulation starts in 2010. Every instrument is then present for the whole period, even when that period turns out shorter than the one you asked for.
Rebalancing, if you turn it on, brings the weights back to the shares you chose, at the frequency you set. Without rebalancing, the ending weights can drift from the starting ones, because each asset grows at its own pace and the one that rises more ends up taking a larger share of the portfolio. After a few years, what started as a 60/40 can have different proportions.
DCA contributions also enter the simulation. The final value then depends both on how markets moved and on when and how much you contributed. To keep the two apart, next to the equity curve the site shows two measures of return. One removes the effect of contributions and looks only at how the investments did (TWRR). The other also counts the money added over time.
How to read the result
The starting point is the equity curve, the value of the simulated portfolio day by day. The moves you set are already inside it, including contributions and rebalancing, and the other measures are calculated from this curve.
The CAGR is the compound average annual return: the constant rate which, applied every year, would take the starting capital to the final value. It is an average that smooths the path. A CAGR of 7% can contain a year at +30% and another at −25%, and it can happen that no single year returned exactly 7%.
The maximum drawdown is the largest decline, in percent, from the highest point reached so far to the lowest point that comes after it. A maximum drawdown of −35% means that at some point the portfolio lost more than a third of its value from the previous peak, before it recovered. It is the loss someone would have taken by entering exactly at the peak and leaving exactly at the trough. Two portfolios with the same CAGR can have very different drawdowns: one may have lost a fifth along the way, the other almost half. For someone who invests, the difference weighs, because a decline of half is much harder to sit through without selling.
Volatility is the annualized standard deviation of returns, that is, how far returns stray on average from their own average. The higher it is, the more sharply the portfolio value rises and falls. Volatility treats moves up and moves down the same way: two funds can share the same volatility even if one mostly jumped up and the other mostly fell. That is why it is worth reading it together with drawdown and, when you need them, with the ratios that set return against risk, such as Sharpe and Sortino. Sharpe divides the return above the risk-free rate by the whole of volatility. Sortino divides it only by the part of volatility that sits below a threshold, so it counts only the downward swings.
VaR and CVaR focus on the worst losses, and they are worth reading as a pair. VaR at 95% is a threshold: in the period under review, 95% of returns were better than that value, and only the worst 5% went beyond it on the downside. VaR does not say how much was lost in that 5%. CVaR does. It is the average of the losses that went past the VaR threshold. Take an example with made-up numbers. If VaR at 95% is 2% and CVaR is 3%, then in 95 cases out of 100 the loss stayed under 2%, and in the 5 worst cases the average loss was 3%. VaR marks where the zone of the worst losses begins. CVaR says how heavy they were on average. Both are calculated on the returns of the same period as the curve.
An example
For this example we use a public table, not the BacktestFolio engine, so anyone can redo the calculation in a spreadsheet and check every figure. The engine's result on a 60/40 built from ETFs is already calculated in the 60/40 Demo on the Backtest page.
The source is the table Historical Returns on Stocks, Bonds and Bills by Aswath Damodaran (NYU Stern), updated on 5 January 2026. We use the calendar years from 2005 through 2024, twenty full years. The table also reports 2025, but here we stop at 2024. The equity side is the S&P 500 with dividends, and the bond side is the 10-year US Treasury.
The calculation is simple. For each year the portfolio return is 60% of the S&P 500 return plus 40% of the Treasury return. Doing it that way is the same as rebalancing the portfolio at year-end back to 60/40. The calculation has no costs, no taxes, and no contributions.
A capital of 1 at the start of 2005 becomes 4.44 at the end of 2024. The CAGR over the twenty years is 7.7%: starting from 10,000, with no contributions, you arrive at about 44,400.
2008 shows what the mix does. That year the S&P 500 loses 36.6%, while the 10-year Treasury gains 20.1%, and the 60/40 portfolio closes with a loss of 13.9%.
The largest decline measured on year-end values is 18.0%, from the end of 2021 to the end of 2022, a year in which stocks and bonds fell together. This figure looks only at year-end closes. A backtest on daily prices also sees the lows touched during the year, so its drawdown can come out wider. The annual table does not contain those data.
The same calculation on other periods gives very different results. With the same weights the CAGR is 2.9% between 2000 and 2009 and 9.9% between 2010 and 2019. Weights and method are identical, so the difference comes only from the period.
Keep in mind that this 60/40 is an American stock index plus an American government bond. The site's 60/40 Demo uses ETFs, and a portfolio diversified across the world holds other instruments, so its figures would be different.
Limits to keep in mind
Survivorship bias arises when the data keep only the instruments that are still alive. Funds and ETFs that were closed, merged, or liquidated drop out of the historical series. If what disappeared was mostly what did worse, the average on the survivors sits above the average actually earned by someone who had invested in that category at the start. Stephen J. Brown, William Goetzmann, Roger G. Ibbotson and Stephen A. Ross studied one effect of this in a 1992 article in the Review of Financial Studies (volume 5, number 4, pages 553-580). They show that dropping from the sample those who do not survive can make good results look as if they repeat over time, even when the effect depends only on who remained.
Look-ahead bias arises when the simulation uses a piece of information that, on the simulated date, was not yet available. It happens, for example, if a quarterly earnings figure is treated as known on the closing day of the quarter, when it is published only later. It also happens when the weights are chosen by looking at the whole period and then “tested” on that same period: the test confirms a choice that was made with the result already known. Gilles Daniel, Didier Sornette and Peter Wöhrmann, in a 2008 paper (arXiv 0810.1922), measured a variant tied to indexes. If the basket is built from the stocks that belong to the index at the end of the period, the set of companies is different from the one an investor could have bought at the start. On their sample, CRSP data from 1926 to 2006 on the 500 largest American companies by market value, the return gap reaches up to 8 percentage points a year.
Rolling windows need a careful reading too. If you calculate the 3-year return starting from every month, two neighboring windows share almost all of their months. There are many windows, but the episodes that truly differ from one another are far fewer, and the results can look more solid than they are.
The costs put into the model, the TER and transaction costs, are also a simplification. With heavily traded instruments and few trades, the gap versus reality can be small. With illiquid instruments, or with frequent rebalancing, the real cost goes above the TER stated in the prospectus, because each trade adds spread and commissions.
In BacktestFolio
On the Backtest page you choose the assets, assign the weights, set the period, and decide whether to rebalance and which costs to apply. The engine calculates the equity curve, with its drawdown and its volatility. It also calculates the Sharpe and Sortino ratios, VaR and CVaR, the correlations between the assets, and the effect of inflation on the real value of capital.
You can run the first calculation as a guest; from the second one you need an account. On the Free plan, history goes back at most 10 years, while Plus and Pro use the full history available. With Plus and Pro you can also compare two allocations side by side, and with Pro you can download the report as a PDF. The goal and withdrawal analyses on your own portfolios are on the Plus and Pro plans. The 60/40 Demo on the same page already shows a calculated result, with the goal and withdrawal analyses visible.
If this is your first backtest, the guide Create your first backtest walks through the fields one by one. Once you have compared a few instruments and want a clearer reading of Sharpe and Sortino, you can move on to the guide on Risk-adjusted metrics: Sharpe, Sortino and Calmar. If you are still choosing between ETFs and mutual funds, the guide How to compare ETFs and funds explains the differences before you get to the numbers.
Frequently asked questions
Are two portfolios with the same CAGR equivalent?
CAGR only says the average pace at which capital grew from the start to the end. It leaves out drawdown, volatility, and the order in which the good years and the bad years arrived. Two portfolios with the same CAGR can therefore have gone through very different losses in between.
Does the backtest include costs?
You can set the TER in the model, and rebalancing moves the weights on the dates you choose. Trading commissions and the spread stay out, and the same is true of tax on capital gains, unless you have entered them among the costs. The result is therefore before everything the model does not take into account.
Why does my backtest start later than the date I chose?
The engine uses only the period in which every instrument in the portfolio has a price. If one of the instruments was launched after the start date you entered, the simulation begins on its first trading day. On the Free plan the limit of 10 years of history also applies.
On the Free plan, can I see how the portfolio would have done in 2008?
No. On the Free plan, history goes back at most 10 years, so the crisis of 2008-2009 stays outside the period. With Plus and Pro the backtest uses the full history available, and 2008 shows up if the instruments you chose have prices going back to those years.
See also
- Glossary: CAGR, Drawdown, Volatility, TWRR, TER, Survivorship bias, Look-ahead bias
- Guide: Create your first backtest
- Guide: How to compare ETFs and funds
- Guide: Risk-adjusted metrics: Sharpe, Sortino and Calmar
The content on this page is for educational purposes only and does not constitute financial advice, investment recommendation or promise of return. See the Financial Disclaimer.