[R-SIG-Finance] Extracting the n-step-ahead estimates from fGarch

Brian G. Peterson brian at braverock.com
Tue Jul 14 17:21:56 CEST 2009

I've been experimenting with fitting a garch model to some instrument 
data.  It appears that the  conditional volatility for the instrument in 
question behaves pretty well in a GARCH(p,q) model.

I'm wondering if anyone has combined garchFit() and predict() from 
fGarch to effectively produce a "rolling prediction" on the series?

 predict(gtest, n.ahead = 10)

Will fit a GARCH(1,1) model to the data, and then predict 10 steps ahead 
on that model.  This is fine, but in the real world you'd want to 
predict on a rolling basis "out of sample", potentially refitting as 
each new observation comes in, or not, depending on the stability of 
your series.

Barring any input from the list, I'll probably do this using 
apply.fromstart from PerformanceAnalytics (wouldn't it be nice if 
rollapply in xts and zoo could fix the starting point for the roll?), 
and then collect the prediction at time t for time t+n, and then line up 
the predictions with the observed series when I'm done.

I'm hoping somebody has already written a wrapper like this and can save 
me some time.


  - Brian

Brian G. Peterson
Ph: 773-459-4973
IM: bgpbraverock

More information about the R-SIG-Finance mailing list