Skip to content
Prev 140805 / 398506 Next

garch prediction

Hi, Yohan:  Please correct any misstatements I make in the the 
following.  Thanks. 


Fernandito: 

      I find it easier to consider a self-contained example, such as the 
following extension of the examples in ?garchFit and ?predict.fGARCH: 

library(fGarch)
spec = garchSpec()
x = garchSim(model = spec at model, n = 500)
fit = garchFit(~garch(1, 1), data = x)
predict(fit)
    meanForecast   meanError standardDeviation
1  -1.267306e-05 0.003268294       0.003116506
2  -1.267306e-05 0.003268294       0.003135122

      I believe that 'meanForecast' is the predicted value for 1, 2, 
etc., time periods in the future, and 'standardDeviation' is the 
predicted standard deviation of residuals from that 'meanForecast'.  
Thus, a 95% confidence (or prediction) interval for future observations 
is given by meanForecast +/- 2*standardDeviation. 

      To check this, I suggest you do two things: 

      (1) Modify the above code so fit = garchFit(~garch(1, 1), data = 
x[1:490]), then compute pred10 = predict(fit) and sRes = (x[491:500] - 
pred10[, 1])/pred10[, 3].  Do this, say, 100 times to produce 1,000 
values for sRes.  The results should be roughly normal with mean 0 and 
standard deviation 1.  If you do this, please report the results to this 
list. 

      (2) Type "predict.fGARCH" at a command prompt to get the code.  If 
you are unsure of what each step does, copy it into a script file, then 
request "debug(predict.fGARCH)", then predict(fit), and work through the 
code line by line until you understand what each line does.  This should 
also tell you what "meanError" is. 

      Hope this helps. 
      Spencer
fernandito wrote: