Problems 1-6 on pages 511-512 of Ruppert/Matteson.
In our solution we require running the following code to extract the data and fit our model.
# Set up --------------------------------------------------------------------
url = paste0("https://people.orie.cornell.edu/davidr/SDAFE/data/",
"Stock_FX_Bond_2004_to_2006.csv")
dat = read.csv(url, header = TRUE)
prices = dat[ , c(5, 7, 9, 11, 13, 15, 17, 24)]
n = dim(prices)[1]
# convert the risk-free rate to a daily rate,
# compute net returns, extract the Treasury rate, and
# compute excess returns for the market and for seven stocks.
dat2 = as.matrix(cbind(dat[(2:n), 3] / 365,
100 * (prices[2:n,] / prices[1:(n-1), ] - 1)))
names(dat2)[1] = "treasury"
risk_free = dat2[,1]
ExRet = dat2[ ,2:9] - risk_free
market = ExRet[ ,8]
stockExRet = ExRet[ ,1:7]
# Now fit model (17.20) to each stock, compute the residuals, look at a
# scatterplot matrix of the residuals, and extract the estimated betas.
fit_reg = lm(stockExRet ~ market)
summ = summary(fit_reg)
res = residuals(fit_reg)
# pairs(res)
options(digits = 3)
betas = fit_reg$coeff[2, ]
1. \(\mathbf{Solution.}\qquad\) We extract the p-values for the intercept \(\alpha\) from each fitted regression model and check if any are significant.
# QUESTION 1 -------------------------------------------------------------
J = ncol(stockExRet) # Number of Stocks
p_vals = rep(0, J)
for (i in 1:J) { p_vals[i] = coef(summ)[[i]][1,4] }
# Create Table
df = data.frame(matrix(p_vals, ncol = length(p_vals)))
colnames(df) = colnames(stockExRet)
cap = "$p$-values for $\\alpha_j$"
kable(df, digits = 3, caption = cap) %>%
kable_styling(latex_options = c("striped", "hold_position"))
GM_AC | F_AC | UTX_AC | CAT_AC | MRK_AC | PFE_AC | IBM_AC |
---|---|---|---|---|---|---|
0.421 | 0.143 | 0.389 | 0.234 | 0.912 | 0.409 | 0.312 |
From Table 1 we see that none of the \(p\)-values of the \(\alpha_j\) intercepts are significant so we fail to reject the null that any of the \(\alpha_j = 0\).
2. \(\mathbf{Solution.}\qquad\) Below we estimate expected excess returns for each of the 7 stocks using our fitted model and compare these estimates to the sample means of stock excess returns. We see that both estimates differ.
# QUESTION 2 ---------
mu_Mt = mean(market)
# Expected excess return for all seven stocks using fitted model
E_ex_ret = t(mu_Mt * betas)
# Create Table
df = data.frame(E_ex_ret)
colnames(df) = colnames(stockExRet)
kable(E_ex_ret, caption = "Expected Excess Returns from fitted model") %>%
kable_styling(latex_options = c("striped", "hold_position"))
GM_AC | F_AC | UTX_AC | CAT_AC | MRK_AC | PFE_AC | IBM_AC |
---|---|---|---|---|---|---|
0.023 | 0.024 | 0.019 | 0.027 | 0.015 | 0.018 | 0.016 |
# Sample means of the excess returns
sampMeans = colMeans(stockExRet)
# Create Table
kable(t(sampMeans), caption = "Sample Means of Stock Excess Returns") %>%
kable_styling(latex_options = c("striped", "hold_position"))
GM_AC | F_AC | UTX_AC | CAT_AC | MRK_AC | PFE_AC | IBM_AC |
---|---|---|---|---|---|---|
-0.045 | -0.074 | 0.049 | 0.084 | 0.007 | -0.022 | -0.016 |
3. \(\mathbf{Solution.}\qquad\) From the correlation matrix of residuals below, we see that GM and Ford are the most highly correlated with correlation equal to 0.51. This makes sense since they are both American automotive companies.
4. \(\mathbf{Solution.}\qquad\) To estimate the covariance matrix of returns, we use the following formulas, \[\begin{aligned} \sigma_{j}^{2} &=\beta_{j}^{2} \sigma_{M}^{2}+\sigma_{\epsilon, j}^{2} \\ \sigma_{j j^{\prime}} &=\beta_{j} \beta_{j^{\prime}} \sigma_{M}^{2} \text { for } j \neq j^{\prime} \end{aligned} \]
# QUESTION 4 ---------
betas = matrix(betas, ncol = 1)
v_e = apply(res, 2, var)
Sigma_hat = betas %*% t(betas) * var(market) + diag(v_e)
# Create Table
Sigma_hat = data.frame(Sigma_hat)
colnames(Sigma_hat) = colnames(stockExRet)
rownames(Sigma_hat) = colnames(stockExRet)
kable(Sigma_hat, caption = "Estimated Covariance Matrix of Excess Stock Returns") %>%
kable_styling(latex_options = c("striped", "hold_position"))
GM_AC | F_AC | UTX_AC | CAT_AC | MRK_AC | PFE_AC | IBM_AC | |
---|---|---|---|---|---|---|---|
GM_AC | 5.512 | 0.686 | 0.541 | 0.781 | 0.416 | 0.526 | 0.455 |
F_AC | 0.686 | 3.673 | 0.557 | 0.804 | 0.428 | 0.542 | 0.468 |
UTX_AC | 0.541 | 0.557 | 1.230 | 0.634 | 0.338 | 0.427 | 0.370 |
CAT_AC | 0.781 | 0.804 | 0.634 | 2.441 | 0.487 | 0.617 | 0.534 |
MRK_AC | 0.416 | 0.428 | 0.338 | 0.487 | 3.329 | 0.328 | 0.284 |
PFE_AC | 0.526 | 0.542 | 0.427 | 0.617 | 0.328 | 2.004 | 0.359 |
IBM_AC | 0.455 | 0.468 | 0.370 | 0.534 | 0.284 | 0.359 | 0.992 |
5. \(\mathbf{Solution.}\qquad\) Below we compute the percentage of the excess return variance for UTX that is due to the market.
# QUESTION 5 ---------
v_M = (betas^2) * var(market)
total_V = v_M + v_e
UTX = (v_M / total_V)[3]
UTX
## [1] 0.357
6. \(\mathbf{Solution.}\qquad\) Below we estimate the expected excess returns for the seven stocks for next year assuming that the excess return on the market next year will be 4%.
## [,1] [,2] [,3] [,4] [,5] [,6] [,7]
## [1,] 4.81 4.95 3.91 5.64 3 3.8 3.28
Exercise 11 on page 514 of Ruppert/Matteson, with the following adjustments.
Suppose there are three risky assets with the following betas and \(\sigma_{\epsilon_{j}}^{2}\) when regressed on the market portfolio. \[ \begin{array}{c|c|c} j & \beta_{j} & \sigma_{\epsilon_{j}}^{2} \\ \hline 1 & 0.8 & 0.012 \\ 2 & 0.9 & 0.025 \\ 3 & 0.7 & 0.015 \end{array} \]
Assume \(\epsilon_{1}, \epsilon_{2},\) and \(\epsilon_{3}\) are uncorrelated. Suppose also that the variance of \(R_{M}-\mu_{f}\) is 0.02
(a) \(\mathbf{Solution.}\qquad\) Using the CAPM regression model with no intercept, the excess returns of asset \(j\) are defined as, \[\begin{equation} R_{j}-\mu_{f}=\beta_{j}\left(R_{M}-\mu_{f}\right)+\varepsilon_{j}\label{eq:1} \end{equation}\]
Then we can define our equally-weighted portfolio as, \[ R_{p}=\frac{1}{3}\sum_{j=1}^{3}R_{j} \]
Applying the CAPM formula (\ref{eq:1}) to \(R_{p}\) we have, \[\begin{align} R_{p}-\mu_{F} & =\beta_{p}\left(R_{M}-\mu_{f}\right)+\varepsilon_{p}\label{eq:2} \end{align}\]
where, \[ \beta_{p}=\frac{1}{3}(0.8+0.9+0.7)=\clyx(\frac{1}{3}(0.8+0.9+0.7)) \]
(b) \(\mathbf{Solution.}\qquad\) We take the variance of equation (\ref{eq:2}), \[\begin{align*} \textrm{Var}\left(R_{p}-\mu_{f}\right) & =\textrm{Var}\left(\beta_{p}\left(R_{M}-\mu_{f}\right)+\varepsilon_{p}\right)\\ & =\beta_{p}^{2}\textrm{Var}\left(R_{M}-\mu_{f}\right)+\textrm{Var}\left(\varepsilon_{p}\right)\\ & =(0.8)^{2}(0.02)+\left(\frac{1}{3}\right)^{2}(0.012+0.025+0.015)\\ & =\clyx((0.8)^{2}(0.02))+\clyx(\left(\frac{1}{3}\right)^{2}(0.012+0.025+0.015))\\ & \approx\clyx((0.8)^{2}(0.02)+\left(\frac{1}{3}\right)^{2}(0.012+0.025+0.015)) \end{align*}\]
(c) \(\mathbf{Solution.}\qquad\) The proportion of risk for asset \(1\) is calculated as, \[\begin{align*} \frac{\beta_{1}^{2}\sigma_{M}^{2}}{\beta_{1}^{2}\sigma_{M}^{2}+\sigma_{\varepsilon_{1}}^{2}} & =\frac{(0.8)^{2}(0.02)}{(0.8)^{2}(0.02)+0.012}\\ & =\clyx(\frac{(0.8)^{2}(0.02)}{(0.8)^{2}(0.02)+0.012}) \end{align*}\]
Consider time series model of \[ X_{n}=U \delta_n + \epsilon_n \]
where \(\delta_{1}, \delta_{2}, \ldots\) are iid rvs with mean 1 and variance of \(1, \epsilon_{1}, \epsilon_{2}, \ldots\) are iid rvs with mean 0 and variance of \(\frac{1}{4}\) and are independent of \(\left\{\delta_{i}\right\}_{i=1}^{\infty},\) and \(U\) is Uniform \((0,1)\) rv which is independent of \(\left\{\epsilon_{i}\right\}_{i=1}^{\infty}\) and \(\left\{\delta_{i}\right\}_{i=1}^{\infty}\)
(a) \(\mathbf{Solution.}\qquad\) First we calculate the mean function, \[\begin{align*} \mu_{X}(n) & =\mathbb{E}\left[X_{n}\right]\\ & =\mathbb{E}\left[U\delta_{n}+\varepsilon_{n}\right]\\ & =\mathbb{E}[U]\mathbb{E}\left[\delta_{n}\right]+\mathbb{E}\left[\varepsilon_{n}\right]\\ & =\frac{1}{2}(1)+0=\frac{1}{2} \end{align*}\]
Next, we calculate the auto-covariance function \[\begin{align} \Sigma_{X}(m,n) & =\textrm{Cov}\left(X_{m},X_{n}\right)\nonumber \\ & =\textrm{Cov}\left(U\delta_{m}+\varepsilon_{m},U\delta_{n}+\varepsilon_{n}\right)\nonumber \\ & =\textrm{Cov}\left(U\delta_{m},U\delta_{n}\right)+\underbrace{\textrm{Cov}\left(U\delta_{m},\varepsilon_{n}\right)}_{=0}+\underbrace{\textrm{Cov}\left(\varepsilon_{m},U\delta_{n}\right)}_{=0}+\textrm{Cov}\left(\varepsilon_{m},\varepsilon_{n}\right)\nonumber \\ & =\textrm{Cov}\left(U\delta_{m},U\delta_{n}\right)+\textrm{Cov}\left(\varepsilon_{m},\varepsilon_{n}\right)\label{eq:3} \end{align}\]
where, \[ \textrm{Cov}\left(\varepsilon_{m},\varepsilon_{n}\right)=\begin{cases} \frac{1}{4} & \text{if }m=n\\ 0 & \text{if }m\neq n \end{cases} \]
and, \[\begin{align*} \textrm{Cov}\left(U\delta_{m},U\delta_{n}\right) & =\mathbb{E}\left[U^{2}\delta_{m}\delta_{n}\right]-\mathbb{E}\left[U\delta_{m}\right]\mathbb{E}\left[U\delta_{n}\right]\\ & =\mathbb{E}\left[U^{2}\right]\mathbb{E}\left[\delta_{m}\delta_{n}\right]-\left(\frac{1}{2}\right)^{2}\\ & =\frac{1}{3}\mathbb{E}\left[\delta_{m}\delta_{n}\right]-\frac{1}{4} \end{align*}\]
where, \[ \mathbb{E}\left[\delta_{m}\delta_{n}\right]=\begin{cases} 2 & \text{if }m=n\\ 1 & \text{if }m\neq n \end{cases} \]
Then equation (\ref{eq:3}) becomes, \[ \Sigma_{X}(m,n)=\begin{cases} \frac{1}{3}(2)-\frac{1}{4}+\frac{1}{4}=\frac{2}{3} & \text{if }m=n\\ \frac{1}{3}(2)-\frac{1}{4}=\frac{1}{12} & \text{if }m\neq n \end{cases} \]
We know that a weakly stationary time series is both,
This holds true by the \(\mu_{X}\left(n\right)\) and \(\Sigma_{X}(m,n)\) we computed above.
(b) \(\mathbf{Solution.}\qquad\) To compute the auto-correlation function, we compute, \(\Sigma_{X}(m,m)=\operatorname{Cov}\left(X_{m},X_{m}\right),\) which we know from part a) is equal to \(\frac{2}{3}\). Thus, \[ \rho_{X}\left(h\right)=\begin{cases} \frac{2/3}{2/3}=1 & \text{if }h=0\\ \frac{1/12}{2/3}=\frac{1}{8} & \text{if }h\neq0 \end{cases} \]
The auto-correlation function shows that the correlation between past and future events will always be equal to \(1/8\). This does not satisfy the definition of an ergodic time-series since past and future events should be approximately independent and thus have \(0\) correlation.