On Wed, 4 Apr 2012, Daniel Bencik wrote:
how could this happen? If I have a significantly better
forecast of the High and of Low, how can there be no gains
in forecasting their difference?
Precisely because you're assuming these two variables are
cointegrated. I'm appending an illustrative script below.
Is there a way for me to reconstruct the (in sample)
predicted series from a VECM model?
fcast, using the estimation range.
There is a "Save residuals for Eq1 and Eq2" in Model
results
window, do these residuals apply to High/Low prices or
d_High/d_Low
They apply to the differenced series.
<hansl>
/* script to illustrate the point that a VECM that omits
an unrestricted exogenous driver may forecast the
difference between two cointegrated variables just as
well as a model that includes the exogenous driver
(and therefore produces a better fit for the levels
of the cointegrated series)
*/
nulldata 200
setobs 4 1960:1
set seed 9756421
set echo off
set messages off
# generate cointegrated data
series x = 3*uniform()
series y1 = cum(normal() + x)
series y2 = y1 + normal()
# verify that cointegrating rank = 1
coint2 1 y1 y2 ; x
# create first differences for OLS below
diff y1 y2
# leave an out-of-sample period
smpl ; -8
# VECM omitting x
vecm 1 1 y1 y2 --silent
fcast 2008:1 2009:4 --quiet
matrix fcdiff1 = $fcast[,1] - $fcast[,2]
series EC = $ec
ols d_y1 0 EC --quiet
R2_11 = $rsq
ols d_y2 0 EC --quiet
R2_12 = $rsq
# VECM including x
vecm 1 1 y1 y2 ; x --silent
fcast 2008:1 2009:4 --quiet
matrix fcdiff2 = $fcast[,1] - $fcast[,2]
series EC = $ec
ols d_y1 0 EC x --quiet
R2_21 = $rsq
ols d_y2 0 EC x --quiet
R2_22 = $rsq
# get forecast statistics for y1 - y2
smpl 2008:1 2009:4
matrix ydiff = {y1} - {y2}
matrix fs1 = fcstats(ydiff, fcdiff1)
matrix fs2 = fcstats(ydiff, fcdiff2)
printf "\nVECM omitting x:\n"
printf " R^2 for d_y1 = %.4f, for d_y2 = %.4f\n",
R2_11, R2_12
printf " Out-of-sample forecast MSE = %g\n", fs1[2]
printf "\nVECM including x:\n"
printf " R^2 for d_y1 = %.4f, for d_y2 = %.4f\n",
R2_21, R2_22
printf " Out-of-sample forecast MSE = %g\n\n", fs2[2]
</hansl>
Running the above script gives:
VECM omitting x:
R^2 for d_y1 = 0.0044, for d_y2 = 0.3387
Out-of-sample forecast MSE = 0.967382
VECM including x:
R^2 for d_y1 = 0.4567, for d_y2 = 0.5582
Out-of-sample forecast MSE = 0.982461
Allin Cottrell