Learn R Programming

fGarch (version 260.72)

garchSim: Univariate GARCH Time Series Simulation

Description

Simulates an univariate GARCH time series model.

Usage

garchSim(model = list(omega = 1.0e-6, alpha = 0.1, beta = 0.8), n = 100, 
    n.start = 100, presample = NULL, cond.dist = c("rnorm", "rged", "rstd", 
    "rsnorm", "rsged", "rsstd"), rseed = NULL)

Arguments

cond.dist
a character string naming the desired conditional distribution. Valid values are "dnorm", "dged", "dstd", "dsnorm", "dsged", "dsstd". The default value
model
a list of GARCH model parameters: omega - the constant coefficient of the variance equation, by default 1e-6; alpha - the value or vector of autoregressive coefficients, by default 0.1, specifying a mod
n
length of output series, an integer value. An integer value, by default n=100.
n.start
length of "burn-in" period, by default 100.
presample
a numeric three column matrix with start values for the series, for the innovations, and for the conditional variances. For an ARMA(m,n)-GARCH(p,q) process the number of rows must be at least max(m,n,p,q), longer presamples are
rseed
single integer argument, the seed for the intitialization of the random number generator for the innovations.

Value

  • returns an objects of class ts atrributed with an appropriate specification structure as returned by the function garchSpec.

Examples

Run this code
## garchSpec -
   spec = garchSpec()
   spec

## garchSim -
   x = garchSim(model = spec@model, n = 500)
   head(x)

Run the code above in your browser using DataLab