View source: R/garchx-source-code.R
garchx | R Documentation |
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).
garchx(y, order = c(1,1), arch = NULL, garch = NULL, asym = NULL,
xreg = NULL, vcov.type = c("ordinary", "robust", "hac"),
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)
y |
numeric vector, time-series or |
order |
integer vector of length 1, 2 or 3, for example |
arch |
|
garch |
|
asym |
|
xreg |
numeric vector, time-series or |
vcov.type |
|
initial.values |
|
backcast.values |
|
lower |
numeric vector, either of length 1 or the number of parameters to be estimated, see |
upper |
numeric vector, either of length 1 or the number of parameters to be estimated, see |
control |
a |
hessian.control |
a |
solve.tol |
numeric value passed on to the |
estimate |
logical, if |
c.code |
logical, if |
penalty.value |
|
sigma2.min |
numeric with default |
objective.fun |
numeric, either 1 or 0 |
turbo |
logical. If |
A list of class 'garchx'
Genaro Sucarrat, https://www.sucarrat.net/
Christian Francq and Le Quien Thieu (2019): 'QML inference for volatility models with covariates', Econometric Theory 35, pp. 37-72, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1017/S0266466617000512")} Christian Francq and Jean-Michel Zakoian (2019): 'GARCH Models', 2nd Edition, Wiley Robert M. de Jong and James Davidson (2000): 'Consistency of Kernel Estimators of Heteroscedastic and Autocorrelated Covariance Matrices', Econometrica 68, pp. 407-423
garchxSim
, nlminb
, optimHess
, coef.garchx
##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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.