# Chapter 11: Backtest: the synthetic portfolio

*The Analyst's Handbook, Sifter's textbook for student investors · By Matt Lang and Bree Lang · Models and simulations · https://sifter.finance/textbook/ch11-backtest*

What the Simulate tab actually builds, and how it differs from your real book.

Where this is on Sifter: Portfolio · Simulate · Evaluate

Everything we measured in Unit II was a record of what your fund actually did, which is the right place to have started, but a measured record can only ever describe the one history that happened. Sooner or later, every analyst starts asking questions that begin with the words *what if*. You may already be asking one yourself, something like "what if we had never bought the position that hurt us?" The Simulate tab is where those questions go. Hand it a proposed portfolio (nothing more than a list of tickers and weights) along with a date range, and it builds a **synthetic portfolio**. Starting on the first day in your range on which the benchmark and nearly all of your holdings have a price, the platform marches the imaginary book ahead one day at a time, asking on each day what a book held at exactly those weights would have earned.

Before you trust a backtest, take a moment to understand how the synthetic book differs from your real one, because there are three differences and all three are there by design. First, the synthetic book has **no flows and no trades**. No money comes in, no money goes out and nothing is ever bought or sold. Second, the **weights never move**. On every single day the book is assumed to hold your proposal exactly, which means that a holding that rallied yesterday is trimmed back to its weight this morning and one that fell is topped back up, as if a very patient clerk rebalanced the book at every close. (Your real book does the opposite, letting winners grow into bigger positions, the same drift Chapter 10 measured at the sleeve level.) Lastly, the backtest uses plain closing prices, which means that **dividends are not counted**. Your measured TWR includes every dividend your holdings paid, and the synthetic book includes none of them. Because of these three differences, a backtest of your exact current holdings will not match your measured TWR, and the mismatch is not a bug. The difference is a finding in its own right, because it is roughly the combined cost (or, sometimes, the profit) of your actual trading and drift, plus the dividends the backtest left on the table. The figure below shows the backtest of the sample book's own holdings, which is the first thing to run on any book, because this chapter is about the difference between it and the measured TWR.

![The Analyze panel of the Simulate tab on the sample book: a Historical Backtest banner naming the date range, the trading-day count and how many tickers had price data; a performance summary with annualized return, SPY return, active return, alpha, beta, beta return, tracking error and information ratio; and a Growth of $10,000 chart with the original, simulated and benchmark lines.](https://sifter.finance/textbook/figures/ch10-backtest.png)

*Evaluate › Analyze, on the sample book. The banner says what was actually run, which is real closing prices over the chosen year for every holding in the book. The summary tiles are the Unit II formulas applied to the synthetic daily returns, beta and tracking error among them, and the chart is those returns chained and scaled to $10,000 next to the benchmark. The Original line is the book as you loaded it in Setup and the Simulated line is the book after your edits in Build. They lie on top of each other here because nothing was changed in Build; edit a position and they part.*

**The synthetic book, day by day**

```
r_p(t) = Σ w_i × r_i(t)        Growth(t) = $10,000 × Π (1 + r_p)
```

In the first line, i runs over the holdings in your proposal, w_i is the weight you gave holding i (the weights are normalized to add up to one), r_i(t) is that holding's return on day t, and r_p(t) is the synthetic book's return on day t, the weighted sum of the holding returns with the weights fixed and never allowed to drift. (A holding that was not yet listed on a given day, as happens with a recent IPO, is left out for that day and its weight is spread over the rest.) The second line chains the daily returns, multiplying one plus each day's return from the first day s through day t, and scales the product to $10,000, which is the Growth of $10,000 chart. The same daily returns feed the beta, alpha, tracking error and information ratio formulas from Unit II, applied to an imaginary book.

### Worked example: Worked example: a two-stock synthetic book

Imagine that we hand the Simulate tab a proposal of 60% in stock A and 40% in stock B, with A at $100 and B at $50 on the day the backtest starts.

1. **Day 1: two holding returns** A closes at $102, a return of +2.00%. B closes at $50.50, a return of +1.00%. *Synthetic return = 0.60 × 2.00% + 0.40 × 1.00% = +1.60%. On the chart, $10,000 becomes $10,160.*
2. **Reset the weights** A buy-and-hold book would now be 60.2% A and 39.8% B, because A grew a little faster. The backtest does not care, and tomorrow it holds 60% and 40% again. *Every day starts at your proposal, which is the one thing to remember about the synthetic book.*
3. **Day 2: a down day for B** A closes at $104 (+1.96% on the day) and B at $49.00 (−2.97%). Synthetic return = 0.60 × 1.96% + 0.40 × (−2.97%) = 1.18% − 1.19%. *About −0.01% for the day, so $10,160 becomes roughly $10,159. A buy-and-hold book that had bought 600 shares of A and 800 of B on day 0 would have been exactly flat (worth $101,600 on both days), and that sliver of difference is the daily rebalance at work.*

### Practice

Continue the example to day 3. Stock A closes at $106.08 (+2.00% on the day) and stock B at $48.02 (−2.00%). What is the synthetic book's day-3 return, as a percentage?

**Solution.** 0.60 × 2.00% + 0.40 × (−2.00%) = 1.20% − 0.80% = +0.40%. Take a moment to notice that the answer needed no share counts at all. The backtest never holds shares, only weights, and that is the whole difference between it and your real book.

### Check yourself

You backtest your fund's exact current holdings over the past year and get +11%, but your measured TWR for the same year is +9%. The most defensible conclusion is:

- The platform has a bug: the numbers should match. The two numbers measure different things by design, because the backtest holds your proposal at fixed weights, rebalanced every day, with no flows and no dividends, while the TWR includes every trade, flow and dividend you actually had.
- The difference is everything the backtest leaves out: your trades and their timing, the drift you let run, and the dividends it never counted. **(correct)** Right. The synthetic book answers the question, "what if we had held these weights, rebalanced daily, with no dividends?", which means that the 2pp difference is the net effect of the things it does not model. Sometimes the difference comes out the other way, and a backtest that trails your measured TWR is decent evidence that your trading added value.
- The benchmark must have changed. Neither number depends on the benchmark, because both are absolute returns.

> **Backtests benefit from hindsight** A backtest of a portfolio you chose today benefits from hindsight, because you already know that these companies survived and (often) did well. The methodology's own caveat list applies here, and Chapter 12's simulations inherit the same warning. The past is one draw from the distribution, and it is healthy to remember that the draw is not the distribution itself.

### Lab: Lab: run a backtest and explain the difference

1. Go to Portfolio › Simulate and, in Setup and Build, give it a small proposed book (3 to 5 tickers with weights) and a date range.
2. Open Evaluate › Analyze (the backtest) and read the Growth of $10,000 chart against your benchmark.
3. Note the synthetic book's beta and tracking error, which come from the same formulas as Chapter 6 and Chapter 7, applied to the synthetic daily returns.
4. If you simulated your real holdings, compare the backtest return to your measured TWR for the same window and write one sentence explaining the difference (trades, drift, dividends).
