Learn R Programming

rugarch (version 1.4-2)

ugarchpath-methods: function: Univariate GARCH Path Simulation

Description

Method for simulating the path of a GARCH model from a variety of univariate GARCH models. This is a convenience function which does not require a fitted object (see note below).

Usage

ugarchpath(spec, n.sim=1000, n.start=0, m.sim=1, presigma=NA, prereturns=NA,
preresiduals=NA, rseed=NA, custom.dist=list(name=NA,distfit=NA), mexsimdata=NULL,
vexsimdata=NULL, trunclag=1000, ...)

Arguments

spec

A univariate GARCH spec object of class '>uGARCHspec with the required parameters of the model supplied via the fixed.pars list argument or setfixed<- method.

n.sim

The simulation horizon.

n.start

The burn-in sample.

m.sim

The number of simulations.

presigma

Allows the starting sigma values to be provided by the user.

prereturns

Allows the starting return data to be provided by the user.

preresiduals

Allows the starting residuals to be provided by the user.

rseed

Optional seeding value(s) for the random number generator. For m.sim>1, it is possible to provide either a single seed to initialize all values, or one seed per separate simulation (i.e. m.sim seeds). However, in the latter case this may result in some slight overhead depending on how large m.sim is. It is now recommended not to provide a value (i.e., keep the default of rseed == NA) and to call set.seed only once in the beginning of the session, which will ensure reproducibility.

custom.dist

Optional density with fitted object from which to simulate. See notes below for details.

mexsimdata

List of matrices (size of list m.sim, with each matrix having n.sim rows) of simulated external regressor-in-mean data. If the fit object contains external regressors in the mean equation, this must be provided else will be assumed zero.

vexsimdata

List of matrices (size of list m.sim, with each matrix having n.sim rows) of simulated external regressor-in-variance data. If the fit object contains external regressors in the variance equation, this must be provided else will be assumed zero.

trunclag

This is the truncation lags for the binomial expansion in the FIGARCH model

...

If the model is the “csGARCH”, then preq can be used to denote the previous value of the permanent component of the variance model (q, e.g. tail(fit@fit$q,1)) so that the ugarchpath method with all pre-values included will evaluate to the same result as the ugarchsim method with method equal to “sample” (assuming the same random seeding values are used).

Value

A '>uGARCHpath object containing details of the GARCH path simulation.

Details

This is a convenience method to allow path simulation of various GARCH models without the need to supply a fit object as in the ugarchsim method. Instead, a GARCH spec object is required with the fixed model parameters. The mcsGARCH model is not supported for the path method-use ugarchsim instead.

See Also

For specification ugarchspec, fitting ugarchfit, filtering ugarchfilter, forecasting ugarchforecast, simulation ugarchsim, rolling forecast and estimation ugarchroll, parameter distribution and uncertainty ugarchdistribution, bootstrap forecast ugarchboot.

Examples

Run this code
# NOT RUN {
# create a basic sGARCH(1,1) spec:
spec=ugarchspec(variance.model=list(model="sGARCH", garchOrder=c(1,1)),
		mean.model=list(armaOrder=c(0,0), include.mean=TRUE, garchInMean =
		FALSE, inMeanType = 2), distribution.model="sstd",
		fixed.pars=list(mu=0.001,omega=0.00001, alpha1=0.05, beta1=0.90,
		shape=4,skew=2))
# simulate the path
path.sgarch = ugarchpath(spec, n.sim=3000, n.start=1, m.sim=1)
# }

Run the code above in your browser using DataLab