2.3.1 One trade, four numbers
The same trade can be described four ways, and each description answers a different question. Mixing them up is the most common arithmetic error in finance.
You buy 200 shares at $100 and sell them at $110. Your broker statement shows a P&L — profit and loss in currency — of $2,000. That number is what pays the rent, but it is useless for comparison: the same trade on 2,000 shares would show ten times as much. So quants almost always work with returns, which divide out the size of the position.
The simple return is the percentage change you learned at school: 10.00%. The log return is the natural logarithm of the price ratio: 0.0953. For small moves they are almost identical; for big moves, or over long periods, they diverge — and each has exactly one job it does perfectly.
Simple returns add across assets: a portfolio's simple return is exactly the weighted sum of its holdings' simple returns, with the weights set at the start of the period. Log returns add across time: a year's log return is exactly the sum of its daily log returns. Use simple returns to combine positions and log returns to combine periods, and convert between them with .
Log returns are the decibels of finance. Gains multiply, just as amplifier stages multiply a signal; taking logs turns multiplication into addition, which is why a log-scale chart of wealth shows steady compounding as a straight line (fig 2.3.4).
2.3.2 From prices to a track record
Every performance number — in a backtest, a fund factsheet or your own trading journal — comes out of the same five-step pipeline. Each step has one classic bug.
Step 1 matters more than it looks: returns must be computed on prices adjusted for splits and dividends, or a 2-for-1 split shows up as a −50% crash. Whether dividends are included is the difference between a price return and a total return — you met both in Session 2.2 — Equities, Indices & ETFs, and Session 4.3 — Corporate Actions, Security Master & Continuous Futures builds the adjustment pipeline properly.
| Job | Use | Why |
|---|---|---|
| Combine positions into a portfolio return | simple returns, weighted | exact, with start-of-period weights: |
| Combine days into a month or a year | log returns, summed | exact: |
| Statistical modelling of one asset | log returns (usually) | additive, more symmetric, unbounded below |
| Report performance to a human | simple returns, compounded | "+8% a year" is what people understand |
| Compare two strategies | excess returns, risk-adjusted | subtract the risk-free rate first, then divide by risk |
The excess return — your return minus what cash would have paid — is the only return that measures skill. It powers the Sharpe ratio below, the regressions of Session 5.2 — Regression & Inference That Doesn't Lie and every factor model in Unit 7.
2.3.3 The math of returns
A handful of formulas carry the whole course. Read each one in words first.
Simple and log returns
Price at the end of period , dividend paid during it. The simple return is the fractional change in your money; the log return is its natural logarithm:
Aggregating across time and across assets
Over periods, simple returns compound (multiply) while log returns add. Across assets with portfolio weights , it is the other way round:
Annualising
If daily returns are uncorrelated, the mean grows with time and the variance grows with time, so volatility grows with the square root of time. With 252 trading days a year, from a daily mean and daily standard deviation :
Here is wealth and the number of years. The compound annual growth rate (CAGR) is what you actually experienced; is the average of what happened each day — and they are not the same number (§2.3.4).
Risk-adjusting
The Sharpe ratio is annualised excess return per unit of annualised volatility. The drawdown at time is how far wealth sits below its running peak. Here is the risk-free return over the same day:
Scaling volatility by assumes daily returns are uncorrelated. Returns that are positively autocorrelated — hedge funds holding illiquid assets, private credit, real estate, anything marked to model — break this, usually making the annualised Sharpe ratio look better than it is. Session 5.2 — Regression & Inference That Doesn't Lie shows how to correct for it.
2.3.4 Compounding, drag & the asymmetry of losses
Averages lie about compounding. The arithmetic mean of your returns is always higher than the rate at which your money actually grows — and the gap is set by volatility.
Start with the asymmetry. Lose 50%, then gain 50%, and you are down −25%, because the gain applies to a smaller base. The deeper the hole, the steeper the climb out:
Averaging hides this. In the lab, twenty years of synthetic prices with a true drift of 8% and volatility of 20% produce an arithmetic mean return of 10.43% a year — but the money compounded at a CAGR of only 8.82%. What compounds is the mean log return = 8.45% (the CAGR is ), and the gap between the arithmetic mean and the mean log return is volatility drag:
The lab measures a drag of 1.98% against a predicted of 1.98%. Two percentage points a year, every year, just for being volatile.
No — you made the geometric rate. Fund marketing loves the arithmetic mean because it is always the bigger number. When you compare strategies, compare CAGR or mean log returns, and remember that reducing volatility raises growth even when the average return is unchanged.
Also notice the sampling noise: the true drift was 8% but twenty years of data estimated 10.43%. The standard error of a 20-year mean return is about 4.5%. Mean returns are the hardest thing in finance to estimate — a theme that returns in every unit.
2.3.5 Sharpe & drawdown, in code
The whole pipeline is a dozen lines of pandas. The companion lab uses the quantnb.returns module, but it is worth writing once by hand.
import numpy as np import quantnb as qn lab = qn.Lab("2.3") # seeded: same numbers every run px = qn.synth.gbm_prices(252 * 20, mu=0.08, sigma=0.20, rng=lab.rng)["price"] r = px.pct_change().iloc[1:] # simple returns lr = np.log(px / px.shift(1)).iloc[1:] # log returns wealth = (1 + r).cumprod() # compound, never sum cagr = wealth.iloc[-1] ** (1 / 20) - 1 excess = r - 0.03 / 252 # 3% risk-free, per day sharpe = excess.mean() / excess.std() * np.sqrt(252) dd = wealth / wealth.cummax() - 1 # drawdown path, ≤ 0 assert np.isclose(lr.sum(), np.log(px.iloc[-1] / px.iloc[0])) # log returns add
On the lab's path the numbers are: CAGR 8.82%, volatility 19.90%, Sharpe ratio 0.37 against a 3% risk-free rate, and a maximum drawdown of −44.5%. One dollar became $5.42.
| Measure | What it answers | Blind spot |
|---|---|---|
| CAGR | How fast did the money actually grow? | Says nothing about the ride |
| Volatility | How big are typical swings? | Treats upside and downside alike; misses fat tails |
| Sharpe ratio | How much excess return per unit of risk? | Assumes volatility is the right risk; noisy on short samples |
| Max drawdown | What is the worst peak-to-trough loss? | A single path's worst case — the next one can be worse |
A Sharpe ratio of 0.37 over twenty years of daily data has a standard error of roughly 0.22 — you could not rule out zero skill. (You met this 1/√Y rule in Session 1.3; Session 1.4 turns it into how many years you need, and Session 5.2 derives the standard error of the Sharpe ratio properly.) Session 5.2 — Regression & Inference That Doesn't Lie derives this, and Session 6.7 — Overfitting Statistics: PSR, DSR, MinTRL & PBO adds what happens when you tried many strategies before picking this one.
2.3.6 Leverage: when more becomes less
Leverage multiplies both the excess return and the volatility, so it leaves the Sharpe ratio unchanged. It does not leave growth unchanged — and the difference is where accounts go to die.
You have already met leverage in disguise: the "Rocket" of Session 1.2 was a levered market bet that looked like skill until a regression exposed it as beta. Leverage means holding dollars of exposure for each dollar of capital, borrowing the rest at the risk-free rate. Rebalanced daily, the levered return is . The mean excess return rises linearly in , but the drag rises with (below, , and are annual):
Growth peaks at — here 1.25 — and then falls. Past you would grow faster holding cash, and a little further on growth turns negative: a levered position in an asset that goes up on average will, typically, lose money.
On this one lucky path, 2× beat 1× (10.5% a year) — at the price of a −74% drawdown. The 3× version compounded at only 7.8% and fell −91.5% from its peak. Few people hold on through a loss like that.
One path proves nothing, so the lab simulates 2,000 ten-year paths, using the same random shocks at every leverage level so the comparison is fair. The median growth rate traces the theory almost exactly:
| Leverage | Median CAGR | Theory CAGR, | P(losing money over 10 y) | P(a 90% drawdown) |
|---|---|---|---|---|
| 1× | 6.2% | 6.2% | 16% | 0% |
| 2× | 5.2% | 5.1% | 34% | 6% |
| 3× | 0.2% | 0.0% | 50% | 42% |
| 5× | −19.6% | −19.7% | 77% | 95% |
Because drag grows with , there is always a leverage beyond which more exposure means less wealth. The optimum depends on — the number you know least well — so professionals size below it. Overestimate your edge and optimal leverage becomes ruinous leverage. This is the seed of the Kelly criterion (Session 3.6 — Bet Sizing, Kelly & Ruin) and of volatility targeting (Session 9.5 — Sizing, Vol Targeting & Allocating Across Strategies).
2.3.7 Return bugs that fake alpha
None of these raise an exception. All of them change your conclusions. Every one has shipped in a real backtest.
| Bug | Symptom | Fix |
|---|---|---|
| Summing simple returns over time | Lab: sum = 209%, true total = 442% | (1 + r).prod() - 1, or sum log returns |
| Weighting log returns across assets | Lab: +30%/−20% at 50/50 gives 0.0196 instead of 0.0488 | Weight simple returns, then take the log |
| √252 on weekly or monthly data | Sharpe inflated by √21 ≈ 4.6× on monthly data | Annualise with periods per year of that data |
| Returns on unadjusted prices | Fake crashes on splits; dividends missing | Use adjusted or total-return series |
| Forgetting the risk-free rate | Cash-like strategies look skilful when rates are high | Always compute on excess returns |
| Percent vs percentage points | "Returns fell 2%" when they fell from 10% to 8% | Say "2 percentage points" |
Only for one day. A daily-rebalanced 3× fund held for a year earns roughly in log terms (it borrows two dollars for every dollar of capital; fees and financing above the risk-free rate make it worse), not . If the index ends a volatile year flat, the 3× fund ends it down. This is the arithmetic of §2.3.6 — and why leveraged ETFs are trading tools, not investments.
2.3.8 Try it
Open the companion lab and break things on purpose.
1. Before running anything, compute by hand for , and . Then change SIGMA in the lab and check your answer against the leverage table.
2. Replace lab.rng with np.random.default_rng(1) and rerun section 2. How much do the arithmetic mean and the Sharpe ratio move? That spread is estimation error.
3. Success looks like this: your hand-computed matches the peak of the new column chart to within one step.
2.3.9 Glossary · Check yourself · Go deeper
Check yourself
1. A fund reports an average annual return of 12% but a CAGR of 8%. Roughly how volatile is it?
2. You hold three assets with weights 50/30/20 and have their daily log returns. How do you get the portfolio's daily return?
3. A strategy's monthly returns have a Sharpe ratio of 0.30. What is the annualised figure — and what are you assuming?
4. The S&P 500 ends a very choppy year exactly flat. What happened to a daily-rebalanced 3× fund on it?
5. A colleague's backtest reports a total return of 209% by summing daily returns. Is that too high or too low?
1. Write annualise(returns, periods_per_year) that returns CAGR, volatility and Sharpe ratio, and unit-test it on data where you know the answer (a constant 0.1% daily return; a ±1% alternating series).
2. In the lab, add a "0.5× + cash" line to the growth chart. How much growth do you give up relative to 1×, and how much drawdown do you avoid?
3. Read Meucci's three-page note on linear vs compounded returns (below). Then find one chart in the financial press that averages returns it should have compounded.
📚 Go deeper
- Campbell, J. Y., Lo, A. W. & MacKinlay, A. C. (1997). The Econometrics of Financial Markets, ch. 1 "Introduction" (returns and their properties). Princeton University Press. ISBN 978-0-691-04301-2
- Meucci, A. (2010). "Quant Nugget 2: Linear vs. Compounded Returns — Common Pitfalls in Portfolio Management." GARP Risk Professional, April 2010, 49–51. SSRN 1586656
- Lo, A. W. (2002). "The Statistics of Sharpe Ratios." Financial Analysts Journal 58(4), 36–52. doi:10.2469/faj.v58.n4.2453
- Cheng, M. & Madhavan, A. (2009). "The Dynamics of Leveraged and Inverse Exchange-Traded Funds." Journal of Investment Management 7(4), 43–62. SSRN 1539120
Educational material only — not investment, legal or tax advice. Backtests and simulations are hypothetical. Disclaimer · Text CC BY 4.0 · Code MIT.