ARMAGARCHResult#

class cultivars.univariate.conditional_variance.ARMAGARCHResult(*, endog, fittedvalues, resid, llf, nobs, n_params, mean, const, omega, conditional_variance, vol, ar_params, alpha, gamma, beta, mean_order, ma_params)[source]

Bases: GARCHResult, _StationarityMixin, _InvertibilityMixin

A finite-order variance model under an ARMA conditional mean.

The mean is

\[y_t = c + \sum_{i=1}^{p} \phi_i\, y_{t-i} + \varepsilon_t + \sum_{j=1}^{q} \theta_j\, \varepsilon_{t-j}, \qquad \varepsilon_t = \sigma_t z_t,\]

with \(\sigma_t^2\) one of the GARCHResult recursions and the two blocks estimated jointly, so llf is the joint likelihood rather than the two-step approximation. const is the recursion intercept \(c\), not the unconditional mean \(c / (1 - \sum_i \phi_i)\); that is the ARResult convention, not the ARMAResult one.

Subclasses GARCHResult rather than reimplementing it: every variance property it exposes – persistence, the unconditional variance, the leverage flag – is a functional of the variance block alone and stays exactly as true when the mean grows a moving-average term. What is added is the mean side of the story: the moving-average block, and the stationarity and invertibility verdicts from the two mixins, whose meaning depends on how the mean was searched (see is_structurally_constrained).

Variables:
  • mean_order – The conditional-mean order (ar_lags, ma_lags).

  • ma_params – Moving-average coefficients of 1 + theta_1 L + ...; empty when ma_lags == 0.

Note

fittedvalues, resid and conditional_variance are aligned with the last nobs observations of endog, the mean’s presample having been dropped; resid is the mean residual \(\varepsilon_t\), so standardized_resid divides it by \(\sigma_t\). stability and invertibility hold the companion eigenvalues (the inverse roots), so their max_modulus is below one for a stationary or invertible block.

See also

  • ARMAGARCH, ARMAGJR, ARMAEGARCH, ARGARCH – the specifications that produce this.

  • GARCHResult – the same variance under a constant or zero mean, and the source of every variance property here.

  • ARMAResult – the same mean with a constant variance and the exact likelihood.

Example

An ARMA(1, 1) mean over a GARCH(1, 1) variance, recovered jointly:

>>> rng = np.random.default_rng(0)
>>> n = 2000
>>> h, e, y = np.ones(n), np.zeros(n), np.zeros(n)
>>> for t in range(1, n):
...     h[t] = 0.05 + 0.1 * e[t - 1] ** 2 + 0.85 * h[t - 1]
...     e[t] = np.sqrt(h[t]) * rng.standard_normal()
...     y[t] = 0.2 + 0.5 * y[t - 1] + e[t] + 0.3 * e[t - 1]
>>> res = ARMAGARCH(y, ar_lags=1, ma_lags=1).fit()
>>> res.mean_order, res.order, res.nobs
((1, 1), (1, 0, 1), 1999)
>>> list(res.params)
['const', 'ar.L1', 'ma.L1', 'omega', 'alpha[1]', 'beta[1]']
>>> bool(abs(res.ar_params[0] - 0.5) < 0.1), bool(abs(res.ma_params[0] - 0.3) < 0.1)
(True, True)
>>> res.is_stationary, res.is_invertible, res.is_structurally_constrained
(True, True, True)
>>> bool(abs(res.persistence - 0.95) < 0.05)
True

Private methods#

_comparison_label()

Specification label used when this result appears in a ranking.

_from_fit(fit, model)

Assemble the public result from a raw fit and its specification.

_mean_ma_params()

Moving-average coefficients of the conditional mean.

_mean_notes()

Diagnostics for the conditional-mean block.

_summary_table()

Structured summary rendered by every display path.

_variance_label()

Name the variance family and its order.