ARGARCH#

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

Bases: _ShortMemoryVarianceModel[ARMAGARCHResult]

Autoregressive mean with a symmetric GARCH variance, estimated jointly.

The same estimator as GARCH(y, ar_lags=...), under the name a reader expects when the mean is the point of the specification rather than an afterthought, and returning ARMAGARCHResult so the mean’s stationarity verdict is on the record. The mean is a regression on lagged levels, so its weights are unconstrained and ARMAGARCHResult.is_stationary is informative; the two fronts reach the same likelihood to the last digit.

Variables:
  • _vol – The family name, "GARCH".

  • _p – ARCH order.

  • _o – Asymmetry order, always zero here.

  • _q – GARCH order.

  • _endog – The validated series.

  • _ar_lags – Conditional-mean AR order.

  • _ma_lags – Conditional-mean MA order, always zero here.

  • _const – Whether the mean carries an intercept.

Parameters:
  • endog (ArrayLike) – The series.

  • ar_lags (int) – Conditional-mean autoregressive order.

  • p (int) – Order of the shock-magnitude block.

  • q (int) – Order of the variance persistence block.

  • mean (str) – "constant" or "zero".

Raises:
  • SpecificationError – If an order is not a non-negative integer 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

  • ARMAGARCHResult – what fit() returns.

  • GARCH – the same fit returned as a GARCHResult, without the mean verdicts.

  • ARMAGARCH – with a moving-average block, which switches the mean onto the constrained recursion.

  • AR – the same mean with a constant variance.

Example

The two fronts agree on the likelihood and differ in what they report:

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> y = rng.standard_normal(500)
>>> named, plain = ARGARCH(y, ar_lags=2).fit(), GARCH(y, ar_lags=2).fit()
>>> round(named.llf - plain.llf, 8)
0.0
>>> named._comparison_label(), plain._comparison_label()
('AR(2)-GARCH(1, 1)', 'GARCH(1, 1)')
>>> named.is_stationary, named.is_structurally_constrained
(True, False)