tgarch_sim {fEGarch} | R Documentation |
Simulate From TGARCH Models
Description
A streamlined simulation function to simulate from TGARCH models.
Usage
tgarch_sim(
pars = list(mu = 0, ar = numeric(0), ma = numeric(0), D = 0, omega = 4e-04, phi = 0.05,
beta = 0.8, gamma = 0.1, df = 10, shape = 2, P = 3, skew = 1),
cond_dist = c("norm", "std", "ged", "ald", "snorm", "sstd", "sged", "sald"),
n = 1000,
nstart = 5000,
trunc = "none"
)
Arguments
pars |
a named list with the parameter specifications; the user can provide a named list with only the settings they would like to adjust relative to the default settings. |
cond_dist |
a one-element character vector specifying the conditional distribution to consider. |
n |
the number of observations to return. |
nstart |
the number of burn-in observations to simulate before
the final |
trunc |
a truncation for the finite-order coefficient series
in long-memory models; can either be the character |
Details
See the documentation on tgarch
for information
on the TGARCH model. This function provides
an easy way to simulate from these models.
Value
A list with four elements is returned: rt
are the simulated
observations, etat
are the underlying innovations,
sigt
are the correspondingly simulated conditional
standard deviations, and cmeans
are the simulated
conditional means. These four elements are formatted as
"ts"
class time series objects.
Examples
sim <- tgarch_sim(n = 1000)
mat <- do.call(cbind, sim)
plot(mat, main = "")