Learn R Programming

tswge (version 2.1.0)

gen.garch.wge: Generate a realization from a GARCH(p0,q0) model

Description

Generates a realization of length n from the GARCH(p0,q0) model (4.26) in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott

Usage

gen.garch.wge(n,alpha0,alpha,beta,plot=TRUE,sn=0)

Value

returns the generated realization

Arguments

n

Length of realization to be generated

alpha0

The constant alpha0 in model (4.23)

alpha

A vector of length q0 containing alpha1 through alphaq0

beta

A vector of length p0 containing beta1 through betap0

plot

If plot=TRUE (default) the generated realization is plotted

sn

determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time

Author

Wayne Woodward

References

"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott

Examples

Run this code
gen.garch.wge(n=200,alpha0=.1,alpha=.45,beta=.45)

Run the code above in your browser using DataLab