ARMAGJR#

class cultivars.univariate.conditional_variance.ARMAGJR(endog, *, ar_lags=1, ma_lags=1, p=1, o=1, q=1, mean='constant')[source]#

ARMA mean with a sign-asymmetric GJR variance, estimated jointly.

The ARMAGARCH mean over the GJR variance, so a negative mean residual loads an extra \(\gamma\) on next period’s variance. The result’s has_leverage is True by construction here, since the asymmetry order must be at least one; the sign and size of gamma[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, o is zero, or mean is not one of the two choices.

  • DimensionError – If endog is not one-dimensional or is shorter than the orders require.

  • NumericalError – If endog contains non-finite values.

See also

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]']

Attributes#

ar_lags

The conditional-mean autoregressive order.

endog

The validated endogenous series.

has_constant_mean

Whether a mean intercept is estimated.

ma_lags

The conditional-mean moving-average order.

mean_order

The conditional-mean order (ar_lags, ma_lags).

order

The variance order (p, o, q).

vol

The volatility family.

Methods#

fit()

Estimate mean and variance jointly by Gaussian maximum likelihood.