Learn R Programming

rugarch (version 1.5-2)

arfimaforecast-methods: function: ARFIMA Forecasting

Description

Method for forecasting from an ARFIMA model.

Usage

arfimaforecast(fitORspec, data = NULL, n.ahead = 10, n.roll = 0, out.sample = 0, 
external.forecasts = list(mregfor = NULL), ...)

Value

A ARFIMAforecast object containing details of the ARFIMA forecast. See the class for details on the returned object and methods for accessing it and performing some tests.

Arguments

fitORspec

Either an ARFIMA fit object of class ARFIMAfit or alternatively an ARFIMA specification object of class ARFIMAspec with valid parameters supplied via the fixed.pars argument in the specification.

data

Required if a specification rather than a fit object is supplied.

n.ahead

The forecast horizon.

n.roll

The no. of rolling forecasts to create beyond the first one (see details).

out.sample

Optional. If a specification object is supplied, indicates how many data points to keep for out of sample testing.

external.forecasts

A list with a matrix of forecasts for the external regressors in the mean.

...

.

Author

Alexios Ghalanos

Details

The forecast function has two dispatch methods allowing the user to call it with either a fitted object (in which case the data argument is ignored), or a specification object (in which case the data is required) with the parameters entered via the set.fixed<- methods on an ARFIMAspec object.
One step ahead forecasts are based on the value of the previous data, while n-step ahead (n>1) are based on the unconditional mean of the model.
The ability to roll the forecast 1 step at a time is implemented with the n.roll argument which controls how many times to roll the n.ahead forecast. The default argument of n.roll = 0 denotes no rolling beyond the first forecast and returns the standard n.ahead forecast. Critically, since n.roll depends on data being available from which to base the rolling forecast, the arfimafit function needs to be called with the argument out.sample being at least as large as the n.roll argument, or in the case of a specification being used instead of a fit object, the out.sample argument directly in the forecast function.