Learn R Programming

GEVStableGarch (version 1.1)

gsFit: Estimation of ARMA-GARCH/APARCH models

Description

This function uses Maximum Likelihood technique to estimate the parameters of ARMA-GARCH or ARMA-APARCH model with several conditional distributions. The user can also enforce stationarity during estimation

Usage

gsFit(formula = ~garch(1, 1), data, cond.dist = c("stableS0", "stableS1", 
"stableS2", "gev", "gat", "norm", "std", "sstd", "skstd", "ged"), 
include.mean = TRUE, algorithm = c("sqp", "sqp.restriction", 
"nlminb", "nlminb+nm"), control = NULL, 
tolerance = NULL, title = NULL, description = NULL)

Arguments

formula
a formula object specifying mean and variance equation. The mean equation should be specified using the names: "arma"", "garch"" or "aparch". For example: ~arma(1,0)-garch(1,0) for AR(1)-ARCH(1), or ~arma(0,1)-garch(2,2) for MA(1)-GARCH(2,2).
data
a numeric vector containing the data of the time series to be estimated.
cond.dist
a character string naming the conditional distribution of innovations. The package was created to accept the following distributions: "stableS0" (stable in S0-parameterization), "stableS1" (stable in S1-parameterization), "
include.mean
This is a boolean variable. It intercept is TRUE than we estimate the model with intercept.
algorithm
The algorithm to be used to search for the optimum value. The current version of the GEVStableGarch package implements four different optimization procedures, namely the "sqp", "sqp.restriction" (enforce stationarity)
control
Control parameters passed to the optimization routine. For the "sqp" and "sqp.restriction" algorithms the control parameters are passed to the solnp function from Rsolnp package. For the other algorithms
tolerance
Tolerance for parameter estimation. When specified, the tolerance parameter should be passed as a list in the following format list( TOLG = 1e-8, TOLSTABLE = 1e-2, TOLSTATIONARITY = 1e-3 ), where TOLG is the tolerance used to se
title
a string with the title.
description
a string with a description.

Value

  • gsFit returns a S4 object of class "GEVSTABLEGARCH" with the following slots:
  • @callthe call of the gsFit function.
  • @formulaa list with two formula entries, one for the mean and the other one for the variance equation.
  • @methoda string denoting the optimization method.
  • @dataa numeric vector containing the data of the estimated time sereis.
  • @fita list with the results from the parameter estimation: par - the estimated parameters; llh - the estimated negative log-likelihood function; hessian - the hessian matrix returned by the optimization algorithm; ics - the value of the goodness-of-fit measures (AIC, AICc and BIC) (See Brockwell and Davis, 2002 for more details); order - a list with the ARMA and GARCH/APARCH orders; cond.dis - the conditional distribution; se.coef - standard errors of the estimated parameters; tValue - tValue of the estimated parameters; matcoef - an organized matrix with the estimated parameters.
  • @residualsa numeric vector with the residual values ($\varepsilon_t$).
  • @h.ta numeric vector with the conditional variance ($h_t = \sigma_t^\delta$).
  • @sigma.ta numeric vector with the conditional standard deviation ($\sigma_t$).
  • @titlea string with the title.
  • @descriptiona string with a description.
  • The entries of the @fit slot show the results from the optimization.

Enhances

The estimation of ARMA-GARCH/APARCH models with conditional stable distribution is mainly dependent on the time taken during the calculation of density points. Although the package can be used with the R stabledist package, the estimation of such models is only feasible if we use the fast implementation of stable densities using the R stable package designed by J.P.Nolan (see http://academic2.american.edu/~jpnolan/stable/stable.html).

The stable package implements a faster computation of stable densities that are accurately enough to perform numerical optimization and is available at http://www.robustanalysis.com.

Details

The starting values of the model parameters are key in getting any possible convergence and they were chosen to reflect this. For example, the GEV shape starting value was chosen to be 0 since in this case the support of the distribution with zero location and unit scale will encompasses both positive and negative parts of the real line (the support is at (-$\infty$,+$\infty$)).

The parameters will be interpreted according to the following equations (see Wurtz et al. ,2009) $$X_t = \mu + \sum_{i=1}^m a_i X_{t-i} + \sum_{j=1}^n b_j \varepsilon_{t-j} + \varepsilon_t$$ $$\varepsilon_t = \sigma_t z_t,\;\;\;z_t \stackrel{iid}{\sim} D(0,1)\;,\$$ $$\sigma_t^\delta = \omega + \sum_{i=1}^p \alpha_i(\varepsilon_{t-i}-\gamma_i|\varepsilon_{t-i}|)^\delta + \sum_{j=1}^q \beta_j \sigma_{t-j}^\delta$$ where $\mathcal{D}_{\vartheta}(0,1)$ is the density of the innovations with zero location and unit scale and $\vartheta$ are additional distributional parameters that describe the skew and the shape of the distribution.

Etimation Algorithms{

Most software packages implement the estimation of GARCH models without imposing stationarity, but restricting the parameter set by appropriate bounds. This last approach was implemented in the GEVStableGarch package through the following algorithms: "sqp", "nlminb" and "nlminb + nm". The first two algorithms search for the optimum value by restricting the parameter set to appropriate lower and upper bounds. The last implements a two step optimization procedure, which consists in starting the search by using the constrained routine nlminb and then performing another search using an unconstrained method (in our case the Nelder-Mead method implemented in the R base function optim). This approach was suggested by Wuertz et al. (2009) since in many cases it leads to an improved solution (in terms of the likelihood function of the data).

Finally, the "sqp.restriction" algorithm performs a constrained search to maximize the log-likelihood function in order to obtain an stationary model. It can be used to estimate models with the following conditional distributions: "stableS1", "gev", "gat", "skstd", "norm", "std" and "ged".

}

Stationarity Solutions{

Since we want to estimate the parameters that better adjust real data to ARMA-APARCH models, the notion of stationarity is crucial. Usually, even when the data set is non-stationary in appearance, we still are able to apply transformation techniques so that the resulting time series can be reasonably modeled as a stationary process (see Brockwell and Davis (1996)).

The APARCH(p,q) model with finite variance innovations has a unique $\delta$-order stationary solution if and only if (see Ling and McAller (2002)) $$\sum_{i=1}^p E(|Z| - \gamma_i Z)^\delta \alpha_i +\sum_{j=1}^q\beta_j < 1,$$

The case of infinite variance has a somewhat different historical background. The first assumption made on stable distributions is that the index of stability $\alpha$ must be greater than one, because in this case the innovations have finite first moment. The second assumption is that they must have a $\delta$-moment finite, which means that we must restrict our model to $1 < \delta < \alpha$.

Diongue et al. (2008) showed that the APARCH(p,q) (all coefficients $\gamma_i = 0$) model has a strictly stationary solution if and only if $$\sum_{i=1}^p E(|Z| - \gamma_i Z)^\delta\alpha_i +\sum_{j=1}^q\beta_j < 1,$$

where $Z$ has distribution $S(\alpha,\beta;1)$ (stable in 1-parameterization). The estimation of stationary models is mainly dependent on the time taken to evaluate the expression for the asymmetric stable distribution $E(|Z| - \gamma_i Z)^\delta$.

The moment expression used to verify the stationarity condition is given by

$$E(|Z| - \gamma Z)^\delta = \frac{ (1 - \gamma )^\delta\tilde{\sigma}^{\delta+1}\Gamma(\delta+1)\Gamma(-\frac{\delta}{\alpha}) } { \alpha\tilde{\sigma}\Gamma\bigg[ \bigg(\frac{1}{2}+\tilde{\beta}\frac{k(\alpha)}{2\alpha}\bigg)(-\delta)\bigg] \Gamma\bigg[ \frac{1}{2}- \tilde{\beta}\frac{k(\alpha)}{2\alpha} + \bigg(\frac{1}{2} + \tilde{\beta}\frac{k(\alpha)}{2\alpha}\bigg)(\delta+1)\bigg] }$$

$$+ \frac{ (1 + \gamma )^\delta\tilde{\sigma}^{\delta+1}\Gamma(\delta+1)\Gamma(-\frac{\delta}{\alpha}) } { \alpha\tilde{\sigma}\Gamma\bigg[ \bigg(\frac{1}{2}-\tilde{\beta}\frac{k(\alpha)}{2\alpha}\bigg)(-\delta)\bigg] \Gamma\bigg[ \frac{1}{2} + \tilde{\beta}\frac{k(\alpha)}{2\alpha} + \bigg(\frac{1}{2} - \tilde{\beta}\frac{k(\alpha)}{2\alpha}\bigg)(\delta+1)\bigg] },$$

where

$$\tilde{\sigma} = \bigg[1 + \beta^2 \tan^2(\frac{\alpha\pi}{2})\bigg]^{\frac{1}{2\alpha}},$$

$$k(\alpha) = \left{ \begin{array}{rl} \alpha & , \alpha < 1, \ \alpha-2 & , \alpha > 1, \end{array} \right.$$

and

$$\tilde{\beta} = \left{ \begin{array}{rl} \frac{2}{\pi\alpha}\arctan(\beta\tan(\frac{\alpha\pi}{2})) & , 0 < \alpha < 1, \ \frac{2}{\pi(\alpha-2)}\arctan(\beta\tan(\frac{\pi(\alpha-2)}{2})) & , 1 < \alpha < 2. \end{array} \right.$$

Notice that this expression is only valid for the stable distribution in 1-parameterization, and thus cannot be used to the estimate models with stable distribution in 0 or 2 parameterizations.

The stationarity restriction implemented inside GEVStableGarch package imposes the follow restriction $\sum_{i=1}^p E(|Z| - \gamma_i Z)^\delta\alpha_i +\sum_{j=1}^q\beta_j < 1 -$ TOL.STATIONARITY, where the variable TOL.STATIONARITY is set to 0.001 by default. For numerical reasons, the value of this variable cannot be greater than 0.05.

}

References

Brockwell, P.J., Davis, R.A. (1996). Introduction to Time Series and Forecasting. Springer, New York.

Fernandez, C., Steel, M.F. (1998). On Bayesian Modeling of Fat Tails and Skewness. Journal of the American Statistical Association, Taylor & Francis Group, 93(441), 359--371.

Ling, S., McAller, M. (2002). Necessary and Suficient Moment Conditions for the GARCH(r,s) and Asymmetric Power GARCH(r,s) Models. Econometric Theory, 18(03), 722--729.

Mittnik, S., Paolella, M.S., Rachev, S.T. (2002). Stationarity of stable power-GARCH processes. Journal of Econometrics 106, 97--107.

Nolan, J.P. (1997). Numerical calculations of stable densities and distribution functions. Communications in Statistics - Stochastic Models 13, 759--774.

Nolan, J.P. (1997). Maximum likelihood estimation and diagnostics for stable distribution. In O. E.Barndorff-Nielsen, T. Mikosch, e S. I. Resnick (Eds.), Levy Processes: Theory andApplications, Boston, Birkhauser, 379--400.

Wuertz, D., Chalabi, Y., with contribution from Miklovic, M., Boudt, C., Chausse, P., and others (2013). fGarch: Rmetrics - Autoregressive Conditional Heteroskedastic Modelling, R package version 3010.82, http://CRAN.R-project.org/package=fGarch.

Wuertz, D., Chalabi, Y., Luksan, L. (2009). Parameter Estimation of ARMA Models with GARCH/ APARCH Errors: An R and SPlus SoftwareImplementation. Journal of Statistical Software, forthcoming, http://www-stat.wharton.upenn.edu/~steele/Courses/956/RResources/GarchAndR/WurtzEtAlGarch.pdf{http://www-stat.wharton.upenn.edu/~steele/...WurtzEtAlGarch.pdf}.

Zhao, X., Scarrott, C.J., Oxley, L., Reale, M. (2011). GARCH dependence in extreme value models with Bayesian inference. Mathematics an Computers in Simulation, 81, Issue 7, 1430--1440.

Yinyu, Ye. (1987). Interior Algorithms for Linear, Quadratic, and Linearly Constrained Non-Linear Programming. Ph.D. Thesis, Department of EES, Stanford University.

See Also

gsSelect

Examples

Run this code
# This examples uses the dem2gbp dataset to estimate
# an ARMA(1,1)-GARCH(1,1) with GEV conditional distribution.
data(dem2gbp)
x = dem2gbp[, 1]
gev.model = gsFit(data = x , formula = ~garch(1,1), cond.dist = "gev")

Run the code above in your browser using DataLab