Let me start with the code:

library(quantmod)
library(rugarch)
getSymbols("SPY", from="1900-01-01")
rets=na.trim(diff(log(Cl(SPY))))
tt = tail(rets["/2004-10-29"], 1000)
spec = ugarchspec(variance.model=list(garchOrder=c(1,1)),
mean.model=list(armaOrder=c(2,5)), distribution.model="sged")
for(ii in 1:10)
{
   ttFit = ugarchfit( spec=spec, data=as.vector(tt), out.sample=0,
solver.control=list(trace=F) )
   ttFore = ugarchforecast( ttFit, n.ahead=1, n.roll=0 )
   print( as.array(ttFore)[,2,] )
}

Produces two different results: -0.001087313 and -0.001092084, each
repeated a few times.

What is the explanation for that? Since they are based on previous data, I
was expecting single step forecasts to produce the same result.

Thanks in advance!
Ivan

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to