GARCHResult#

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

Bases: _ConditionalVarianceResult

A fitted finite-order conditional-variance model.

One record for the three geometric-decay families, whose variance recursions on the mean residual \(\varepsilon_t = \sigma_t z_t\) are

\[ \begin{align}\begin{aligned}\text{GARCH:}\quad \sigma_t^2 = \omega + \sum_{i=1}^{p} \alpha_i \varepsilon_{t-i}^2 + \sum_{j=1}^{q} \beta_j \sigma_{t-j}^2,\\\text{GJR:}\quad \sigma_t^2 = \omega + \sum_{i} \alpha_i \varepsilon_{t-i}^2 + \sum_{k=1}^{o} \gamma_k \varepsilon_{t-k}^2\,\mathbb 1\{\varepsilon_{t-k} < 0\} + \sum_{j} \beta_j \sigma_{t-j}^2,\\\text{EGARCH:}\quad \log\sigma_t^2 = \omega + \sum_{i} \alpha_i\bigl(|z_{t-i}| - E|z|\bigr) + \sum_{k} \gamma_k z_{t-k} + \sum_{j} \beta_j \log\sigma_{t-j}^2,\end{aligned}\end{align} \]

with the conditional mean a constant, zero, or a short autoregression fitted jointly. The record carries the coefficient blocks and the fitted variance path; everything derived – persistence, the unconditional variance, the half-life, the standardized residuals – is computed from them by the family’s own rule, because the same coefficients mean different things across the three. vol is what makes that dispatch possible.

Variables:
  • vol – The family that produced the fit, needed because persistence and the unconditional variance are different functionals across the three.

  • ar_params – Conditional-mean AR coefficients; empty when ar_lags == 0.

  • alpha – Coefficients on the shock magnitude.

  • gamma – Asymmetry coefficients; empty for the symmetric family.

  • beta – Persistence coefficients.

Note

The inherited fields are endog, fittedvalues and resid (the mean side), llf, nobs, n_params, mean, const, omega and conditional_variance; the inherited properties conditional_volatility, standardized_resid, is_covariance_stationary (persistence < 1) and half_life (\(\log 0.5 / \log \text{persistence}\)) read them. Stationarity here is variance stationarity; the conditional-mean autoregression plays no part in it, and this record carries no mean-stationarity mixin. Standard errors are not yet reported by this estimator.

See also

  • GARCH, GJR, EGARCH – the specifications that produce this.

  • ARMAGARCHResult – the same with a full ARMA mean and the mean-stationarity verdicts.

  • FIGARCHResult – the hyperbolic-decay family, whose persistence is not a single number.

References

Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 31(3), 307-327.

Glosten, L. R., Jagannathan, R., & Runkle, D. E. (1993). On the relation between the expected value and the volatility of the nominal excess return on stocks. Journal of Finance, 48(5), 1779-1801.

Nelson, D. B. (1991). Conditional heteroskedasticity in asset returns: A new approach. Econometrica, 59(2), 347-370.

Example

A GARCH(1, 1) with \(\omega = 0.05\), \(\alpha = 0.1\), \(\beta = 0.85\) and unconditional variance 1:

>>> rng = np.random.default_rng(0)
>>> n = 3000
>>> h, y = np.ones(n), np.zeros(n)
>>> for t in range(1, n):
...     h[t] = 0.05 + 0.1 * y[t - 1] ** 2 + 0.85 * h[t - 1]
...     y[t] = np.sqrt(h[t]) * rng.standard_normal()
>>> res = GARCH(y, p=1, q=1).fit()
>>> res.vol, res.order, list(res.params)
('GARCH', (1, 0, 1), ['const', 'omega', 'alpha[1]', 'beta[1]'])
>>> bool(abs(res.persistence - 0.95) < 0.03)
True
>>> bool(abs(res.unconditional_variance - 1.0) < 0.1)
True
>>> bool(np.allclose(res.standardized_resid, res.resid / np.sqrt(res.conditional_variance)))
True

The log-variance family withholds the unconditional variance:

>>> EGARCH(y, p=1, o=1, q=1).fit().unconditional_variance is None
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; none here.

_summary_table()

Structured summary rendered by every display path.