garchModelling {fSeries}R Documentation

Univariate GARCH Time Series Modelling

Description

Functions to simulate artificial ARCH time series processes, to fit the parameters of univariate time series to ARCH models, to perform a diagnostic analysis of the fit, and to predict future values of the time series.

The family of GARCH time series models includes the following processes:

1 garch generalized AR conditional heteroskedastic models,
2 aparch asymmetretic power ARCH models.

Note: This collection is currently under a complete reconstruction. It will come back soon allowing for general ARMA-GARCH modelling and forecasting, including ARMA specifiations for the mean and GARCH/APARCH specifications for the variance.

Usage

garchSim(model = list(omega = 1e-6, alpha = 0.1, beta = 0.8, 
        mu = 0), n = 100, innov = NULL, n.start = 100, 
        start.innov = NULL, rand.gen = rnorm, ...)
garchFit(x, order = c(1, 1),  ...)

## S3 method for class 'fGARCH':
print(x, ...)
## S3 method for class 'fGARCH':
summary(object, ...)
## S3 method for class 'fGARCH':
print.summary(x, ...)

aparchSim(model = list(omega = 1.0e-6, alpha = 0.1, gamma = 0, 
        alpha.lags = 1, beta = 0.8, beta.lags = 1, delta = 1), n = 100, 
        innov = rand.gen(n, ...), n.start = 100, start.innov = NULL, 
        rand.gen = rnorm, ...)        
aparchFit(x, order = list(alpha.lags = 1, beta.lags = 1, delta = 2), 
        opt = list(gamma = FALSE, delta = FALSE, disparm = FALSE), 
        distribution = c("norm", "t", "symstb"), disparm = c(1, 4, 1.9), 
        n.cond = NULL, doprint = TRUE, method = "Nelder-Mead", ...)

## S3 method for class 'fAPARCH':
print(x, ...)
## S3 method for class 'fAPARCH':
summary(object, ...)
## S3 method for class 'fAPARCH':
print.summary(x, ...)

Arguments

disparm the distribution parameter. For the distribution "norm" disparm will not be used, for the "Student-t" distribution the distribution parameter is the number of degrees of freedom, and for the symmetric stable "symstb" distribution the distribution parameter is the tail index alpha.
distribution a character string describing the distribution of innovations. By default the optimization is based on gaussian log likelihood parameter optimization denoted by "norm". Alternatively, a "Student-t" or "symmetric stable", "symstb" can be chosen.
doprint a logical, if set to TRUE, the iteration path of the optimization will be printed.
innov a univariate time series or vector of innovations to produce the series. If not provided, innov will be generated using rand.gen. Missing values are not allowed. A numeric vector.
method a character string denoting the optimization method, by default "Nelder-Mead".
model List of GARCH model parameters: omega the constant coefficient of the variance equation, must be defined; alpha the vector of autoregressive coefficients, must be defined; beta the vector of variance coefficients, optional; mu, the mean value.
List of APARCH model parameters: omega the omega parameter, a numeric value; alpha the "ar" coefficients, a numeric vector; gamma the asymmetry coefficients, a numeric vector of same length as "alpha"; alpha.lags an integer vector denoting to which lags the "alpha" coefficients belong; beta the "ma" coefficients, a numeric vector; beta.lags an integer vector denoting to which lags the "beta" coefficients belong; delta the "delta" exponent. The default model is Taylor Schwert GARCH(1,1) model.
n length of output series, an integer value.
n.cond number of omitted start terms on which the MLE is conditioned. If set to NA, the number of terms is automatically set to the sum of the two largest lags of the alpha and beta coefficients.
n.start the number of start-up values. The start-up innovations will be generated by rand.gen if start.innov is not provided. An integer value by default 100. Missing values are not allowed.
object [summary] - a fitted GARCH or APARCH time series object.
opt vector of logicals, determins which parameters will be optimized. By default, the gamma coefficients, the delta exponent and the disparm distribution parameters are excluded from the optimization process. Note, the alpha and beta coefficients cannot be excluded from optimization.
order a specification list for the GARCH or APARCH model:
[garch] - A two dimensional integer vector giving the orders of the model to fit. order[1] corresponds to the GARCH part and order[2] to the ARCH part. The default specification belongs to a symmetric GARCH(1,1) model.
[aparch] - alpha.lags an integer vector denoting to which lags the "alpha" coefficients belong, by default 1; beta.lags an integer vector denoting to which lags the "beta" coefficients belong, by default 1; gamma – symmetry coefficients, a numeric vector of same length as "alpha.lags", by default 0; delta – the "delta" exponent, by default 2. The default specification belongs to a symmetric GARCH(1,1) model.
rand.gen optional, a function to generate the innovations.
start.innov a univariate time series or vector of innovations to be used as start up values. Missing values are not allowed. A numeric vector.
x an univariate vector or time series.
[print][print.summary] - a fitted GARCH or APARCH time series object.
... additional arguments to be passed. For garchSim passed to rand.gen, most usefully, the standard deviation of the innovations generated by rnorm can be specified by sd. For garchFit passed toqr when computing the asymptotic standard errors of coef.

Details

GARCH Modelling:

garchFit uses a Quasi-Newton optimizer to find the maximum likelihood estimates of the conditionally normal model. The first max(p,q) values are assumed to be fixed. The optimizer uses a hessian approximation computed from the BFGS update. Only a Cholesky factor of the Hessian approximation is stored. For more details see Dennis et al. (1981), Dennis and Mei (1979), Dennis and More (1977), and Goldfarb (1976). The gradient is either computed analytically or using a numerical approximation.
[tseries:garch]

APARCH Modelling:

aparchFit allows to estimate a whole family of ARCH models. For Engle's ARCH(p) model one has to set beta.lags=1, beta=0, and opt$beta=FALSE. For Bollerslev's GARCH(p,q) model, just use it. For a Taylor-Schwert TS-GARCH(p,q) model one has to set delta=1. For Gosten et al.'s GJR(p,q) model one has to set gamma and code{opt.gamma=TRUE}. For the extimation of parameters from asymmetric models and models with unknown delta exponents different from 2 one has to set the arguments opt$gamma=TRUE and opt$delta=TRUE. In addition from three types of innovations, normal distributed, Student-t and symmetric stable can be chosen.

Value

garchSim
aparchSim
return objects of class ts.
garchFit
aparchFit
return lists of class fGARCH and fAPARCH, respectivley with at least the following components:

order the order of the fitted model.
coef estimated GARCH coefficients for the fitted model.
n.likeli the negative log-likelihood function evaluated at the coefficient estimates (apart from some constant).
n.used the number of observations of x.
residuals the series of residuals.
fitted.values the bivariate series of conditional standard deviation predictions for x.
series the name of the series x.
frequency the frequency of the series x.
call the call of the garch function.
asy.se.coef the asymptotic-theory standard errors of the coefficient estimates.

Author(s)

Adrian Trapletti for the [tseries:garch] function,
D. M. Gay for the Fortran optimizer. Diethelm Wuertz Diethelm Wuertz for this R-port.

References

Bera A.K., Higgins M.L. (1993); ARCH Models: Properties, Estimation and Testing, J. Economic Surveys 7, 305–362.

Bollerslev T. (1986); Generalized Autoregressive Conditional Heteroscedasticity, Journal of Econometrics

See Also

armaModelling.

Examples

##      GARCH -
        xmpSeries("\nStart: Model Bollerslev's GARCH(1,1) Process >")
        # Simulate a time series of length 1000:
        ts = garchSim(model = list(omega = 1e-6, alpha = 0.1, beta = 0.8, 
                h0 = 1e-7), n = 1000)
        xmpSeries("\nNext: Estimate the parameters >")
        fit = garchFit(ts, order = c(1, 1))
        print(fit) 
        xmpSeries("\nNext: Summary and Diagnostic Analysis >")
        summary(fit)  

##      APARCH -
        xmpSeries("\nNext: Subset TS-GARCH(1,5[1,5]), delta fixed >")
        # Simulate a time series of length 1000:
        ts = aparchSim(model=list(omega=1e-6, alpha=0.1, gamma=0, 
                alpha.lags=1, beta=c(0.5, 0.3), beta.lags=c(1, 5), delta=1),
        innov=rnorm(5000), start.innov=rnorm(1000))
    par(mfrow = c(2, 2), cex = 0.6)
    ts.plot(ts, main = "Subset TS GARCH(1,5) - Mormal")
    acf(abs(ts), lag.max = 20)
    xmpSeries("\nNext: Estimate the parameters >")
    aparchFit(ts, order=list(alpha.lags = 1, beta.lags = c(1, 5), delta = 1),
        opt=list(gamma=FALSE, delta=FALSE, disparm=FALSE), doprint=FALSE)
    # For more examples type: xmpfSeries() ...

[Package Contents]