Empirical Methods in Finance Homework 4
Prof. . Lochstoer January 30, 2022
Problem 1: Return forecasting regressions
1. Using CRSP, get monthly market returns ex and cum dividends, as well as the monthly t-bill rate, from 1963 to 2018. Create the market dividend yield by summing the div- idends over the last 12 months and divide by current price (you can do this using information extracted using the ex- and cum-dividend returns). Construct excess re- turns by subtracting the log of the 1-month gross t-bill rate from the 1-month gross cum-dividends returns. Note: to get to gross returns you may have to add 1 to the original data series.
Copyright By PowCoder代写 加微信 powcoder
From the St. data page (FRED; https://fred.stlouisfed.org/), get monthly data on the term and default spreads for the same sample. For the former, use the ”10- Year Treasury Constant Maturity Minus Federal Funds Rate,” for the latter subtract ”Moody’s Seasoned Aaa Corporate Bond Minus Federal Funds Rate ” from ”Moody’s Seasoned Baa Corporate Bond Minus Federal Funds Rate.”
2. Plot your data.
3. Using your three predictive variables (the lagged dividend yield, term spread, and default spread), forecast excess equity returns at the 1-month, 3-month, 12-month, 24-month, and 60-month horizons. Report your results from each of these regressions (regression coefficients, standard errors, and R2s). The underlying data is monthly, so make sure to explain your choice of standard errors.
Figure 1: One-month Excess Return
Figure 2: Default Spread
Figure 3: Dividend Yield
Figure 4: Term Spread
Newey-West standard errors are used here. The number of lags is chosen as (k-1) × 1.5. (k is the length of horizons).
Suggested solution for 3.
Dependent variable:
Dividend yield
Term spread
Default spread
0.304 (0.219)
0.921∗ (0.539)
3.669∗ (2.021)
5.224∗ (3.055)
5.650 (3.449)
0.081 0.345 1.252
(0.544) (1.595) (3.082)
7.719∗∗ 1.652 15.864∗
(4.587) (9.419)
−0.123 −0.181∗ (0.120) (0.108)
(0.114) (0.299) (1.052)
Constant −0.009 −0.027∗ −0.107 (0.006) (0.016) (0.066)
(1.497) (3.100)
Note: ∗p<0.1; ∗∗p<0.05; ∗∗∗p<0.01
4. Plot the estimated expected 12-month excess return that obtains from the forecast-
ing regressions of the 12-month excess return regression. What type of periods are 3
associated with high expected returns and what type of periods are associated with low expected returns. Does the patterns make sense to you? What are the economic stories you would tell to explain these patterns?
Suggested solution: One of many possible stories: Figure 5 plots the estimated excess returns and NBER recessions in the period we forecast over. We see that the periods where expected returns increase dramatically are also periods related to a re- cession. This is intuitive; during recessions, investors usually become more risk-averse. Many investors sell, leading to a decrease in stock prices. The inverse relationship be- tween prices and returns then leads to an increase in expected returns. In the periods succeeding the recessions, investors’ risk appetite usually grows. This leads to price pressure which drives stock prices up and expected returns down. This is also what we see in our plot, as expected returns seems to revert down after periods with high returns.
Figure 4: Estimated expected 12-month excess return. NBER recessions in pink shade.
5. In the last class, we used our AR toolkit to get infer expected returns at long horizons. Why do you think using, say, an AR(1)-type setting could be useful instead of simply regressing returns at different horizons on lagged predictive variables as we have done
in this problem?
Suggested solution:
An AR(1) is more efficient as we use monthly observations to estimate the model and then infer longer horizon expectations using the estimated AR(1) dynamics compared to simply regressing returns on lagged variables.
6. Using the 1-month forecast, calculate the Sharpe ratio of a strategy that uses portfolio
loading ωt = μt on the market, where μt = Et(rt+1) from your forecasting regression.
That is, compute strategy returns as ω Re , where ω is the time t expected return and t t+1 t
Re is the excess market return. Compare this to the Sharpe ratio of a buy-and-hold t+1
strategy (that is, simply using the returns Re ). t+1
Suggested solution:
Mean excess return
Fancy strategy 4.851837e-05 Buy-and-hold 0.004246375
Standard Deviation
0.000320459 0.04398547
Sharpe ratio
0.1514027 0.09654041
Problem 2: M/B ratios and the present value formula
In class, we derived a log-linear present value formula using the Campbell-Shiller return decomposition (rt+1 ≈ κ0 + ρ × pdt+1 − pdt + ∆dt+1). While this decomposition is very ac- curate, it does require a stationary pd-ratio and positive dividends. Many firms do not pay dividends, which means this formula is not always useful at the firm level.
However, Ohlson (1995) and Vuolteenaho (Journal of Finance, 2002) derive a return de- composition that uses market-to-book ratios and return-on-equity instead of the pd-ratio and dividends (See also Lochstoer and Tetlock (forthcoming Journal of Finance)). In particular, the return decomposition is:
rt+1 ≈ κ × mbt+1 − mbt + roet+1, (1) where κ = 0.97 with annual data, mbt = ln Mt/Bt and roet = ln (1 + ROEt). Here, Mt is
the market value of equity, Bt is the book value of equity, ROEt = Et is return-on-equity Bt−1
where Et is earnings. See the above papers for details. With this decomposition we have: ∞∞
mb =E κj−1roe t t
−E κj−1r . (2) t+j t t+j
Thus, if the market-to-book ratio is high today, either future expected return on equity is high or expected future returns are low. Vice versa if the market-to-book ratio is low today.
1. You estimate a firm’s annual roe to follow the ARMA(1,1):
roet+1 = 0.05 + 0.9 (roet − 0.05) − 0.6εt + εt+1, (3)
where σ(εt) = 0.1. Assume the current value of mbt = lnMt/Bt = 0.7, roet = ln(1 + ROEt) where ROEt = 0.2, and εt = 0.1. From this information, derive the current values of the below:
∞ CF = E κj−1roe ,
t t t+j j=1
Note that you can then obtain
DR = E κj−1r =CF−mb,
t t t+j t t
where (1 − κ) × DRt is an annualized measure of the long-run expected returns. What
is the current value of this expect long-run return?
2. Next, assume a different firm in the same industry also has roe that follows an ARMA(1,1) with the same parameters (for instance, you estimated the parameters of the ARMA using industrywide ROE data). For this firm, ROEt = −0.1, εt = −0.05, and mbt = 0.7. What is the current value of this firm’s annualized long-run expected return?
Suggested solution: 1. Note that
roet+1 = 0.05 + 0.9 (roet − 0.05) − 0.6εt + εt+1 is an ARMA(1,1). The one-period forecast is
Et(roet+1) = Et (0.05 + 0.9(roet − 0.05) − 0.6εt + εt+1) = 0.005 + 0.9roet − 0.6εt, 6
the two-period forecast is
Et(roet+2) = Et (0.05 + 0.9(roet+1 − 0.05) − 0.6εt+1 + εt+2) = 0.005 + 0.9Et(roet+1),
and the jth period forecast is
Et(roet+j ) = 0.05 + 0.9j−1 (Et[roet+1] − 0.5) .
κj−1roe =κj−1E (roe ),
This gives us
= κj−1 0.05 + 0.9j−1 [Et(roet+1) − 0.05] ,
j=1 = 2.13.
DRt = CFt − mbt = 1.43,
t+j t t+j j=1 j=1
(1 − 0.97)DRt = 4.3%.
2. We use the same procedure as in 1., but with the new values (ROEt = −0.1,
εt = −0.05, and mbt = 0.7). So, ∞∞
κj−1roe j=1
=κj−1E (roe ), t t+j
= κj−1 0.05 + 0.9j−1 [Et(roet+1) − 0.05] , j=1
and we get
DRt =0.8−0.7=0.1,
(1 − 0.97)DRt = 0.3%.
install.packages("readr")
install.packages("rJava")
install.packages(c("readxl","writexl"))
Sys.setenv(JAVA_HOME="C:\\Program Files\\Java\\jre7")
Sys.setenv(JAVA_HOME="C:\\Program Files (x86)\\Java\\jre7")
library(readxl)
library(writexl)
library(data.table)
library(moments)
library(zoo)
library(dplyr)
library(ggplot2)
library(lmtest)
library(sandwich)
library(ggplot2)
library(gridExtra)
library(scales)
library(stargazer)
library(readr)
## merge different data to one dataframe "m" ##
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
return <- fread(’CRSP.csv’, stringsAsFactors = T, showProgress = F)
return[,DATE:= as.Date(as.character(DATE),"%Y%m%d")]
return$ym<-format(as.Date(return$DATE),"%Y-%m")
#RF <- read_csv("RF.CSV", col_types = cols(DATE = col_date(format = "%d/%m/%Y")))
RF <- fread(’RF.csv’, stringsAsFactors = T, showProgress = F)
RF[,DATE:= as.Date(as.character(DATE),"%Y%m%d")]
RF$ym<-format(as.Date(RF$DATE),"%Y-%m")
RF$RF <- RF$TB3M/100
Term <- fread(’T10YFF.csv’, stringsAsFactors = T, showProgress = F)
Term[,DATE:= as.Date(as.character(DATE),"%Y-%m-%d")]
Term$ym<-format(as.Date(Term$DATE),"%Y-%m")
AAAFFM <- fread(’AAAFFM.csv’, stringsAsFactors = T, showProgress = F)
BAAFFM <- fread(’BAAFFM.csv’, stringsAsFactors = T, showProgress = F)
AAAFFM[,DATE:= as.Date(as.character(DATE),"%Y%m%d")]
BAAFFM[,DATE:= as.Date(as.character(DATE),"%Y%m%d")]
AAAFFM$ym<-format(as.Date(AAAFFM$DATE),"%Y-%m")
BAAFFM$ym<-format(as.Date(BAAFFM$DATE),"%Y-%m")
for (i in 1:nrow(return)){
return$price[i] <- prod(1 + return$vwretx[1:i])}
return$dividend<-(return$vwretd-return$vwretx)*lag(return$price)
return$dp<-rollapply(return$dividend,12,sum,align=’right’,fill=NA)/return$price
m<-merge(return,RF,by.x="ym",by.y="ym",all.x=TRUE,allow.cartesian=TRUE)
m<-merge(m,Term,by.x="ym",by.y="ym",all.x=TRUE,allow.cartesian=TRUE)
default<-merge(AAAFFM,BAAFFM,by.x="ym",by.y="ym",all.x=TRUE,allow.cartesian=TRUE)
default$df<-default$BAAFFM-default$AAAFFM
default$df<-default$df/100
m<-merge(m,default,by.x="ym",by.y="ym",all.x=TRUE, aloow.cartesian=TRUE)
m$T10YFF<-m$T10YFF/100
## m is provided. You could import the excel and run from here##
m$excess<-log(1+m$vwretd)-log(1+m$RF/12)
m$e3<-rollapply(m$excess,3,sum,align="left",fill=NA)
m$e12<-rollapply(m$excess,12,sum,align="left",fill=NA)
m$e24<-rollapply(m$excess,24,sum,align="left",fill=NA)
m$e60<-rollapply(m$excess,60,sum,align="left",fill=NA)
plot1 <- ggplot(m, aes(DATE.x.x, df, group = 1)) +
geom_line() +
scale_x_date(breaks = seq(as.Date("1936-01-01"), as.Date("2018-12-31"), by="10 years"),
labels=date_format("%Y"))
plot2<- ggplot(m, aes(DATE.x.x, T10YFF, group = 1)) +
geom_line() +
scale_x_date(breaks = seq(as.Date("1936-01-01"), as.Date("2018-12-31"), by="10 years"),
labels=date_format("%Y"))
plot3 <- ggplot(m, aes(DATE.x.x, dp, group = 1)) +
geom_line() +
scale_x_date(breaks = seq(as.Date("1936-01-01"), as.Date("2018-12-31"), by="10 years"),
labels=date_format("%Y"))
plot4 <- ggplot(m, aes(DATE.x.x, excess, group = 1)) +
geom_line() +
scale_x_date(breaks = seq(as.Date("1936-01-01"), as.Date("2018-12-31"), by="10 years"),
labels=date_format("%Y"))
r1<-lm(m$excess~lag(m$dp)+lag(m$T10YFF)+lag(m$df))
c1<-coeftest(r1,vcov=NeweyWest(r1,verbose=T,lag=0,prewhite=F,adjust=T))
r3<-lm(m$e3~lag(m$dp)+lag(m$T10YFF)+lag(m$df))
c3<-coeftest(r3,vcov=NeweyWest(r3,verbose=T,lag=3,prewhite=F,adjust=T))
r12<-lm(m$e12~lag(m$dp)+lag(m$T10YFF)+lag(m$df))
c12<-coeftest(r12,vcov=NeweyWest(r12,verbose=T,lag=17,prewhite = FALSE,adjust=T))
r24<-lm(m$e24~lag(m$dp)+lag(m$T10YFF)+lag(m$df))
c24<-coeftest(r24,vcov=NeweyWest(r24,verbose=T,lag=35,prewhite=FALSE,adjust=T))
r60<-lm(m$e60~lag(m$dp)+lag(m$T10YFF)+lag(m$df))
c60<-coeftest(r60,vcov=NeweyWest(r60,verbose=T,lag=89,prewhite=FALSE,adjust=T))
stargazer(c1,c3,c12,c24,c60)
pred = predict(r12,m)
pred = data.frame(m$DATE.x.x,pred)
ggplot(pred, aes(m.DATE.x.x, pred, group = 1)) +
geom_line() +
scale_x_date(breaks = seq(as.Date("1936-01-01"), as.Date("2018-12-31"), by="10 years"),
labels=date_format("%Y"))
m$omega_t1
m$omega_rf
m$ret_dynamic = m$omega_t1*log(1+m$vwretd) + m$omega_rf*log(1+m$RF/12)
m$ret_dynamic_exc = m$ret_dynamic - log(1+m$RF/12)
mean(m$ret_dynamic_exc ,na.rm = TRUE)/(var(m$ret_dynamic_exc ,na.rm = TRUE)^.5)
mean(m$excess, na.rm = TRUE)/(var(m$excess ,na.rm = TRUE)^.5)
= predict(r1,m)
= shift(m$omega_t, 1)
= 1-shift(m$omega_t, 1)
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com