Learn R Programming

fGarch (version 290.76)

predict-methods: 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
an integer value, denoting the number of steps to be forecasted, by default 10.
object
an object of class fGARCH as returned by the function garchFit.
trace
a logical flag. Should the prediction process be traced? By default trace=FALSE.
...
additional arguments to be passed.

Value

  • returns a data frame with the foloowing columns: "meanForecast", meanError, and "standardDeviation". The number of records equals the number of forecasting steps n.ahead.

Examples

Run this code
## garchFit - 
   # Parameter Estimation of Default GARCH(1,1) Model:
   fit = garchFit(~ garch(1, 1), data = garchSim(), trace = FALSE)
   fit

## predict -
   predict(fit, n.ahead = 10)

Run the code above in your browser using DataLab