CAPM for Investment Risk: Detailed Guide to Pros and Cons

Progress 5 / 12
Table of Contents

In this article I explain basic concept of CAPM, its merits, demerits in detail. Also introducing specific calculation steps, explaining how it helps optimization of investment portfolio.

What is CAPM

CAPM (Capital Asset Pricing Model) is a model to explain relationship between investment risk and return. Since relationship of risk and return is explained as formula, it is used to calculate expected return rate of asset.

Merits of CAPM

Basic merits are below.

  • Easy: Explains relationship of risk and return with simple formula
  • Indicator to evaluate risk and return: Provides standard to evaluate return against risk

By applying these merits, for example

  • Judgment whether specific asset is undervalued/overvalued
  • Portfolio construction

Can be done easily.

Bad points of CAPM

  • Not reflecting reality market perfectly
    • Theory is built assuming information reaches all investors simultaneously and they start acting simultaneously
    • Cannot reflect stock price movement due to emotion etc.
  • Difficulty of Risk Free Rate Selection
    • Ideally assuming no risk, but Government Bonds often used for calculation have credit risk and liquidity risk
  • Fluctuation of Beta Value
    • Since Beta value is calculated based on past data, it doesn’t reflect future risk accurately
  • Considering only one factor
    • CAPM considers only single risk factor called Market Risk Premium. However, many risk factors exist in actual investment environment (e.g. Liquidity Risk, Credit Risk, International Risk etc.)
    • (Multi-factor models like Fama-French 3 factor model or Carhart 4 factor model are devised as method to solve this)

Calculation Formula of CAPM

E(Ri)=Rf+βi(E(Rm)Rf)E(R_i) = R_f + \beta_i \left( E(R_m) - R_f \right) E(Ri):Expected Return of Asset iRf:Risk Free Rateβi:Beta of Asset iE(Rm):Expected Return of Market PortfolioE(Rm)Rf:Market Risk Premium\begin{aligned} E(R_i) &: \text{Expected Return of Asset i} \\ R_f &: \text{Risk Free Rate} \\ \beta_i &: \text{Beta of Asset i} \\ E(R_m) &: \text{Expected Return of Market Portfolio} \\ E(R_m)-R_f &: \text{Market Risk Premium} \\ \end{aligned}

Calculation Formula of Beta

βi=Cov(Ri,Rm)Var(Rm)\beta_i = \frac{\text{Cov}(R_i, R_m)}{\text{Var}(R_m)} \begin{aligned} \beta_i\ &: \text{Beta of Asset i} \\ \text{Cov}(R_i, R_m) &: \text{Covariance of Asset i's return and Market Return. Shows how much 2 returns link.} \\ \text{Var}(R_m) &: \text{Variance of Market Return (r_m). Represents volatility of market return.} \\ R_i &: \text{Return of Asset i} \\ R_m &: \text{Market Return (Index etc. used when calculating)} \\ \end{aligned}

Note: Determining with linear regression is possible but this one calculable only with variance and covariance is easier.

Calculation Steps of CAPM

  1. Calculate Beta Value βi\beta_i of asset. Find based on past data.
  2. Get Risk Free Rate RfR_f. 10 year Government Bond yield is often used.
  3. Get Expected Return Rate of Market Portfolio E(Rm)E(R_m). Index return data is used (S&P500 if US asset, Nikkei Average if Japan etc.).
  4. Substitute values into CAPM equation to calculate Expected Return Rate of Asset E(Ri)E(R_i).

Try calculating with Python

import pandas as pd
import numpy as np
import yfinance as yf
from datetime import datetime
# Setting Date Range
start_date = "2020-01-01"
end_date = datetime.today().strftime('%Y-%m-%d')
# Get Data
aapl = yf.download("AAPL", start=start_date, end=end_date)
vti = yf.download("VTI", start=start_date, end=end_date)
tnx = yf.download("^TNX", start=start_date, end=end_date) # US 10Y Bond Yield
# Calculate Return (Use Log Return)
aapl['Returns'] = np.log(aapl['Adj Close'] / aapl['Adj Close'].shift(1))
vti['Market Returns'] = np.log(vti['Adj Close'] / vti['Adj Close'].shift(1))
# Setting US 10Y Bond Yield (Use return per year)
tnx['Risk Free Rate'] = tnx['Adj Close'] / 100 # Note yield as decimal
# Get recent Risk Free Rate
risk_free_rate = tnx['Risk Free Rate'].iloc[-1] / 252 # Convert to return per day
# Combine data and remove NaN
data = pd.concat([aapl['Returns'], vti['Market Returns']], axis=1).dropna()
# Calculate Covariance and Variance using pandas
covariance = data['Returns'].cov(data['Market Returns'])
market_variance = data['Market Returns'].var()
beta = covariance / market_variance
# Market Expected Return (Considering Risk Free Rate)
expected_market_return = data['Market Returns'].mean() * 252
expected_return_aapl = risk_free_rate * 252 + beta * (expected_market_return - risk_free_rate * 252)
# Display Result
print(f"Beta of AAPL: {beta:.4f}")
print(f"Market Expected Return: {expected_market_return:.4f}")
print(f"Expected Return of AAPL (by CAPM): {expected_return_aapl:.4f}")
Beta of AAPL: 1.1452
Market Expected Return: 0.1258
Expected Return of AAPL (by CAPM): 0.1384

Found by CAPM that expected return of asset is 13.8%/year. (Please note it is return investor expects, not return actually obtained)

Conclusion

Did understanding of CAPM basics and its application deepen through this article? By utilizing CAPM, investment judgment balancing risk and return becomes possible. However, since it doesn’t reflect complexity of market perfectly, it is important to consider multi-factor models together.

If you want to know other models related to portfolio construction, please utilize the link collection below.

投資ポートフォリオ構築ガイド: モデル集

投資ポートフォリオ構築に関するモデル記事のリンク集。資産配分・期待リターン計算・リスク管理モデルを体系的にまとめています。

blog.otama-playground.com