ARGARCH#
- class cultivars.univariate.conditional_variance.ARGARCH(endog, *, ar_lags=1, p=1, q=1, mean='constant')[source]#
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 returningARMAGARCHResultso the mean’s stationarity verdict is on the record. The mean is a regression on lagged levels, so its weights are unconstrained andARMAGARCHResult.is_stationaryis 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:
- Raises:
SpecificationError – If an order is not a non-negative integer or
meanis 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.GARCH– the same fit returned as aGARCHResult, 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)
Attributes#
The conditional-mean autoregressive order. |
|
The validated endogenous series. |
|
Whether a mean intercept is estimated. |
|
The conditional-mean moving-average order. |
|
The conditional-mean order |
|
The variance order |
|
The volatility family. |
Methods#
|
Estimate mean and variance jointly by Gaussian maximum likelihood. |