ARMAGJR#
- class cultivars.univariate.conditional_variance.ARMAGJR(endog, *, ar_lags=1, ma_lags=1, p=1, o=1, q=1, mean='constant')[source]
Bases:
_ShortMemoryVarianceModel[ARMAGARCHResult]ARMA mean with a sign-asymmetric GJR variance, estimated jointly.
The
ARMAGARCHmean over theGJRvariance, so a negative mean residual loads an extra \(\gamma\) on next period’s variance. The result’shas_leverageisTrueby construction here, since the asymmetry order must be at least one; the sign and size ofgamma[1]are what say whether leverage was found.- Variables:
_vol – The family name,
"GJR"._p – ARCH order.
_o – Asymmetry order.
_q – GARCH order.
_endog – The validated series.
_ar_lags – Conditional-mean AR order.
_ma_lags – Conditional-mean MA order.
_const – Whether the mean carries an intercept.
- Parameters:
endog (
ArrayLike) – The series.ar_lags (
int) – Conditional-mean autoregressive order.ma_lags (
int) – Conditional-mean moving-average order.p (
int) – Order of the shock-magnitude block.o (
int) – Order of the asymmetry block, at least one.q (
int) – Order of the variance persistence block.mean (
str) –"constant"or"zero".
- Raises:
SpecificationError – If an order is not a non-negative integer,
ois zero, ormeanis not one of the two choices.DimensionError – If
endogis not one-dimensional or is shorter than the orders require.NumericalError – If
endogcontains non-finite values.
See also
ARMAGARCHResult– whatfit()returns.GJR– the same variance under a constant or AR mean.ARMAGARCH– the symmetric special case.
Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> res = ARMAGJR(rng.standard_normal(500)).fit() >>> res._comparison_label(), res.has_leverage ('ARMA(1, 1)-GJR(1, 1, 1)', True) >>> list(res.params) ['const', 'ar.L1', 'ma.L1', 'omega', 'alpha[1]', 'gamma[1]', 'beta[1]']