Learn R Programming

fGarch (version 260.72)

garchPredictor: GARCH Prediction Function

Description

Predicts a time series from a fitted GARCH object.

Usage

## S3 method for class 'fGARCH':
predict(object, n.ahead = 10, trace = FALSE, \dots)

Arguments

n.ahead
number of steps to be forecasted, an integer value, by default 10.
object
an object of class fGARCH as returned from the function garchFit().
trace
a logical flag. Should the prediction process be printed? By default trace=FALSE.
...
additional arguments to be passed.

Value

  • returns ...

Examples

Run this code
## garchSpec -
   spec = garchSpec()
   spec

## garchSim -
   x = garchSim(model = spec@model, n = 500)
   head(x) 

## garchFit - 
   # fit = garchFit(~garch(1, 1), data = x)
   # print(fit)
   ## Interactive Plot:
   ## plot(fit)
   ## Batch Plot:
   # plot(fit, which = 3)
   # summary(fit)
   
## predict -
   # predict(object, n.ahead = 10)

Run the code above in your browser using DataLab