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

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

Attributes#

mean_order

(ar_lags, ma_lags) of the conditional mean.

ma_params

(ma_lags,) moving-average coefficients, plus-sign convention.

alpha

(p,) coefficients on the shock magnitude.

ar_params

(ar_lags,) conditional-mean AR coefficients.

beta

(q,) persistence coefficients.

conditional_variance

conditional_volatility

Conditional standard deviation, sqrt(conditional_variance).

const

endog

fittedvalues

gamma

(o,) asymmetry coefficients; empty for GARCH.

half_life

Periods for a variance shock to decay by half.

has_leverage

Whether an asymmetry block was estimated.

information_criteria

AIC, BIC, and HQIC derived from the likelihood and parameter count.

invertibility

Full eigenvalue verdict for the moving-average polynomial.

is_covariance_stationary

Whether the variance process has a finite unconditional level.

is_invertible

Whether every companion eigenvalue of the MA block is inside the unit circle.

is_stationary

Whether every companion eigenvalue lies inside the unit circle.

is_structurally_constrained

Whether the mean was searched inside the stationary-invertible region.

llf

mean

n_params

nobs

omega

order

The variance order (p, o, q) recovered from the coefficient blocks.

params

Estimated parameters keyed by display name, in table order.

persistence

The decay rate of a shock to the conditional variance.

resid

stability

Full eigenvalue verdict for the autoregressive polynomial.

standardized_resid

Mean residuals scaled by the fitted conditional volatility.

unconditional_variance

The long-run variance omega / (1 - persistence).

vol

"GARCH", "GJR" or "EGARCH".

Methods#

compare(*others[, criterion])

Rank this result against others by an information criterion.

likelihood_ratio_test(unrestricted)

Test this result as the restricted model against a nesting one.

simulate([n, seed, burn])

A fresh sample path at the fitted parameters.

summary()

The estimation summary, renderable as text, HTML, or a dataframe.

to_dict()

The aligned per-observation outputs as plain numpy arrays.

to_pandas(*[, index])

The aligned per-observation outputs as a pandas.DataFrame.

to_polars()

The aligned per-observation outputs as a polars.DataFrame.