2.2 Asset pricing models
Asset pricing is a fundamental concept in finance that focuses on determining the value of financial assets, which depends on various risk factors
Consequently, different models have been established, such as CAPM, ICAPM, APT, and FF3, which differ in their assumptions
The first equilibrium model of asset pricing, known as Capital Asset Pricing Model (CAPM), was developed by Sharpe based on Markowitz’s modern portfolio theory
The CAPM says that in market equilibrium the risk premium (measured by excess return) on any asset is directly related to the magnitude of its non-diversifiable risk (beta coefficient)
CAPM is commonly estimated as a single factor time–series regression using the excess returns
rt−rf=α+β(rm−rf)+ut
rt− return on individual asset (firm specific)
rf− return on a risk-free asset (in practice a Treasury bill rate is used)
rm− market return (well diversified portfolio or benchmark market index, like S&P500 is used as market proxy)
α− intercept (also called Jensen’s alpha)
β− systematic risk (also called non–diversifiable risk or covariance risk)
ut− normally distributed white noise (identically and independetly distributed random errors)
- The empirical version (2.8) represents the unrestricted CAPM, while the originally proposed version imposes the restriction α=0 , and thus
rt=rf+β(rm−rf)+ut
Empirical version is used to test the theory, i.e. if the null hypothesis H0: α=0 is not rejected it means that the asset’s excess returns are fully explained by its exposure to market risk (beta)
Otherwise, positive or negative α suggest positive or negative abnormal returns, indicating that asset outperforms or underperforms the market
CAMP estimation on daily basis requires transformation of daily observed 1−month Treasury bill annualized rates into daily risk-free returns
If β>1 the asset is more risky than the market, if 0≤β≤1 the asset is less risky (more stable) than the market, if β=0 the asset’s returns are uncorrelated with the market’s returns (similar to a risk-free asset), and if β<0 the asset moves in the opposite direction to the market (this type of asset can serve as a hedging instrument)
TSLA
) and S&P500 index (ticker ^GSPC
) for the same period as in Example 4. Also load 1−month T–bill annualized rates (observed daily) from FRED
source (Federal Reserve Economic Data) as a proxy of risk–free returns. Estimate an empirical CAPM as an object
capm1
and restricted CAPM as an object capm2
considering S&P500 index as a proxy of well–diversified market portfolio. For that purpose use lm()
command. Compare both models by modelsummary()
command. According to results answer the following questions: (a) does Tesla outperforms or underperforms the market? (b) is Tesla riskier than the market? (c) what is the percentage of non–diversifiable (market specific) risk and the percentage of diversifiable (firm specific) risk? Visualize empirical capm1
on the scatter plot and test the joint null hypothesis H0: α=0 and β=1 by Wald test (command linearHypothesis()
from the package car
). Based on restricted capm2
calculate the expected Tesla return if market return is 8% and risk–free rate is 3%.
Solution
Copy the code lines below to the clipboard, paste them into an R Script file, and run them.In this example, estimated α is close to zero (0.0002) which is expected in market equilibrium, and thus Tesla does not underperform nor overperfom the market. Significant β greater than 1 indicates that Tesla is more riskier. The percentage of nondiversifiable (market specific) risk is R2=0.292 (29.2%) and the percentage of diversifiable (firm specific) risk is (1−R2)=0.708 (70.8%).
Rejection of the joint null hypothesis confirms that Tesla does not behave like the market portfolio.
# Loading required packages
library(quantmod)
library(modelsummary)
# Fetching data of Tesla stock and S&P500 index from Yahoo Finance source
getSymbols(c("TSLA","^GSPC"),
src="yahoo",
from = as.Date("2021-01-01"),
to = as.Date("2024-12-31"))
= dailyReturn(Cl(TSLA))
tesla.ret= dailyReturn(Cl(GSPC))
market.ret
# Fetching 1-month T-bill annualized rates (observed daily) from FRED source
getSymbols("DGS1MO",
src="FRED",
from = as.Date("2021-01-01"),
to = as.Date("2024-12-31"))
=DGS1MO[index(market.ret)] # keeping only matching dates for T-bills
riskfree=((1+(riskfree/100))^(1/252))-1 # transforming annualized rates to daily risk-free rates
riskfree
# Both excess returns are combined into single data frame and named as y and x
<- cbind(y=(tesla.ret-riskfree), x=(market.ret-riskfree))
combined <- na.omit(combined) # few observations are missing with respect to risk-free rate
combined colnames(combined)=c("y","x")
# Estimating empirical CAPM and restricted CAPM using excess returns
<- lm(y~x,data=combined)
capm1 <- lm(y~-1+x,data=combined)
capm2
# Table summary of both models
modelsummary(list("Empirical CAPM"=capm1,"Restricted CAPM"=capm2),stars=TRUE,fmt=4)
# Visualizing empirical CAPM on the scatter plot
library(ggplot2)
ggplot(data = combined, aes(x = x, y = y)) +
geom_point(color="orchid") +
geom_smooth(method = "lm", se = FALSE, color="coral")+
labs(title = "Empirical CAPM",
x = "Market excess return",
y = "Tesla excess return") +
theme_minimal()+
theme(panel.background = element_rect(fill = "white", color=NA),
legend.position = c(0.85, 0.1),
legend.background = element_blank(),
legend.key = element_blank(),
legend.title = element_blank(),
axis.line = element_line(color = "black"))
# Checking if the ratio between covariance and variance equals to beta coefficient
cov(combined$y,combined$x)/var(combined$x)
# Testing joint null hypothesis supported from "car" package (Companion to Applied Regression)
install.packages("car")
library(car)
linearHypothesis(capm1, c("(Intercept)=0","x=1"),test="Chisq")
# Expected Tesla return for given risk-free rate and market return
0.03+coef(capm2)*0.08
Solution
Copy the code lines below to the clipboard, paste them into an R Script file, and run them.In this example OLS formula in matrix form is adopted to calculate beta’s for multiple stocks simultaneously. It can be concluded that all stocks are riskier then the market, except for Pfizer.
# Loading prices for multiple stocks and the market (Tesla, Meta, Microsoft, Pfizer and S&P500)
<- c("TSLA", "META", "MSFT", "PFE", "^GSPC")
assets getSymbols(assets , src = "yahoo", from = as.Date("2021-01-01"), to = as.Date("2024-12-31"))
# Calculating daily returns for each stock and combined them into matrix A
<- as.matrix(cbind(tesla.ret = dailyReturn(Cl(TSLA)),
A meta.ret = dailyReturn(Cl(META)),
microsoft.ret = dailyReturn(Cl(MSFT)),
pfizer.ret = dailyReturn(Cl(PFE))))
<- na.omit(A-as.numeric(riskfree)) # subtracting risk-free rates from all columns of A
A <- na.omit(as.numeric(market.ret-riskfree)) # vector of market excess returns
b
# The beta coefficients for all four stocks simultaneously using matrix calculations
<- solve(t(b) %*% b) %*% t(b) %*% A
beta_coefficints colnames(beta_coefficints) <- c("Tesla", "Meta", "Microsoft", "Pfizer")
print(beta_coefficints)
~~~
Merton has introduced the extension of the CAPM well known as the Intertemporal Capital Asset Pricing Model (ICAPM) which includes additional factors representing future risks that investors seek to hedge against over multiple periods (so called state variables)
Unlike ICAPM, Arbitrage Pricing Theory (APT) focuses on multiple risk factors, mostly macroeconomic factors (like interest rate, inflation or exchange rates)
\begin{equation} r_t=r_f+\beta_1 F_{1,t}+\beta_2 F_{2,t} + \dots + \beta_k F_{k,t} + u_t \tag{2.10} \end{equation}
- No–arbitrage condition in APT implies that asset prices reflect the correct exposure to macroeconomic factors (assets should not be mispriced if they have similar exposures to the same risk factors)
TSLA
and GSPC
objects. Estimate APT on monthly basis by regressing Tesla excess on market excess returns, inflation rate (ticker CPIAUCLS
) and production growth (ticker INDPROD
). Use short–term interest rate FEDFUNDS
(Fred fund rate) as a proxy of risk–free return.
Solution
Copy the code lines below to the clipboard, paste them into an R Script file, and run them.In this example production growth has a positive impact on Tesla excess return and significant at 10\% level, i.e. 1\% increase of production results in 4.99\% increase in Tesla excess returns, whereas the impact of inflation risk is negative (as expected), but not statistically significant. Market risk is positive (1.45\%) and significant at 1\% level.
# Calculating monthly Tesla returns from daily prices
<- monthlyReturn(Cl(TSLA))[-1] # removing the first observation
tesla.monthly
# Calculating monthly S&P500 returns (market proxy), removing the first observation
<- monthlyReturn(Cl(GSPC))[-1]
market.monthly
# Download macroeconomic data from FRED: federal funds rate (risk-free return proxy),
# consumer price index, and industrial production
getSymbols(c("FEDFUNDS", "CPIAUCSL", "INDPRO"), src = "FRED", from = "2020-12-31", to = "2024-12-31")
# Converting the federal funds rate from percent to decimal and remove first value
<- FEDFUNDS[-1] / 100
free.monthly
# Computing monthly inflation as the log-difference of Consumer Price Index
<- diff(log(CPIAUCSL))[-1] # removing the first observation
inflation
# Computing monthly production growth as the log-difference of the Industrial Production Index
<- diff(log(INDPRO))[-1] # removing the first observation
growth
# Computing Tesla's excess return by subtracting the risk-free rate from Tesla returns
<- as.numeric(tesla.monthly) - as.numeric(free.monthly)
y1
# Computing market excess return by subtracting risk-free rate from market returns
<- as.numeric(market.monthly) - as.numeric(free.monthly)
x1
# Assigning inflation and growth directly as numeric risk factors
<- as.numeric(inflation)
x2 <- as.numeric(growth)
x3
# Estimating APT model
<- lm(y1 ~ x1 + x2 + x3)
apt
# Display the regression results with significance stars and 4 digits
modelsummary(list("APT" = apt), stars = TRUE, fmt = 4)
~~~
- Fama and French have developed three factor asset pricing model (FF3) expanding the CAPM by two additional factors: SMB (Small Minus Big) as the difference in returns between small–cap stocks and large–cap stocks, and HML (High Minus Low) as the difference in returns between value stocks (high book–to–market ratio) and growth stocks (low book–to–market ratio)
\begin{equation} r_t=r_f+\beta_1 (r_m-r_f)+\beta_2 SMB_t + \beta_3 HML_t + u_t \tag{2.11} \end{equation}
- Market risk, size risk and value risk data can be downloaded from the Ken French Data Library link https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html