The function larch()
estimates a heterogeneous log-ARCH-X model, which is a generalisation of the dynamic log-variance model in Pretis, Reade and Sucarrat (2018). Internally, estimation is undertaken by a call to larchEstfun
. The log-variance specification can contain log-ARCH terms, log-HARCH terms, asymmetry terms ('leverage'), the log of volatility proxies made up of past returns and other covariates ('X'), for example Realised Volatility (RV), volume or the range.
larch(e, vc=TRUE, arch = NULL, harch = NULL, asym = NULL, asymind = NULL,
log.ewma = NULL, vxreg = NULL, zero.adj = NULL,
vcov.type = c("robust", "hac"), qstat.options = NULL,
normality.JarqueB = FALSE, tol = 1e-07, singular.ok = TRUE, plot = NULL)
A list of class 'larch'
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
logical
. TRUE
includes an intercept in the log-variance specification. Currently, vc
cannot be set to any other value than TRUE
either NULL
(default) or an integer vector, say, c(1,3)
or 2:5
. The log-ARCH lags to include in the log-variance specification
either NULL
(default) or an integer vector, say, c(5,10)
. The (log of) heterogeneous ARCH terms (Muller et al. 1997) to include
either NULL
(default) or an integer vector, say, c(1)
or 1:3
. The asymmetry (i.e. 'leverage') terms to include in the log-variance specification
either NULL
(default or an integer vector. The indicator asymmetry terms to include
either NULL
(default) or a vector of the lengths of the volatility proxies, see leqwma
. The terms serve as (log of) volatility proxies similar to RVs in the HAR-model of Corsi (2009). Here, the log.ewma
terms are made up of past e's
either NULL
(default) or a numeric vector or matrix, say, a zoo
object. If both e
and vxreg
are zoo
objects, then their samples are chosen to match
NULL
(default) or a strictly positive numeric
scalar. If NULL
, the zeros in the squared residuals are replaced by the 10 percent quantile of the non-zero squared residuals. If zero.adj
is a strictly positive numeric
scalar, then this value is used to replace the zeros of the squared e's
character
. "robust" (default) or "hac" (partial matching is allowed). If "robust", the robust variance-covariance matrix of the White (1980) type is used. If "hac", the Newey and West (1987) heteroscedasticity and autocorrelation-robust matrix is used
NULL
(default) or an integer vector of length two, say, c(1,1)
. The first value sets the lag-order of the AR diagnostic test of the standardised residuals, whereas the second value sets the lag-order of the ARCH diagnostic test of the standardised residuals. If NULL
, then the two values of the vector are set automatically
FALSE
(default) or TRUE
. If TRUE
, then the results of the Jarque and Bera (1980) test for non-normality in the residuals are included in the estimation results
numeric
value. The tolerance (the default is 1e-07
) for detecting linear dependencies in the columns of the regressors (see ols
and qr
). Only used if LAPACK
is FALSE
(default)
logical
. If TRUE
(default), the regressors are checked for singularity, and the ones causing it are automatically removed. If FALSE
, then the function returns an error
NULL
(default) or logical
. If TRUE
, the fitted values and the residuals are plotted. If NULL
, then the value set by options
determines whether a plot is produced or not
Genaro Sucarrat: https://www.sucarrat.net/
No details for the moment
G. Ljung and G. Box (1979): 'On a Measure of Lack of Fit in Time Series Models'. Biometrika 66, pp. 265-270
F. Corsi (2009): 'A Simple Approximate Long-Memory Model of Realized Volatility', Journal of Financial Econometrics 7, pp. 174-196
C. Jarque and A. Bera (1980): 'Efficient Tests for Normality, Homoscedasticity and Serial Independence'. Economics Letters 6, pp. 255-259. tools:::Rd_expr_doi("10.1016/0165-1765(80)90024-5")
U. Muller, M. Dacorogna, R. Dave, R. Olsen, O. Pictet and J. von Weizsacker (1997): 'Volatilities of different time resolutions - analyzing the dynamics of market components'. Journal of Empirical Finance 4, pp. 213-239
F. Pretis, J. Reade and G. Sucarrat (2018): 'Automated General-to-Specific (GETS) Regression Modeling and Indicator Saturation for Outliers and Structural Breaks'. Journal of Statistical Software 86, Number 3, pp. 1-44. tools:::Rd_expr_doi("10.18637/jss.v086.i03")
H. White (1980): 'A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity', Econometrica 48, pp. 817-838.
W.K. Newey and K.D. West (1987): 'A Simple, Positive Semi-Definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix', Econometrica 55, pp. 703-708.
Methods and extraction functions (mostly S3 methods): coef.larch
, ES
, fitted.larch
, gets.larch
,
logLik.larch
, nobs.larch
, plot.larch
, predict.larch
, print.larch
,
residuals.larch
, summary.larch
, VaR
, toLatex.larch
and vcov.arx
regressorsVariance
##Simulate some data:
set.seed(123)
e <- rnorm(40)
x <- matrix(rnorm(40*2), 40, 2)
##estimate a log-variance specification with a log-ARCH(4)
##structure:
larch(e, arch=1:4)
##estimate a log-variance specification with a log-ARCH(4)
##structure, a log-HARCH(5) term and a first-order asymmetry/leverage
##term:
larch(e, arch=1:4, harch=5, asym=1)
##estimate a log-variance specification with a log-ARCH(4)
##structure, an asymmetry/leverage term, a 10-period log(EWMA) as
##volatility proxy, and the log of the squareds of the conditioning
##regressors in the log-variance specification:
larch(e, arch=1:4, asym=1, log.ewma=list(length=10), vxreg=log(x^2))
Run the code above in your browser using DataLab