Generates n-ahead forecast moment matrices given a choice of data generating processes.
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 = ""), ...)
An n-by-m data matrix or data.frame.
Either a DCCspec or GOGARCHspec.
The n.ahead forecasts (n.ahead>1 is unconditional).
Whether to fit the data using (n - roll) periods and then return a (roll+1) n-ahead rolling forecast moments.
The choice of solver to use for all models but “var”, and includes ‘solnp’, ‘nlminb’ and ‘nloptr’.
Optional control options passed to the appropriate solver chosen.
Control arguments passed to the fitting routine.
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).
Whether output should be saved to file instead of being returned to the workspace.
The directory to save output if save.output is TRUE.
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.
A '>fMoments
object containing the forecast moments
(list of length roll+1) and the model details (list).
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.