SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons
      1. 4.6.1 Utility and mean–variance preferencesConcept · 35 min
      2. 4.6.2 The tangency portfolio and the Sharpe ratioConcept · 30 min
      3. 4.6.3 The capital asset pricing modelConcept · 30 min
      4. 4.6.4 Practice set: portfolio theoryPractice set · 25 min
      5. 4.6.5 Case study: the tangency portfolio from dataCase study · 35 min

Level 4, Multivariable calculus and optimisation 4.6 Portfolio theory Lesson 3 of 5

ConceptLesson 4.6.3 in Level 4, Multivariable calculus and optimisation. About 30 minutes.

The capital asset pricing model

Beta

Beta measures how strongly an asset moves with a portfolio M, usually the whole market. It is the asset's covariance with M divided by M's variance. It has no units, since both are in squared returns.

It is the hedge ratio of case study 3.5.5. Selling βi\beta_i dollars of M per dollar of asset ii removes as much of its risk as M can remove. That case study's stock had a beta of 1.1518 to the index.

With a covariance matrix, case study 3.2.5 gives both pieces. The covariance of asset ii with M is (ΣwM)i(\Sigma\mathbf{w}_M)_i, entry ii of ΣwM\Sigma\mathbf{w}_M, and M's variance is σM2=wM⊤ΣwM\sigma_M^2 = \mathbf{w}_M^\top\Sigma\mathbf{w}_M.

Rule: Beta

βi=Cov⁡(Ri,RM)Var⁡(RM)β=ΣwMwM⊤ΣwM\begin{gathered} \beta_i = \frac{\operatorname{Cov}(R_i, R_M)}{\operatorname{Var}(R_M)} \\[4pt] \boldsymbol{\beta} = \frac{\Sigma\mathbf{w}_M}{\mathbf{w}_M^\top\Sigma\mathbf{w}_M} \end{gathered}

RiR_i and RMR_M are the returns of asset ii and of M. A portfolio's beta is the weighted average of its assets' betas, so M's own beta is wM⊤β=1\mathbf{w}_M^\top\boldsymbol{\beta} = 1.

  • β=1\beta = 1: the asset moves one for one with M, on average.
  • β>1\beta > 1: it amplifies M's moves; 0<β<10 < \beta < 1 damps them.
  • β=0\beta = 0: no covariance with M. The risk-free bill has β=0\beta = 0.
  • β<0\beta < 0: it tends to rise when M falls, like insurance (case study 1.2.4).

Take M to be lesson 4.6.2's tangency portfolio, wT=(0.5185,0.1601,0.3214)\mathbf{w}_T = (0.5185, 0.1601, 0.3214). Then ΣwT=(0.009468,0.015779,0.025247)\Sigma\mathbf{w}_T = (0.009468, 0.015779, 0.025247) and σT2=0.01555\sigma_T^2 = 0.01555, so

β=(0.6088,1.0147,1.6236)\boldsymbol{\beta} = (0.6088, 1.0147, 1.6236)

C moves about 1.62 times as much as T, A only 0.61 times. Weighted by wT\mathbf{w}_T, the betas average to exactly 1.

Try it

The cell rebuilds Σ\Sigma and wT\mathbf{w}_T from lesson 4.6.2. It prints ΣwT\Sigma\mathbf{w}_T and σT2\sigma_T^2, then the betas and their weighted average.

⌘/Ctrl + Enter runs the cell

The security market line

From the tangency condition

Lesson 4.6.2 found wT=1kΣ−1(μ−rf1)\mathbf{w}_T = \frac{1}{k}\Sigma^{-1}(\boldsymbol{\mu} - r_f\mathbf{1}), with kk the sum of the entries of Σ−1(μ−rf1)\Sigma^{-1}(\boldsymbol{\mu} - r_f\mathbf{1}). Three steps turn this into a statement about expected returns.

  1. 1

    ΣwT=1k(μ−rf1)\Sigma\mathbf{w}_T = \frac{1}{k}(\boldsymbol{\mu} - r_f\mathbf{1})

  2. 2

    σT2=1k(μT−rf)\sigma_T^2 = \frac{1}{k}(\mu_T - r_f)

  3. 3

    βi=μi−rfμT−rf\beta_i = \frac{\mu_i - r_f}{\mu_T - r_f}

The first step says that each asset's covariance with T is proportional to its excess return μi−rf\mu_i - r_f. The last says the same with beta: excess return equals beta times T's excess return.

Rule: Security market line

μi=rf+βi (μT−rf)with βi measured against T\begin{gathered} \mu_i = r_f + \beta_i\,(\mu_T - r_f) \\[4pt] \text{with } \beta_i \text{ measured against } T \end{gathered}

Every asset's expected return μi=E[Ri]\mu_i = \mathbb{E}[R_i] is a straight line in its beta, with intercept rfr_f and slope μT−rf\mu_T - r_f. It holds for portfolios too, and only when the betas are measured against the tangency portfolio.

For the three assets the slope is μT−rf=0.049274\mu_T - r_f = 0.049274:

assetβi\beta_i0.03+0.049274 βi0.03 + 0.049274\,\beta_iμi\mu_i
A0.60880.060.06
B1.01470.080.08
C1.62360.110.11

The line gives back each expected return exactly. This is not luck: the betas were measured against the one portfolio that makes it true.

Try it

The first two lines check the steps: ΣwT\Sigma\mathbf{w}_T against 1k(μ−rf1)\frac{1}{k}(\boldsymbol{\mu} - r_f\mathbf{1}), and σT2\sigma_T^2 against 1k(μT−rf)\frac{1}{k}(\mu_T - r_f).

The third prints the slope and the line at each beta. The last is case study 1.2.4's line, 0.03+0.05β0.03 + 0.05\beta, at its five betas.

⌘/Ctrl + Enter runs the cell

From the tangency portfolio to the market

The capital asset pricing model (CAPM) adds an argument about everyone at once. Suppose every investor chooses by mean–variance utility (lesson 4.6.1) with the same μ\boldsymbol{\mu} and Σ\Sigma. Suppose too that all can borrow and lend at rfr_f, with no costs or taxes, over one period.

Then every investor holds the bill and wT\mathbf{w}_T, in amounts set by their own γ\gamma (two-fund separation, lesson 4.6.2).

Add up everyone's risky holdings: each investor's risky part has the same proportions, so the total has them too. That total is the market portfolio, every asset in proportion to its total market value. So the market portfolio is the tangency portfolio.

Rule: The capital asset pricing model

E[Ri]=rf+βi (E[Rm]−rf)\mathbb{E}[R_i] = r_f + \beta_i\,\big(\mathbb{E}[R_m] - r_f\big)

RmR_m is the return of the market portfolio M, and βi\beta_i is measured against it. This is the security market line of case study 1.2.4: a stock's expected return is a straight line in its beta.

Case study 1.2.4 drew the line with an illustrative market return of 8%, giving 0.03+0.05β0.03 + 0.05\beta: 0.5% at β=−0.5\beta = -0.5, 7% at 0.8 and 10% at 1.4. For the three assets the market is wT\mathbf{w}_T, which expects 7.93%, so the slope is 4.93%.

Expected return against beta, measured two ways. Against the tangency portfolio every asset sits on the line. Against the 50/30/20 portfolio they miss it, and each gap is an alpha.

Only beta is paid

Split each asset's variance into the part that moves with the market and the part that is its own. As in case study 3.5.5, the best hedge with the market removes the share ρiM2\rho_{iM}^2, where ρiM\rho_{iM} is the asset's correlation with the market.

Rule: Systematic and specific risk

σi2=βi2 σM2+σε,i2βi2σM2σi2=ρiM2\begin{gathered} \sigma_i^2 = \beta_i^2\,\sigma_M^2 + \sigma_{\varepsilon,i}^2 \\[4pt] \frac{\beta_i^2\sigma_M^2}{\sigma_i^2} = \rho_{iM}^2 \end{gathered}

βi2σM2\beta_i^2\sigma_M^2 is the systematic risk, which moves with the market. σε,i2\sigma_{\varepsilon,i}^2 (epsilon) is the specific risk, the asset's own, which spreading money across many assets averages away.

assetσi2\sigma_i^2βi2σM2\beta_i^2\sigma_M^2systematic sharespecific volatility
A0.01440.0057640.40030.0929
B0.03240.0160120.49420.128
C0.06250.0409910.65590.1467

The security market line pays for β\beta alone, not for σi\sigma_i. An asset with C's 25% volatility but a beta of only 0.5 would be expected to return 0.03+0.5×0.049274=5.46%0.03 + 0.5 \times 0.049274 = 5.46\%, less than A. Most of its risk would be specific, which investors can diversify away at no cost, so the market pays nothing for it.

Try it

The first line prints the variances, the systematic parts βi2σM2\beta_i^2\sigma_M^2 and their shares. The second prints the specific volatilities σε,i\sigma_{\varepsilon,i} and the correlations ρiM\rho_{iM}, whose squares are the shares.

The last line is the expected return of an asset with β=0.5\beta = 0.5.

⌘/Ctrl + Enter runs the cell

Alpha

An asset's alpha is how far its expected return sits above the line, as in case study 1.2.4. Against a benchmark portfolio B, with return μB\mu_B:

Rule: Alpha

αi=μi−rf−βi (μB−rf)\alpha_i = \mu_i - r_f - \beta_i\,(\mu_B - r_f)

Here βi\beta_i is measured against B. Weighted by B's own weights, the alphas add up to 0. Every alpha is 0 exactly when B is the tangency portfolio.

Against wT\mathbf{w}_T every alpha is 0: that is the security market line. Now take case study 3.2.5's 50/30/20 mix as the benchmark, as if it were an index. Its betas are (0.6833,1.2244,1.4551)(0.6833, 1.2244, 1.4551) and the alphas are

α=(−0.0014,−0.0063,0.0131)\boldsymbol{\alpha} = (-0.0014, -0.0063, 0.0131)

C sits 1.31 points above the benchmark's line, B 0.63 below. A positive alpha does not make C a bargain in any absolute sense. It says the benchmark is not mean–variance efficient: holding a little more C would raise its Sharpe ratio.

Moving 1% of the benchmark from B to C lifts its Sharpe ratio from 0.3852 to 0.3868, and from A to C to 0.3863. Moving all the way to wT\mathbf{w}_T reaches 0.3951, where every alpha is 0. So an alpha is always relative to a benchmark: against a poor one, many assets seem to have it.

Try it

The first line prints the betas against the 50/30/20 mix, the alphas, and a check that the weighted alphas add up to 0.

The second prints Sharpe ratios: the benchmark, the two 1% moves, and wT\mathbf{w}_T. The last line checks that every alpha against wT\mathbf{w}_T is 0, to rounding.

⌘/Ctrl + Enter runs the cell

On real data, beta is estimated from returns, as the hedge ratio was in case study 3.5.5. Fit the least-squares line of the asset's excess returns against the market's (lesson 3.5.3): its slope estimates beta and its intercept alpha.

Case study 5.10.5 does this with the tools of regression.

What the model claims, and what it does not

Under its assumptions, CAPM claims three things:

  • the market portfolio is the tangency portfolio;
  • every asset's expected excess return is its beta times the market's;
  • specific risk earns nothing, however large.

It does not claim:

  • That high-beta assets do better every year. The line is about expected returns. In a year when the market falls, high-beta assets tend to fall most.
  • That a stock index is the market. The market portfolio holds every risky asset, bonds and property included. A test against an index tests that index.
  • That no benchmark has alphas. Only the true market portfolio has none; against any other portfolio, alphas are normal.
  • That real returns follow it closely. Tests on stock returns have found the line flatter than the model predicts. Other features of firms explain part of the returns. Factor models add more betas, one for each source of systematic risk.

The model stays in daily use: as a first estimate of the return investors require, and to measure a fund's alpha against its benchmark.

Common mistakes

  1. Beta is covariance over the market's variance, not over the asset's own: (ΣwM)iσM2\frac{(\Sigma\mathbf{w}_M)_i}{\sigma_M^2}. Equivalently βi=ρiMσiσM\beta_i = \rho_{iM}\frac{\sigma_i}{\sigma_M}, so a volatile asset can still have a small beta.
  2. Measure beta and alpha against the same benchmark. Betas against the 50/30/20 mix are (0.6833,1.2244,1.4551)(0.6833, 1.2244, 1.4551); against wT\mathbf{w}_T, (0.6088,1.0147,1.6236)(0.6088, 1.0147, 1.6236).
  3. Subtract rfr_f on both sides. The line is μi−rf=βi(μM−rf)\mu_i - r_f = \beta_i(\mu_M - r_f), not μi=βiμM\mu_i = \beta_i\mu_M.
  4. Volatility is not what the line pays for. Only the systematic part, βi2σM2\beta_i^2\sigma_M^2, earns a reward.
  5. An alpha is relative. A positive alpha says the benchmark could be improved, not that the asset is cheap.
  6. The line is about expectations. Realised returns scatter around it, widely, year by year.

The capital asset pricing model

0 of 11 correct

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11.
How to type answers
  • Powers with ^: x^7, 2^(1/3), a^-2.
  • Multiply with * or by writing side by side: 3x^2, 2(x+1).
  • ln(x) is the natural log, log(x, 2) is log base 2, e is Euler's number, sqrt(x) is a square root.
  • sin(x), cos(x) and tan(x) take radians; write pi for π and sin(x)^2 for sin²x.
  • Your first answer to each question is saved: it counts towards your score and brings the question back for review.
  • Exact answers like ln(20)/ln(3) are best. Decimals need about 4 significant figures.

Summary card

  • Beta is βi=Cov⁡(Ri,RM)Var⁡(RM)\beta_i = \frac{\operatorname{Cov}(R_i, R_M)}{\operatorname{Var}(R_M)}, or β=ΣwMwM⊤ΣwM\boldsymbol{\beta} = \frac{\Sigma\mathbf{w}_M}{\mathbf{w}_M^\top\Sigma\mathbf{w}_M}: case study 3.5.5's hedge ratio. A portfolio's beta is the weighted average of its assets' betas.
  • The tangency condition ΣwT=1k(μ−rf1)\Sigma\mathbf{w}_T = \frac{1}{k}(\boldsymbol{\mu} - r_f\mathbf{1}) gives the security market line μi=rf+βi(μT−rf)\mu_i = r_f + \beta_i(\mu_T - r_f), with betas against wT\mathbf{w}_T.
  • CAPM: if everyone holds the bill and the tangency portfolio, the market is the tangency portfolio, so E[Ri]=rf+βi(E[Rm]−rf)\mathbb{E}[R_i] = r_f + \beta_i(\mathbb{E}[R_m] - r_f), case study 1.2.4's straight line in beta.
  • Variance splits into systematic βi2σM2\beta_i^2\sigma_M^2 and specific σε,i2\sigma_{\varepsilon,i}^2; only the systematic part is paid.
  • Alpha αi=μi−rf−βi(μB−rf)\alpha_i = \mu_i - r_f - \beta_i(\mu_B - r_f) is relative to a benchmark. All alphas are 0 only against the tangency portfolio; a positive one means the benchmark's Sharpe ratio can be raised.

Free further reading

Optional. This lesson covers what you need; these add more examples and practice. All are free to read.