mlgarchSim: Simulate from a multivariate log-GARCH(1,1) model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Simulate the y series (typically a collection of financial returns or regression errors) from a log-GARCH model. Optionally, the conditional standard deviation and the standardised error, together with their logarithmic transformations, are also returned.

Usage

1
2
3
4
5
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(rep(1,
  length(constant))), check.stability = TRUE, verbose = FALSE)

Arguments

n

integer, i.e. number of observations

constant

vector with the values of the intercepts in the log-volatility specification

arch

matrix with the arch coefficients

garch

matrix with the garch coefficients

xreg

a vector (of length n) or matrix (with rows n) with the values of the conditioning variables. The first column enters the first equation, the second enters the second equation, and so on

backcast.values

backcast values for the recursion (chosen automatically if NULL)

check.stability

logical. If TRUE (default), then the system is checked for stability

innovations

Either NULL (default) or a vector or matrix of length n with the standardised errors. If NULL, then the innovations are multivariate N(0,1) with correlations equal to zero

innovations.vcov

numeric matrix, the variance-covariance matrix of the standardised multivariate normal innovations. Only applicable if innovations = NULL

verbose

logical. If FALSE (default), then only the matrix with the y series is returned. If TRUE, then also additional information is returned

Details

Empty

Value

A zoo matrix with n rows.

Author(s)

Genaro Sucarrat, http://www.sucarrat.net/

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, mlgarch and zoo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##simulate 1000 observations from a multivariate
##ccc-log-garch(1,1) w/default parameter values:
set.seed(123)
y <- mlgarchSim(1000)

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

##plot the simulated values:
plot(y)


Search within the lgarch package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.