Learn R Programming

lgarch (version 0.2)

mlgarchSim: Simulate from a multivariate log-GARCH model

Description

Simulate from a multivariate log-GARCH(1,1) model (higher orders will be available in future versions)

Usage

mlgarchSim(n, constant = c(0, 0), arch = diag(c(0.1, 0.05)), garch = diag(c(0.7, 0.8)),
  xreg = NULL, backcast.values = list(lnsigma2 = NULL, lnz2 = NULL, xreg = NULL),
  innovations = NULL, innovations.vcov = diag(c(1, 1)), verbose = FALSE)

Arguments

n
integer, i.e. the number of observations
constant
vector with the log-volatility intercepts
arch
matrix with arch terms
garch
matrix with garch terms
xreg
matrix with the X-variables. Column 1 should contain the x-regressor of equation 1, column 2 that of equation 2, and so on
backcast.values
backcast values for the recursion (chosen automatically if NULL)
innovations
Etiher NULL (default) or a matrix (rows n and columns equal to model-dimension) containing the standardised innovations. If NULL, then the innovations are N(0,1)
innovations.vcov
This argument is available only if innovations=NULL. In that case, the innovations.vcov argument contains the variance-covariance matrix of the normal innovations
verbose
logical. If FALSE (default), then only the matrix y is returned. If TRUE, then all the output is returned

Value

  • A zoo matrix with rows n. If verbose = TRUE, then all the output is returned.

Details

Empty

References

Sucarrat, Gronneberg and Escribano (2013), 'Estimation and Inference in Univariate and Multivariate Log-GARCH-X Models When the Conditional Density is Unknown', MPRA Paper 49344: http://mpra.ub.uni-muenchen.de/49344/

See Also

lgarchSim, lgarch, zoo

Examples

Run this code
##simulate 500 observations w/default parameter values from
##a 2-dimensional log-garch(1,1):
set.seed(123)
y <- mlgarchSim(500)

##simulate the same series, but with more output:
set.seed(123)
y <- mlgarchSim(500, verbose=TRUE)
head(y)

##plot the simulated values:
plot(y)

Run the code above in your browser using DataLab