How to backtest an ETF portfolio: a guide to portfolio backtesting
Backtesting an ETF portfolio means trying out how a split across ETFs would have performed in the past, with a starting amount, regular contributions, rebalancing and costs. This guide shows step by step how a portfolio backtest works in Portfolio Lab: search for securities, enter weights for up to three portfolios, set your assumptions, then read and export the results. It also includes a worked example you can recalculate and the typical mistakes that make a backtest look too good.
What a backtest shows and what it doesn't
A backtest is a simulation with real prices: it applies a fixed rule (say 70% equity ETF and 30% bond ETF, rebalanced quarterly) to a past period and calculates, period by period, what would have become of the money. It shows how deep the falls were in crises, how long the recovery took and what costs and taxes took away. It cannot predict the future. It shows a single past, and every metric derived from it is an estimate with uncertainty (see Sharpe ratio). For a range of possible paths, the Monte Carlo simulation is a useful complement.
Step 1: find securities
At the top of the Backtest page is the portfolio grid: the rows are securities, the columns up to three portfolios. The search field above it (“Add a security or asset class”) accepts fund names, ISIN, WKN (the German securities code) or ticker symbol. The suggestions come from the app's securities database; if there is no ticker yet for an ISIN, the server looks for the matching price data, which can take a few seconds. A hit lands in the grid as a new row, with its name, type and TER shown next to it.
An ETF is often listed on several exchanges; under Securities, “Check history of all hits” shows which listing goes back furthest. Instead of a security, you can enter an asset class: long monthly series (calculated in euros and converted into your base currency) with an @ in front, such as @AKTIEN_WELT or @BUND_10J. There are 202 of them, listed under Asset classes. If a component shows “Faulty price data?”, the data checks have found suspicious jumps, frozen prices or gaps; a click opens a dialog with the findings.
Step 2: weights for up to three portfolios
In each column you enter the weights in percent; you can rename a portfolio directly in the column header. Below the header, a bar shows the split, along with the total, the number of positions and the weighted TER. If the total differs from 100%, it is highlighted in yellow and scaled to 100% for the calculation; the backtest skips empty portfolios. The buttons “Equal weight” and “To 100%” help with data entry, and “Clear” resets the grid.
Under “Templates” you will find starting points, from classic lazy portfolios with US index funds to mixes of asset classes with a long history. A template loads its allocation into the selected portfolio and adds any missing securities. It is a starting point for your own tests, not a recommendation. With “Sets” you save the grid, portfolios and assumptions in your account, load them again later or download them as a file. The grid is the same on every page: whatever you enter here is also available in Optimization, Monte Carlo and Look-through.
Step 3: set the period, currency and interest rate
Period, base currency, data frequency, risk-free rate and inflation are not part of the form but are set under Settings. At the top of the backtest page, small buttons show the current settings and take you there. They apply to all pages.
| Setting | Default | Purpose |
|---|---|---|
| Base currency | USD | All prices are converted at daily exchange rates; you can also choose EUR, GBP, CHF, JPY, CAD, AUD or each security's local currency |
| Data frequency | monthly | month-end or daily prices; with asset classes the app always calculates monthly |
| Period | from 1970 to today | desired start and end; the backtest actually begins only once all components have prices |
| Risk-free rate | fixed rate of 2% p.a. | for the Sharpe ratio, Sortino ratio and alpha; alternatively the money market rate of the currency |
| Inflation for real values | US | real final values and real CAGR; you can also choose Germany, the euro area, Switzerland, the UK or none |
The header of the result names the security that limits the start (“start limited by …”). This is the most common reason for a backtest being shorter than expected. Step 6 shows how a proxy extends the history.
Step 4: starting capital, contributions and withdrawals
The “Assumptions” card begins with the starting capital (default 10,000). Under “Cash flows” you choose “None”, “Savings plan”, “Withdrawal” (fixed amount) or “Withdrawal %” (share of wealth per year, default 4%). For a savings plan or a fixed withdrawal, you set the amount per date (default 500) and the frequency: monthly, quarterly or annually. The amount can grow by an additional annual increase or rise with inflation. Cash flows are booked at the end of the period.
For a backtest with regular ETF contributions that works as it would at your broker, turn on the switch “Savings plan and trading costs as at your broker” in the “Costs and taxes” card. Then choose an execution day between the 1st and the 28th of the month (the app uses daily prices internally for this) and how contributions are allocated: by target weight or “Underweight first”, i.e. first into positions below their target weight. This is rebalancing without sales.
Returns are time-weighted. Deposits and withdrawals change the final value, but not the CAGR, volatility or Sharpe ratio (see time-weighted return). With regular contributions, the final value is therefore the number to compare with the sum of your contributions.
Step 5: rebalancing and costs
For rebalancing you can choose “No rebalancing”, “Monthly”, “Quarterly” (default), “Semi-annually”, “Annually” and “Tolerance band”. The band (default ±5 percentage points) triggers a rebalancing as soon as a weight drifts that far from its target. Trades are made at the closing price of the last trading day of the period.
Costs come at three levels. The TER is already included in the fund prices and is not deducted a second time. Additional costs p.a. (up to 5%) come on top, for example for discretionary portfolio management. Trading costs are calculated by the app when you use the switch “Savings plan and trading costs as at your broker”: a fixed and a percentage order fee with a minimum amount, a fee per savings plan execution and the bid-ask spread, half of which is incurred on each purchase and each sale. The Neobroker, Online bank and High-street bank templates are sample values, not the prices of any particular provider.
Step 6: benchmark and a longer history
As the benchmark you choose a ticker or an asset class (“e.g. MSCI World or ^GDAXI”). It runs with the same inflows and outflows and trading costs, but without additional costs. With a benchmark and at least six common periods, you also get beta, alpha, R², tracking error, information ratio, Treynor ratio, M² and upside and downside capture.
Many ETFs have only existed for a few years. A proxy extends the history: before the ETF's first price, the app attaches the returns of a related series, and the level joins up with the first real price. You set the proxy with the “Proxy” button in the row. “Suggest proxies” adds a suitable series for every component without a proxy (a fixed mapping or an asset class of the same category) and only applies it if it starts at least one year earlier. With your own proxies, make sure they include dividends: a price index understates the return by the dividend yield. Because asset classes have monthly values, the backtest calculates monthly when they are used.
Step 7: read the results
“Start a backtest” calculates all portfolios. The header of the result names the period, the data frequency and the security that limits the start; notes from the data checks appear in a box. Below that is a card for each portfolio with final value, CAGR, total return, volatility, maximum drawdown, Sharpe ratio and Sortino ratio. Then comes the performance chart: linear or logarithmic, nominal or real in purchasing power at the start. For long periods the logarithmic scale is the better choice, because equal percentage changes have the same height on it.
| Tab | What you see there |
|---|---|
| Key metrics | all values in groups: wealth, return, risk, risk-adjusted, against the benchmark and withdrawal (safe and perpetual withdrawal rate) |
| Drawdowns & crises | decline from the peak, the largest drawdowns with peak, trough, recovery and duration, and nine crisis periods from the 1973/74 oil crisis to the 2022 interest rate turnaround, as far as covered |
| Calendar years | annual returns with inflation and the return triangle for every pair of start and end year |
| Months | monthly returns per year as a color-coded table |
| Rolling | rolling returns p.a. over windows of 1 to 20 years, as far as the history allows, and a summary for 1, 3, 5, 7 and 10 years |
| Trailing | trailing returns over 3 months, year to date, 1 year and 3, 5 and 10 years p.a. |
| Contributions | each position's share of the gain and the risk |
| Market phases | only with a benchmark: months with a rising and a falling benchmark |
| Weights | actual weights between the rebalancing dates and the average turnover |
| Single assets | metrics per security over the common period, and correlations |
| Leverage | only when switched on: metrics without and with leverage |
Example: recalculating CAGR and max drawdown
A mixed portfolio with eight annual returns shows how the most important figures come about (illustrative figures, not real prices):
Portfolio Lab applies the same formulas to monthly or daily returns. For the CAGR, the app counts the years as the days between the first and the last return divided by 365.25, plus one period; monthly data from the end of January 2018 to the end of December 2025 thus gives 7.998 years. With monthly values, the max drawdown usually turns out deeper than with annual values, because troughs within a year become visible. The −15% in the example is therefore more of a minimum. More on this under CAGR, maximum drawdown and volatility drag.
Export, report and sharing
“Export” creates a report as an A4 PDF or as an HTML file with interactive charts. There are also CSV files for Excel with commas as separators and decimal points: metrics, value history, period returns, annual returns and trailing returns. “Share” creates a link to the backtest that captures the settings at the time of sharing; anyone who opens it sees the backtest and can copy it into their own. If you like, the app also draws an image for sharing (PNG, 1,200 × 627 pixels).
For advanced users: schedules, leverage and statistics
- Time-varying weights: the “Weights over time” card replaces the fixed weights of a portfolio with a table of weights from a given date, a glide path to another portfolio as in a target-date fund, a switch when the portfolio reaches a given value, or a file with signals from your own model. One example is the calendar rule in the article Seasonality.
- Leverage: the “Leverage” card replicates leveraged ETFs: price return times leverage in each period, financed at the money market rate plus a spread (see methodology, section on leverage).
- Uncertainty: a Sharpe ratio from ten years of monthly data has a standard error of around 0.3. If you compare several variants and pick the best, you should raise the bar (see deflated Sharpe ratio).
What research shows about backtests
Three findings matter for every ETF backtest. First, survivorship bias distorts the results: Brown et al. (1992) show that datasets containing only surviving funds also distort rankings and apparent persistence. Second, published patterns shrink: for 97 variables, McLean and Pontiff (2016) found returns 26% lower outside the original sample and 58% lower after publication. Third, the best Sharpe ratio grows with the number of trials, even without any real edge (Bailey and López de Prado 2014). And according to Dichev (2007), investors' money-weighted returns were below buy-and-hold returns because of badly timed inflows and outflows.
Common mistakes
- Survivorship bias: the securities database contains securities that can be traded today. Closed funds are missing; if you take today's winners back into the past, you see a world that looks better than it was.
- Too short a history: ten years of rising markets say little. Extend the history with proxies or asset classes until it includes at least one severe crisis and one interest rate turnaround.
- Overfitting: if you keep shifting weights until the backtest shines, you are fitting them to chance. Fix the rule in advance and test it over a different period (backtest overfitting).
- Currency: a fund in euros or another foreign currency, measured in US dollars, carries currency risk. Pay attention to the base currency in the settings and to currency-hedged share classes (currency risk).
- Forgetting costs: without them, frequent trading looks too good. Turn trading costs on when you compare strategies with many switches.
- Cherry-picked period: a start shortly after a crash or an end at a peak distorts the CAGR; the return triangle and rolling returns show how much the result depends on the starting point.
How Portfolio Lab calculates
The basis is prices with reinvested distributions, converted into the base currency. The backtest starts on the first common trading day with the target weights and, in each period, books price return, additional costs, contribution or withdrawal and rebalancing in a fixed order. All metrics are derived from the time-weighted period returns; the Sharpe ratio uses excess returns over the risk-free rate per period. Trades are made at the closing price of the same day; in practice, you would only get to trade after that. The data checks report anomalies as notes; the only data altered are isolated outlier days that reverse on the following day. Full details are in the backtest methodology and the metrics methodology.
Frequently asked questions
How can I backtest an ETF portfolio?
In the Portfolio Lab backtest, search for the ETFs by name, ISIN, WKN or ticker, enter weights for up to three portfolios, choose starting capital, contributions, rebalancing and costs, and click “Start a backtest”. Period, currency and interest rate are in the settings.
Can I backtest monthly ETF contributions?
Yes. Under “Cash flows”, choose “Savings plan” and enter the amount and frequency; with “Savings plan and trading costs as at your broker” you also get the execution day, savings plan fee and spread. Compare the final value with the sum of your contributions, because the CAGR is time-weighted and does not change with the contributions.
Why does my backtest start later than I set?
Because all components need prices. The result names the security with the shortest history; a proxy or an asset class can extend the history.
Are dividends and the TER taken into account?
Yes. The prices include reinvested distributions, and the TER has already been deducted from them. You can also enter additional costs and trading costs.
How meaningful is a backtest?
It shows how a fixed rule would have performed in one particular past; it is not a forecast. The longer the period, the fewer variants you try and the more realistic the costs, the more it tells you.
Can I save or share the result?
Yes: “Sets” saves the grid and assumptions in your account, “Export” creates a PDF or HTML report and CSV files, and “Share” creates a link with the settings at the time of sharing.
Literature
- Bailey, David H.; López de Prado, Marcos (2014): The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting, and Non-Normality. The Journal of Portfolio Management 40 (5), pp. 94–107. doi:10.3905/jpm.2014.40.5.094
- Brown, Stephen J.; Goetzmann, William; Ibbotson, Roger G.; Ross, Stephen A. (1992): Survivorship Bias in Performance Studies. Review of Financial Studies 5 (4), pp. 553–580. doi:10.1093/rfs/5.4.553
- Dichev, Ilia D (2007): What Are Stock Investors' Actual Historical Returns? Evidence from Dollar-Weighted Returns. American Economic Review 97 (1), pp. 386–401. doi:10.1257/aer.97.1.386
- McLean, R. David; Pontiff, Jeffrey (2016): Does Academic Research Destroy Stock Return Predictability?. The Journal of Finance 71 (1), pp. 5–32. doi:10.1111/jofi.12365
This article explains a method; it is not investment or tax advice. Worked examples are simplified and rounded. All terms in the glossary.