GJR#
- class cultivars.univariate.conditional_variance.GJR(endog, *, p=1, o=1, q=1, ar_lags=0, mean='constant')[source]#
GJR-GARCH(p, o, q): a level model with a sign-asymmetric ARCH term.
The variance recursion
\[\sigma_t^2 = \omega + \sum_{i=1}^{p} \alpha_i \varepsilon_{t-i}^2 + \sum_{k=1}^{o} \gamma_k\, \varepsilon_{t-k}^2\, \mathbb 1\{\varepsilon_{t-k} < 0\} + \sum_{j=1}^{q} \beta_j \sigma_{t-j}^2.\]The asymmetry block loads only on negative shocks, so
gamma > 0is the leverage effect – bad news raising volatility more than good news of the same size. Under a symmetric innovation the indicator is on half the time, which is why the result’s persistence counts \(\gamma\) at half weight. \(\omega\), \(\alpha\) and \(\beta\) are kept positive by their transforms; \(\gamma\) is searched unconstrained, so a negative estimate is reported as the reverse asymmetry rather than clipped to zero. The asymmetry order must be at least one: a GJR witho = 0is aGARCH, and the name should not be able to claim a leverage term it does not carry.- Variables:
_vol – The family name,
"GJR"._p – ARCH order.
_o – Asymmetry order.
_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,
ois zero, ormeanis 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
GARCHResult– whatfit()returns, withhas_leverageset.GARCH– the symmetric special case.EGARCH– asymmetry through the sign of the standardized shock in a log-variance recursion.ARMAGJR– the same variance under an ARMA mean.
References
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.
Example
A leverage effect recovered, and preferred by BIC over the symmetric fit:
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> n = 3000 >>> h, e = np.ones(n), np.zeros(n) >>> for t in range(1, n): ... h[t] = 0.05 + 0.03 * 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() >>> res = GJR(e).fit() >>> res.has_leverage, list(res.params) (True, ['const', 'omega', 'alpha[1]', 'gamma[1]', 'beta[1]']) >>> bool(abs(res.gamma[0] - 0.10) < 0.05) True >>> symmetric = GARCH(e).fit() >>> bool(res.information_criteria.bic < symmetric.information_criteria.bic) True
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. |