simulate.cgarch.estimate | R Documentation |
Simulates paths of a model.
## S3 method for class 'cgarch.estimate'
simulate(
object,
nsim = 1,
seed = NULL,
h = 100,
burn = 0,
Q_init = NULL,
Z_init = NULL,
init_method = c("start", "end"),
cond_mean = NULL,
sim_method = c("parametric", "bootstrap"),
...
)
## S3 method for class 'dcc.estimate'
simulate(
object,
nsim = 1,
seed = NULL,
h = 100,
burn = 0,
Q_init = NULL,
Z_init = NULL,
init_method = c("start", "end"),
cond_mean = NULL,
sim_method = c("parametric", "bootstrap"),
...
)
## S3 method for class 'gogarch.estimate'
simulate(
object,
nsim = 1,
seed = NULL,
h = 100,
burn = 0,
cond_mean = NULL,
sim_method = c("parametric", "bootstrap"),
...
)
object |
an estimated object from one of the models in the package. |
nsim |
the number of sample paths to generate. |
seed |
an integer that will be used in a call to set.seed before simulating. |
h |
the number of time steps to simulate paths for. |
burn |
burn in. Will be discarded before returning the output. |
Q_init |
an optional array of matrices of dimension n_series x n_series x maxpq for initializing the DCC model (not relevant in the constant correlation case), where maxpq is the maximum DCC model order. |
Z_init |
an optional matrix of size maxpq x m of initialization values for the standardized innovations of the DCC model. For this copula model, care should be taken as these represent the DCC copula standardized innovations, not the univariate GARCH innovations. |
init_method |
method to initialize the DCC and GARCH recursion (unless “Q_init” and “Z_init” are not NULL in which case those take priority for those inputs). The “start” method initializes the recursion with the same values used during estimation, whereas the “end” method uses the last values of the estimated model to initialize the recursion. In the constant correlation case, only the the GARCH initialization is relevant. |
cond_mean |
an optional matrix (h x n_series) of the simulated conditional mean for the series which is used to recenter the simulated distribution. |
sim_method |
white noise method for generating random sample for the multivariate distribution. The default “parametric” samples random variates from the underlying error distribution whilst the “bootstrap” samples from the whitened innovations of the fitted model. |
... |
no additional arguments currently supported. |
Part of the code makes use of parallel functionality via
the “future” package (see plan
). The dimension
the parallel execution operates on is the number of series (for the
individual GARCH series simulation), so unless you have more than 100 series
then it is possible that using a parallel back-end may actually result in
slower execution due to the overhead involved.
A simulation class object for which methods exists for extracting relevant statistics such as the correlation, covariance, etc.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.