[R-SIG-Finance] Window size in ugarchroll of rugarch package?

Alexandra Bridges alexandbridges at gmail.com
Wed Jun 12 17:31:11 CEST 2013


Hi,
I did already a post to the list about another problem and you helped
me out, but this time, I have problems with understanding the
ugarchroll command:

I want to use a reestimation every day, which uses 400 observations.
The first window should use the first 400 observations. Therefore, I
set n.start to 400 and window.size to 400, my code (the rolling
estimation takes about 2.1 minutes):

library(rugarch)
data(sp500ret)

datamodified<-  subset(sp500ret, row(sp500ret) < 1001)

myspecification<-ugarchspec(variance.model = list(model = "sGARCH",
garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(0, 0), include.mean = FALSE),
distribution.model = "norm")

rolling = ugarchroll(myspecification, datamodified, n.start=400,
 refit.every = 1, refit.window = 'moving', window.size = 400,
  calculate.VaR = FALSE, keep.coef = TRUE)

show(rolling)

So the first forecast is for the 401th day, the 1988-10-06.

I now want to verify the results by reestimation one certain window, I
have choosen the third window:

coef(rolling)[[3]]

This window shows, that it uses observations until 1988-10-07 (the
date is the "ending date of each estimation window."). The estimates
output of this window is:

           Estimate   Std. Error  t value     Pr(>|t|)
omega  0.0000148153 1.133298e-05 1.307272 1.911203e-01
alpha1 0.2977622797 1.801401e-01 1.652948 9.834147e-02
beta1  0.6972828253 1.328726e-01 5.247754 1.539647e-07

I now want to reproduce them with one single ugarchfit-command:

thirdwindow<-datamodified[2:402,1]
fitverify<-ugarchfit(spec=myspecification,data=thirdwindow)
coef(fitverify)

This gives the same estimates. BUT this uses 401 observations?
length(2:402) is 401 and not just 400? So why is not 3:402 correct? If
I do it with 3:402 it leads to different estimates?

Thanks a lot for your help!

--
Alexa Bridges



More information about the R-SIG-Finance mailing list