An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111205/9a0650b4/attachment.pl>
rugarch package: is this forecast correct?
2 messages · Ivan Popivanov, R. Michael Weylandt
The calculation is numerically stable on my machine: I'd mark it up as computational/floating-point error and not worry about it. Michael On Mon, Dec 5, 2011 at 11:13 PM, Ivan Popivanov
<ivan.popivanov at gmail.com> wrote:
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 at 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.