Class GjrGarch11
java.lang.Object
com.quantfinlib.volatility.GjrGarch11
GJR-GARCH(1,1,1) — GARCH with the leverage term equity markets demand:
h_t = ω + (α + γ·1{r<0}) r_{t-1}² + β h_{t-1}
A down move raises tomorrow's variance by α + γ; an equal up
move by only α. That asymmetry (Glosten-Jagannathan-Runkle,
1993) is not a refinement — on equity indices γ is typically larger
than α, i.e. most of the ARCH effect is the leverage effect, and a
symmetric Garch11 systematically underestimates post-selloff
volatility. Fitting a GJR and finding γ ≈ 0 is itself information:
the series has no asymmetry and the simpler model suffices (FX pairs
often land there; equity indices rarely do).
Estimation is full maximum likelihood over (ω, α, γ, β) and, for
Innovation.STUDENT_T, ν, with the same machinery as
Garch11: the region ω > 0, α, γ, β ≥ 0,
α + γ/2 + β < 1 is mapped onto R⁴ by ω = e^{u₀},
persistence p = logistic(u₁) split into α, γ/2, β by a softmax of
(u₂, u₃, 0); Nelder-Mead from several starts; observed-information
and Bollerslev-Wooldridge robust standard errors. The persistence
α + γ/2 + β assumes a symmetric innovation (P(z < 0) = ½).
Same 100-return minimum, conditional-variance and mean-reverting forecast
accessors. Research lane.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final record -
Method Summary
Modifier and TypeMethodDescriptionstatic double[]conditionalVariances(double[] returns, GjrGarch11.Params params) Conditional variance series under the fitted parameters (seeded at sample variance).static GjrGarch11.Fitestimate(double[] returns, Innovation innovation) Maximum-likelihood fit with standard errors (at least 100 finite returns).static GjrGarch11.Paramsfit(double[] returns) Gaussian maximum-likelihood fit; seeestimate(double[], Innovation).static doubleforecastVariance(double[] returns, GjrGarch11.Params params, int horizon) k-step-ahead variance forecast — mean-reverts to the unconditional variance at the persistence rate, exactly asGarch11but with the asymmetric first step.
-
Method Details
-
fit
Gaussian maximum-likelihood fit; seeestimate(double[], Innovation). -
estimate
Maximum-likelihood fit with standard errors (at least 100 finite returns). -
conditionalVariances
Conditional variance series under the fitted parameters (seeded at sample variance). -
forecastVariance
k-step-ahead variance forecast — mean-reverts to the unconditional variance at the persistence rate, exactly asGarch11but with the asymmetric first step.
-