Learn R Programming

rmgarch (version 1.3-7)

fmoments-methods: Moment Based Forecast Generation

Description

Generates n-ahead forecast moment matrices given a choice of data generating processes.

Usage

fmoments(spec, Data, n.ahead = 1, roll  = 0, solver = "solnp", 
solver.control = list(), fit.control = list(eval.se = FALSE), 
cluster = NULL, save.output = FALSE, save.dir = getwd(), 
save.name = paste("M", sample(1:1000, 1), sep = ""), ...)

Arguments

Data

An n-by-m data matrix or data.frame.

spec

Either a DCCspec or GOGARCHspec.

n.ahead

The n.ahead forecasts (n.ahead>1 is unconditional).

roll

Whether to fit the data using (n - roll) periods and then return a (roll+1) n-ahead rolling forecast moments.

solver

The choice of solver to use for all models but “var”, and includes ‘solnp’, ‘nlminb’ and ‘nloptr’.

solver.control

Optional control options passed to the appropriate solver chosen.

fit.control

Control arguments passed to the fitting routine.

cluster

A cluster object created by calling makeCluster from the parallel package. If it is not NULL, then this will be used for parallel estimation of the refits (remember to stop the cluster on completion).

save.output

Whether output should be saved to file instead of being returned to the workspace.

save.dir

The directory to save output if save.output is TRUE.

save.name

The name of the file to save the output list.

...

Additional parameters passed to the model fitting routines. In particular, for the ‘gogarch’ model additional parameters are passed to the ICA routines, whereas for the ‘dcc’ and ‘cgarch’ models this would include the ‘realizedVol’ xts matrix for the realGARCH model.

Value

A '>fMoments object containing the forecast moments (list of length roll+1) and the model details (list).

Details

The function allows to generate forecast covariance matrices for use in the QP based EV model, and also for the “gogarch” model higher co-moment matrices for use in the Utility maximization model implemented separately.