# What a backtest simulates

> Trade timing, the backtest window, prices, simulated history, real returns, costs, benchmarks, and how each metric is calculated.

A backtest replays a strategy's rules over past prices as if you had followed
them. Every simulation makes assumptions, and the ones that flatter a result are
rarely printed next to it. This page lists all of Tactfolio's, so you can judge
how much to trust what you see. For a shorter overview, see
[backtesting on Tactfolio](https://tactfolio.com/backtesting.md).

## Timing

Each time a strategy runs, Tactfolio reads the rules using that day's closing
prices and trades at the same close. No rule can see a price from a later day.

Real trading can't quite do this: you can't know the exact closing price until
the market has closed. So the equity chart adds a thinner orange **Next-day
open** line: the same rules, trading at the next day's opening price instead.
Its CAGR and max drawdown lead the **Reality checks** table under the chart. If
the two lines drift far apart, the strategy depends on trading right at the
close. Every other number uses the same-day close. When a fund lacks opening
prices, the line starts later or is left out.

## Choosing the window

The **Window** menu sets the dates: YTD, 1Y, 3Y, 5Y, 10Y, 20Y, **Max** (the
default, all the history your strategy can use), or **Custom** dates. Your
choice is remembered across strategies on this device. If a strategy's
history is shorter than the window you picked, the backtest uses what's
available without forgetting your choice.

Long windows are worth the wait. A strategy that looks great over five years
may never have met a bear market; ten or twenty years usually include at least
one.

## Prices and data

- Prices are daily and adjusted for splits and dividends, so returns include
  dividends as if they were reinvested.
- A backtest can only start once every ticker it uses has price history. The
  results show the dates actually covered, which can be shorter than the window
  you asked for.
- Missing data stops the backtest with an error instead of being filled in with
  a made-up return.
- The ticker list contains funds and stocks that trade today. Companies that
  failed or were delisted aren't in it, which flatters any backtest that picks
  stocks (see [survivorship](https://tactfolio.com/docs/concepts/why-past-results-mislead.md#survivorship)).

## Simulated history

Some funds are young. The **Simulated history** option in the Window menu
extends a young fund backwards with modelled values from before its first real
price, so a strategy can be tested over a longer period. For example, GLD's real
prices begin in 2004 and its simulated history reaches back to 1968. Public
strategy pages and classic strategy articles offer the same switch.

Simulated values are estimates, not prices anyone could have traded. The backtest
switches to real prices from the fund's first trading day and lists which
tickers used simulated history. Treat results that depend on it with extra care.
[Simulated history](https://tactfolio.com/docs/simulated-history.md) explains how each fund is extended,
the stand-ins used for asset classes older than any fund, and every ticker it
covers.

## Nominal and real returns

A dollar in 1980 bought far more than a dollar today, so a strategy can look
like it tripled your money while only keeping up with prices. The **Nominal** /
**Real** switch under the headline numbers restates the backtest after
inflation: each curve is divided by US consumer prices (CPI-U from the Bureau of
Labor Statistics, and Robert Shiller's monthly index before 1913), so $1 on the
chart is $1 of purchasing power on the backtest's first day. The metrics are
recalculated; the strategy isn't rerun, and turnover and allocations stay
nominal. The note beside the switch names the latest CPI month used.

Real returns matter most over long windows and for comparing strategies across
decades of different inflation. The workspace, Discover, and AI
assistants' results stay nominal.

## Costs

- Every trade pays **slippage**, 5 basis points (0.05%) of the amount traded.
  It is the same for every strategy, so results compare fairly; the Reality
  checks restate each run at 10, 20, and 40 basis points.
- Commissions, taxes, and fund fees beyond those already in the fund's price
  aren't modelled.
- Uninvested cash earns nothing. To earn a short-term Treasury return, hold a
  cash-like fund such as BIL.
- The **Reality checks** table repeats the same trades at 20 and 40 basis
  points (only levels above your own setting), so you can see how much a result
  depends on cheap trading.

## Benchmarks

The strategy is compared with a benchmark over exactly the same dates. The
benchmark is a ticker, SPY by default, or another saved strategy. The starter
patterns use QQQ, because it's what their growth side could have held instead.

A strategy that takes less risk than its benchmark usually earns less and falls
less. To compare at equal risk, the **Reality checks** table also shows the
**benchmark at the same risk**: the benchmark scaled to the strategy's
volatility, with the rest in Treasury bills. It appears as a row named after
the benchmark, such as **SPY at same risk**. Hover the row to see the size: at
0.72×, that's 72% benchmark and 28% bills; above 1×, the extra is borrowed at
the bill rate. If the strategy can't beat it, holding the benchmark at that size
would have done as well. These figures are nominal, so they show only in the
Nominal view.

## Metrics

| Metric | Meaning |
| --- | --- |
| **Total return** | Growth over the whole backtest. |
| **CAGR** | Average yearly growth, compounded. Shown only for backtests of a year or more. |
| **Volatility** | How much daily returns swing, scaled to a year. |
| **Max drawdown** | The biggest drop from a peak, shown as a negative number. Closer to zero is better. |
| **Sharpe** | Average yearly return divided by volatility, measured from zero. |
| **Sharpe over T-bills** | The same after subtracting the 13-week Treasury bill return, as the standard Sharpe ratio does. Shown when bill rates cover the backtest; they start in 1960. |
| **Calmar** | CAGR divided by the size of the max drawdown. |
| **Turnover** | How much of the portfolio is traded per year, one way. 5.1 means 510% a year. |

[Reading a backtest](https://tactfolio.com/docs/concepts/reading-a-backtest.md) explains how to use
these numbers together.

## Learn the ideas behind it

- [Backtesting](https://tactfolio.com/learn/backtesting-explained.md): What backtesting is, how to backtest a trading strategy step by step, the biases that fool people, and why out-of-sample testing matters.
- [Max drawdown](https://tactfolio.com/learn/max-drawdown.md): Max drawdown is the biggest fall from a peak to a low.
- [Monte Carlo simulator](https://tactfolio.com/trading-tools/monte-carlo-simulation.md): Run 10,000 random futures for your savings and see the chance your money lasts, with a bad case and a good case.
