garchx {garchx} | R Documentation |
Estimate a GARCH-X model
Description
Quasi Maximum Likelihood (ML) estimation of a GARCH(q,p,r)-X model, where q is the GARCH order, p is the ARCH order, r is the asymmetry (or leverage) order and 'X' indicates that covariates can be included. Note that the underlying estimation theory assumes the covariates are stochastic. The estimation procedure will, in general, provide consistent estimates when the standardised innovations are not normal or independent (or both), see Francq and Thieu (2018).
Usage
garchx(y, order = c(1,1), arch = NULL, garch = NULL, asym = NULL,
xreg = NULL, vcov.type = c("ordinary", "robust"),
initial.values = NULL, backcast.values = NULL, lower = 0,
upper = +Inf, control = list(), hessian.control = list(),
solve.tol = .Machine$double.eps, estimate = TRUE, c.code = TRUE,
penalty.value = NULL, sigma2.min = .Machine$double.eps,
objective.fun = 1, turbo = FALSE)
Arguments
y |
numeric vector, time-series or zoo object. Missing values in the beginning and at the end of the series is allowed, as they are removed with the na.trim command
|
order |
integer vector of length 1, 2 or 3, for example c(1,1,1) . The first entry controls the GARCH order, the second the ARCH order and the third the ASYM (asymmetry/leverage) order
|
arch |
NULL or numeric vector containing the ARCH-terms to include. Note: If not NULL , then the value of the ARCH argument overrides the value of the first entry in the order argument
|
garch |
NULL or numeric vector containing the GARCH-terms to include. Note: If not NULL , then the value of the GARCH argument overrides the value of the second entry in the order argument
|
asym |
NULL or numeric vector containing the ASYM-terms (asymmetry/leverage terms) to include. Note: If not NULL , then the value of the ASYM argument overrides the value of the third entry in the order argument
|
xreg |
numeric vector, time-series or zoo object. Missing values in the beginning and at the end of the series is allowed, as they are removed with the na.trim command
|
vcov.type |
character , either "ordinary" or "robust" , see vcov.garchx
|
initial.values |
NULL or a numeric vector with the initial parameter values passed on to the optimisation routine, nlminb . If NULL , the default, then the values are chosen automatically
|
backcast.values |
NULL or a non-negative numeric. The backcast value is used to initiate the forward recursion of the conditional variance. If NULL (default), then the value is chosen automatically (currently the average of y squared is used). If backcast.values is a non-negative numeric, then the initial recursion values are all set to this value
|
lower |
numeric vector, either of length 1 or the number of parameters to be estimated, see nlminb
|
upper |
numeric vector, either of length 1 or the number of parameters to be estimated, see nlminb
|
control |
a list passed on to the control argument of nlminb
|
hessian.control |
a list passed on to the control argument of optimHess
|
solve.tol |
numeric value passed on to the tol argument of solve , which is called whenever the coefficient variance-coariance matrix is computed. The value controls the toleranse for detecting linear dependence between columns when inverting a matrix
|
estimate |
logical, if TRUE then estimation is carried out. If FALSE , then the initial.values are used
|
c.code |
logical, if TRUE then compiled C code is used in the forward recursion
|
penalty.value |
NULL (default) or a numeric value. If NULL , then the log-likelihood value associated with the initial values is used. Sometimes estimation can result in NA and/or +/-Inf values. The penalty.value is the value returned by the objective function garchxObjective in the presence of NA or +/-Inf values
|
sigma2.min |
numeric with default .Machine$double.eps . To avoid taking taking the log of a very small value when computing the log-likelihood, sigma2.min is used as the lower bound of the fitted conditional variances, see the code of garchxObjective
|
objective.fun |
numeric, either 1 or 0
|
turbo |
logical. If FALSE (default), then the coefficient variance-covariance is computed during estimation, and the fitted values and residuals are attached to the returned object. If TRUE , then these operations are skipped, and hence estimation is faster. Note, however, that if turbo is set to TRUE , then the coefficient-covariance, fitted values and residuals can still be extracted subsequent to estimation with vcov.garchx , fitted.garchx and residuals.garchx , respectively
|
Value
A list of class 'garchx'
Author(s)
Genaro Sucarrat, http://www.sucarrat.net/
References
Christian Francq and Le Quien Thieu (2018): 'QML inference for volatility models with covariates', Econometric Theory, doi:10.1017/S0266466617000512
Christian Francq and Jean-Michel Zakoian (2019): 'GARCH Models', 2nd Edition, Wiley
See Also
garchxSim
, nlminb
, optimHess
, coef.garchx
Examples
##simulate from a garch(1,1):
set.seed(123)
y <- garchxSim(1000)
##estimate garch(1,1) model:
mymod <- garchx(y)
##print estimation results:
print(mymod)
##extract coefficients:
coef(mymod)
##extract and store conditional variances:
sigma2hat <- fitted(mymod)
##extract log-likelihood:
logLik(mymod)
##extract and store standardised residuals:
etahat <- residuals(mymod)
##extract variance-covariance matrix:
vcov(mymod)
##generate predictions:
predict(mymod)
[Package
garchx version 1.5
Index]