OLSHODRICK Procedure |
@OLSHODRICK computes a least squares regression with the covariance matrix proposed by Hodrick(1992). 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. With STEPS=1 (that is, evaluating just the one-step ahead prediction), it's equivalent to Eicker-White standard errors (what you would get with LINREG with the ROBUSTERRORS option). With multiple step predictions, the errors would be expected to be serially correlated (up to order STEPS-1), but with a particular structure, which is exploited by Hodrick's procedure, and won't be used by other HAC standard error calculations (such as Newey-West).
@OLSHodrick( options ) depvar start end
# list of explanatory variables
Parameters
|
depvar |
dependent variable |
|
start, end |
range to estimate, defaults to maximum range permitted by all variables involved in the regression. |
Options
STEPS=number of steps for the predictability regression
ONESTEP=one-step-ahead analogue to thedepvar
EPS=one-step-ahead residuals
You must supply the STEPS option and either ONESTEP or EPS.
[PRINT]/NOPRINT
Example
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
Copyright © 2025 Thomas A. Doan