by Franziska » Wed Sep 05, 2012 12:47 pm
Hi Tom,
thank you very much for your help, I have replicated the Estrella and Mishkin (1998) tests for the spread, both in and out-of-sample. My results for the in-sample tests are pretty close, the small difference may be due to rounding or a different data source, but the out-of-sample pseudo R2s are off. I'm a little bit confused about the use of lagged explanatory variables in the out-of-sample test, the paper does not mention any lags for the spread(just spread_t), but then I get negative R2s for all forecast horizons. I attached the data files, my code is
@NBERCycles(peaks=peaks,troughs=troughs,up=ups,down=downs)
set spread = GS10 - TBill
*IN-SAMPLE**************
dis "In-Sample Estimation"
do i=1,8
DDV(DIST=PROBIT, robusterrors, noprint) downs 1959:1 1995:1
# constant spread{i}
prj(dist=probit,cdf=cdf)
set %s("fitprb"+i) = cdf
dis i "quarters ahead pseudo-R^2:" %Rsquared "t-stat:" %TSTATS(2)
end do
*OUT-OF-SAMPLE**********
clear(zeros) logl loglc
dis "Out-of-sample Estimation"
do i=1,8
do endperiod = 1970:4, 1995:1
DDV(DIST=PROBIT, noprint) downs 1959:1 endperiod
# constant spread{1}
prj(dist=probit,cdf=prb) * endperiod+i endperiod+i
ddv(dist=probit, noprint) downs 1959:1 endperiod
# constant
prj(distrib=probit,cdf=prbc) * endperiod+i endperiod+i
compute logl(endperiod)=log(%if(downs(endperiod+i),prb(endperiod+i),1-prb(endperiod+i)))
compute loglc(endperiod)=log(%if(downs(endperiod+i),prbc(endperiod+i),1-prbc(endperiod+i)))
end do endperiod
sstats 1970:4 1995:1 logl>>sumlogl loglc>>sumloglc
disp i "quarters ahead pseudo-R^2:" 1-(sumlogl/sumloglc)^((-2.0/%nobs)*sumloglc)
end do i
Thanks again,
Franziska
- Attachments
-
TBillsQuarterly.RAT
- (3.25 KiB) Downloaded 25 times
-
10yTreasuryQuarterly.RAT
- (2.5 KiB) Downloaded 25 times