Page 1 of 1

OLSHODRICK - Least squares with Hodrick standard errors

PostPosted: Tue Mar 22, 2011 5:22 pm
by TomDoan
This computes a least squares regression with the covariance matrix proposed by Hodrick(1992) "Dividend Yields and Expected Stock Returns: Alternative Procedures for Inference and Measurement", Review of Financial Studies, vol 5, no 3, 357-386.

Note that the calculation is specific to multiple step predictability regressions. It uses the residuals from a one-step regression to compute the covariance matrix for a k-step regression.

olshodrick.src
Procedure file - requires RATS 7.0 or later
(2.58 KiB) Downloaded 55 times


@OLSHodrick( options ) depvar start end
# list of explanatory variables


Options
STEPS=number of steps for the predictability regression
ONESTEP=one-step-ahead analogue to the <<depvar>>
EPS=one-step-ahead residuals
[PRINT]/NOPRINT

You must supply the STEPS option and either ONESTEP or EPS.

Example Program:

Code: Select all
calendar(m) 1988:11
open data aluminum.xls
data(format=xls,org=columns) 1988:11 2007:05 pzalul pzalul3
*
set logspot = log(pzalul)
set logforw = log(pzalul3)
set ret3    = logspot{-3}-logspot
set ret1    = logspot{-1}-logspot
set xchange = logforw-logspot
*
* Linear regression of three step ahead returns with conventional standard errors
*
linreg ret3
# constant xchange
*
* Same with Hodrick standard errors. ONESTEP=RET1 provides the one step ahead returns
* for computing the one-step residuals.
*
@OLSHodrick(steps=3,onestep=ret1) ret3
# constant xchange
*
* And with Newey-West standard errors
*
linreg(lwindow=newey,lags=2) ret3
# constant xchange


Data file for example:
aluminum.xls
(12.36 KiB) Downloaded 133 times