Financial Toolbox    
ugarchsim

Simulate a univariate GARCH(P,Q) process with Gaussian innovations

Syntax

Arguments

Kappa
Scalar constant term of the GARCH process.
Alpha
P-by-1 vector of coefficients, where P is the number of lags of the conditional variance included in the GARCH process. Alpha can be an empty matrix, in which case P is assumed 0; when P = 0, a GARCH(0,Q) process is actually an ARCH(Q) process.
Beta
Q-by-1 vector of coefficients, where Q is the number of lags of the squared innovations included in the GARCH process.
NumSamples
Positive, scalar integer indicating the number of samples of the innovations U and conditional variance H (see below) to simulate.

Description

[U, H] = ugarchsim(Kappa, Alpha, Beta, NumSamples) simulates a univariate GARCH(P,Q) process with Gaussian innovations.

U is a number of samples (NUMSAMPLES)-by-1 vector of innovations (t), representing a mean-zero, discrete-time stochastic process. The innovations time series U is designed to follow the GARCH(P,Q) process specified by the inputs Kappa, Alpha, and Beta.

H is a NUMSAMPLES-by-1 vector of the conditional variances (t2) corresponding to the innovations vector U. Note that U and H are the same length, and form a "matching" pair of vectors. As shown in the following equation, t2 (i.e., H(t)) represents the time series inferred from the innovations time series {t} (i.e., U).

The time-conditional variance, t2, of a GARCH(P,Q) process is modeled as

where represents the argument Alpha, represents Beta, and the GARCH(P,Q) coefficients {, , } are subject to the following constraints.

Note that U is a vector of residuals or innovations (t) of an econometric model, representing a mean-zero, discrete-time stochastic process.

Although t2 is generated using the equation above, t and t2 are related as

where {vt} is an independent, identically distributed (i.i.d.) sequence ~ N(0,1).

The output vectors U and H are designed to be steady-state sequences in which transients have arbitrarily small effect. The (arbitrary) metric used by ugarchsim strips the first N samples of U and H such that the sum of the GARCH coefficients, excluding Kappa, raised to the Nth power, does not exceed 0.01.

Thus

Examples

This example simulates a GARCH(P,Q) process with P = 2 and Q = 1.

When the above code is executed, the screen output looks like the display shown.

See Also

ugarch, ugarchpred, and the GARCH Toolbox function garchsim

References

James D. Hamilton, Time Series Analysis, Princeton University Press, 1994


  ugarchpred weekday