The CAPM

Table of Contents

1. Overview

  • We know how to calculate cash flows and move them around in time given a discount rate. We also know where to apply these tools—to stock and bond valuation, investment decision rules, etc. The last step is to figure out how to get the discount rate. The CAPM will help us do this.
  • The CAPM will allow us to understand what we mean by risk.
  • The CAPM result: you are not paid for taking unnecessary risks.

2. Expected Return and Variance

2.1. Single Asset

2.2. Portfolio

Say we have two stocks in our portfolio, \(A\) and \(B\). The Expected Return of our portfolio is:

\[E(R_p) = w_AE(R_A) + w_BE(R_B)\]

where \(w_A\) and \(w_B\) are the weights in asset \(A\) and \(B\) respectively.

The portfolio variance is then:

\[\sigma_p^2 = w^2_A\sigma_A^2 + w^2_B\sigma_B^2 + 2w_Aw_B\sigma_A\sigma_B\rho_{A,B}\]

2.2.1. Optional: Portfolio of Two Assets Video

3. The CAPM, A Short Version

3.1. Realized Returns

\[R_A = E(R_A) + U_A\]

\[R_A = E(R_A) + m + e_A\]

the key idea is as we for a portfolio, \(e_A\), \(e_B\), \(e_C\), etc cancel each other out. So via diversification we can remove the unsystematic (firm-specific) risk.

3.2. Systematic Risk Principle

An asset's expected return depends only on that asset's systematic (nondiversifiable) risk (not on nondiversifiable risk) (it also depends on other market wide factors).

The idea is if you don't have to hold the risk, you will not be compensated for doing so.

3.3. Define \(\beta\)

We'll define \(\beta_A\) as the amount of systematic risk in asset A relative to the average asset. The average asset has a \(\beta\) equal to 1. The average asset is the same as the market.

3.4. The Reward to Risk Ratio

  • \(E(R_A) - r_f\) is what we expect to gain from investing in a risky asset \(A\) (it is our reward).
  • Since we are diversified, our risk from investing in asset \(A\) is \(\beta_A\).

Thus our reward-per-unit-risk (Reward to Risk Ratio) is:

\[\frac{E(R_A) - r_f}{\beta_A}\]

3.5. The CAPM

Via equilibrium argument:

\[\frac{E(R_X) - r_f}{\beta_X} = \frac{E(R_Y) - r_f}{\beta_Y} = E(R_m) - r_f\]

for all capital assets \(X\) and \(Y\).

Given the market portfolio is also a capital asset, and \(\beta_m = 1\), we have:

\[E(R_X) = r_f + \beta_X(E(R_m) - r_f)\]

for any capital asset \(X\).

3.5.1. Interpretation

The expected return on any capital asset is a function of:

  • \(r_f\) the risk free rate, which is the pure time value of money.
  • \(\beta_X\), the amount of systematic risk in the asset \(X\).
  • \(E(R_m) - r_f\), the market risk premium, which is the market-wide cost of bearing a unit of systematic risk.

So you can read the CAPM as:

The expected return on any asset is equal to the pure time value of money plus the product of the amount of systematic risk in the asset and the cost of systematic risk.

3.5.2. Stock with low correlations…

Stock with low amount of systematic risk will have low beta coefficients (\(\beta_X = \frac{Cov(R_X, R_m)}{\sigma^2_m}\)) and thus will have low expected returns. That is, you only require low returns for assets that serve as a market hedge. Remember:

An asset's risk is not its standard deviation, but in how much that asset increases your portfolio's standard deviation when it is added (which is the \(\beta\)).

4. Insights from the CAPM

  • A Risky Stock Can Make Your Portfolio Safer

4.1. The effect of correlation on portfolio risk

5. Applied CAPM: Calculating Beta (server may be down)

5.1. Estimating beta in R

library(quantmod)

tsla <- getSymbols("tsla", auto.assign=FALSE)
spy <- getSymbols("spy", auto.assign=FALSE)  # spy is an ETF traching the S&P 500 (the market)

tsla_returns <- Delt(Ad(tsla['2020/'])) # just use 2020 forward
spy_returns <- Delt(Ad(spy['2020/']))

beta <- round(lm(tsla_returns ~ spy_returns)$coef[2], 2)  # the beta coefficient
beta
1.39

So TSLA's beta coefficient since 2020 is 1.55.

5.2. Estimating beta in Python

import yfinance as yf
import pandas as pd
import statsmodels.formula.api as sm

xom = yf.Ticker("XOM")
spy = yf.Ticker("SPY")

xom_price = xom.history(period="12mo")  # just one year
spy_price = spy.history(period="12mo")

xom_returns = xom_price['Close'].pct_change()[1:]
spy_returns = spy_price['Close'].pct_change()[1:]

data = pd.DataFrame(pd.concat([xom_returns, spy_returns], axis = 1))
data.columns.values[0] = "xom"
data.columns.values[1] = "spy"

beta_reg = sm.ols(formula="xom ~ spy", data=data).fit()
beta_reg.params[1]
0.7474332305172887

So XOM's beta coefficient over the last year is 0.36.

6. Optional: A CAPM video appropriate to an Intro to Finance Course

7. Optional: A slightly more advanced treatment of the CAPM

Author: Matt Brigida, Ph.D.

Created: 2024-04-02 Tue 22:03

Validate