Learn R Programming

betategarch (version 3.3)

tegarchSim: Simulate from a first order Beta-Skew-t-EGARCH model

Description

Simulate the y series (typically interpreted as a financial return or the error in a regression) from a first order Beta-Skew-t-EGARCH model. Optionally, the conditional scale (sigma), log-scale (lambda), conditional standard deviation (stdev), dynamic components (lambdadagger in the 1-component specification, lambda1dagger and lambda2dagger in the 2-component specification), score (u) and centred innovations (epsilon) are also returned.

Usage

tegarchSim(n, omega = 0, phi1 = 0.95, phi2 = 0, kappa1 = 0.01, kappa2 = 0, kappastar = 0, df = 10, skew = 1, lambda.initial = NULL, verbose = FALSE)

Arguments

n
integer, length of y (i.e. no of observations)
omega
numeric, the value of omega
phi1
numeric, the value of phi1
phi2
numeric, the value of phi2
kappa1
numeric, the value of kappa1
kappa2
numeric, the value of kappa2
kappastar
numeric, the value of kappastar
df
numeric, the value of df (degrees of freedom)
skew
numeric, the value of skew (skewness parameter
lambda.initial
NULL (default) or initial value(s) of the recursion for lambda or log-volatility. If NULL then the values are chosen automatically
verbose
logical, TRUE or FALSE (default). If TRUE then a matrix with n rows containing y, sigma, lambda, lambdadagger, u and epsilon is returned. If FALSE then only y is returned

Value

A zoo vector of length n or a zoo matrix with n rows, depending on the value of verbose.

Details

Empty

References

Fernandez and Steel (1998), 'On Bayesian Modeling of Fat Tails and Skewness', Journal of the American Statistical Association 93, pp. 359-371.

Harvey and Sucarrat (2014), 'EGARCH models with fat tails, skewness and leverage'. Computational Statistics and Data Analysis 76, pp. 320-338.

Sucarrat (2013), 'betategarch: Simulation, Estimation and Forecasting of First-Order Beta-Skew-t-EGARCH models'. The R Journal (Volume 5/2), pp. 137-147.

See Also

tegarch, zoo

Examples

Run this code
##1-component specification: simulate series with 500 observations:
set.seed(123)
y <- tegarchSim(500, omega=0.01, phi1=0.9, kappa1=0.1, kappastar=0.05,
  df=10, skew=0.8)

##simulate the same series, but with more output (volatility, log-volatility or
##lambda, lambdadagger, u and epsilon)
set.seed(123)
y <- tegarchSim(500, omega=0.01, phi1=0.9, kappa1=0.1, kappastar=0.05, df=10, skew=0.8,
  verbose=TRUE)
  
##plot the simulated values:
plot(y)

##2-component specification: simulate series with 500 observations:
set.seed(123)
y <- tegarchSim(500, omega=0.01, phi1=0.95, phi2=0.9, kappa1=0.01, kappa2=0.05,
  kappastar=0.03, df=10, skew=0.8)

Run the code above in your browser using DataLab