cultivars.univariate.conditional_variance#
Conditional-variance models: GARCH, GJR, EGARCH, and FIGARCH.
Every model here writes the series as a conditional mean plus a shock whose variance moves,
with \(\mu_t\) a constant, zero, or an ARMA recursion, and \(\sigma_t^2\) one of four recursions on the past shocks:
All four estimate the mean and the variance jointly by maximizing
so the reported likelihood is the true joint one rather than the two-step approximation you get from fitting a mean model and then a variance model to its residuals. The mean uses conditional sum of squares rather than the exact filter because the exact filter assumes a constant innovation variance, which is the one thing these models deny.
Two commitments shape the surface. First, the group splits in two, and
the split is not cosmetic. GARCH, GJR and EGARCH are finite-order
recursions whose shocks decay geometrically, so persistence is a single
number, a half-life exists, and – for the level families – so does an
unconditional variance. FIGARCH applies a fractional filter whose
ARCH(\(\infty\)) weights decay as \(k^{d-1}\) and sum to one:
no geometric rate describes them, no half-life is defined, and the
process is not covariance stationary for any \(d > 0\). Sharing one
persistence implementation across both would produce a plausible
number for FIGARCH that means nothing, which is why the base result
declares it and GARCHResult and FIGARCHResult answer
it separately. Second, a number that would mislead is withheld rather
than approximated. The log-variance family has no closed-form
unconditional variance in the reported parameters – its stationary
level is the mean of a lognormal – so
GARCHResult.unconditional_variance returns None for EGARCH
rather than omega / (1 - beta); FIGARCH refuses to simulate
because no finite burn-in makes a long-memory sample forget its start;
and stationarity on the variance side is persistence < 1 alone, so
the constant-mean results carry no mean-stationarity mixin, while the
ARMA-mean results carry it and keep the two verdicts apart.
Layout. The constant-mean fronts GARCH, GJR,
EGARCH and FIGARCH and the ARMA-mean fronts
ARGARCH, ARMAGARCH, ARMAGJR,
ARMAEGARCH and ARMAFIGARCH are thin: each fixes a
family and a mean shape and delegates to _ShortMemoryVarianceModel
or _FractionalVarianceModel in _internals, whose __init__
validates the orders through validate_order and the family and mean
through validate_choice against Vol. The
mean is a _MeanLayer – _LinearMean for a lag regression,
_ARMAMean when a moving-average block forces the constrained
recursion – and the variance a _VarianceObjective whose
is_admissible rejects draws with persistence at or above 0.999
(short memory) or a negative retained weight (long memory) before
_linear_variance_recursion, _log_variance_recursion or
_arch_infinity_variance in _core runs the path from an
ewma_mean_square backcast and _gaussian_negloglik scores it.
_maximize_likelihood searches the unconstrained space, omega in
logs and the coefficients through softplus or sigmoid. The
packed _ShortMemoryVarianceFit or _FractionalVarianceFit is
assembled by each result’s _from_fit, and simulate on the
short-memory results runs _simulate_conditional_variance. Latent
rather than observation-driven volatility is
stochastic_volatility; long memory in the
level rather than the variance is
fractional_integration.
References
Engle, R. F. (1982). Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica, 50(4), 987-1007.
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.
Baillie, R. T., Bollerslev, T., & Mikkelsen, H. O. (1996). Fractionally integrated generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 74(1), 3-30.
Example
Four families on one series with a leverage effect, ranked by BIC:
>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> n = 2500
>>> h, e = np.ones(n), np.zeros(n)
>>> for t in range(1, n):
... h[t] = 0.02 + 0.05 * e[t - 1] ** 2 + 0.85 * h[t - 1]
... h[t] += 0.10 * e[t - 1] ** 2 * (e[t - 1] < 0)
... e[t] = np.sqrt(h[t]) * rng.standard_normal()
>>> fits = [GARCH(e).fit(), GJR(e).fit(), EGARCH(e).fit(), FIGARCH(e).fit()]
>>> table = fits[0].compare(*fits[1:], criterion="bic")
>>> table.rows[0][0] in {"GJR(1, 1, 1)", "EGARCH(1, 1, 1)"}, table.rows[-1][0]
(True, 'FIGARCH(1, d, 1)')
>>> [round(fit.persistence, 2) < 1.0 for fit in fits]
[True, True, True, False]
>>> fits[2].unconditional_variance, fits[3].half_life
(None, inf)
Classes#
Autoregressive mean with a symmetric GARCH variance, estimated jointly. |
|
ARMA mean with a log-variance EGARCH process, estimated jointly. |
|
ARMA mean with a fractionally integrated variance, estimated jointly. |
|
ARMA mean with a symmetric GARCH variance, estimated jointly. |
|
ARMA mean with a sign-asymmetric GJR variance, estimated jointly. |
|
EGARCH(p, o, q): the recursion runs in logs, so no positivity constraint binds. |
|
FIGARCH(1, d, 1): long-memory volatility through a fractional filter. |
|
Symmetric GARCH(p, q) with an optional AR mean. |
|
GJR-GARCH(p, o, q): a level model with a sign-asymmetric ARCH term. |
|
A fractionally integrated variance model under an ARMA conditional mean. |
|
A finite-order variance model under an ARMA conditional mean. |
|
A fitted fractionally integrated conditional-variance model. |
|
A fitted finite-order conditional-variance model. |