Asset allocation requires expected returns for individual assets. CAPM provides an alternative to averaging historical returns by relating an asset’s forecasted return to the risk-free rate, the market’s expected return, and the asset’s beta. section 3.3 section 3.0
The CAPM equation is E[r] = r_f + β(E[r_m] − r_f). Beta measures sensitivity to market returns: the market has beta 1, less-sensitive stocks have beta below 1, and more-sensitive stocks have beta above 1. section 3.1.2
A practical CAPM workflow uses:
- Three-month Treasury Bill rates as a short-term risk-free-rate proxy, converted from percentage yields to decimal monthly rates. section 3.1.2
- SPY historical prices as a proxy for market returns, combined with monthly stock prices. section 3.1.2
- An ordinary least-squares regression of stock excess returns on market excess returns to estimate beta. section 3.1.2
Comparing CAPM estimates
Using a 5.27% risk-free rate and an 8.0741% annualized market return, the resulting CAPM estimates are AAPL: beta 1.3187 and expected return 8.96%; FE: beta 0.2958 and 6.10%; WMT: beta 0.4907 and 6.64%. Historical returns differ substantially, especially for AAPL. section 3.1.2
Listing 3.3 Regressing stock returns on market returns to get beta
import statsmodels.api as sm
stock_prices_monthly = stock_prices.resample('MS').first() #1
mkt_prices_monthly = mkt_prices.resample('MS').first()
aapl_returns_monthly = stock_prices_monthly['AAPL'].pct_change() #2
mkt_returns_monthly = mkt_prices_monthly.pct_change()
y = (aapl_returns_monthly - rf['TB3MS']/100/12).dropna() #3
X = (mkt_returns_monthly - rf['TB3MS']/100/12).dropna() #4
model = sm.OLS(y,X) #5
results = model.fit() #6
print(results.summary()) #7
Inspect the executable regression that prepares monthly excess returns, fits the OLS model, and prints the estimated beta. section 3.1.2
