Class GjrGarch11

java.lang.Object
com.quantfinlib.volatility.GjrGarch11

public final class GjrGarch11 extends Object
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 mirrors Garch11: Gaussian MLE with variance targeting (ω = σ̄²(1 − α − γ/2 − β), since negative returns carry half the mass under symmetry) and a coarse-to-fine grid over (α, γ, β) — derivative-free, deterministic, robust. Same 100-return minimum, same conditional-variance and mean-reverting forecast accessors, with persistence α + γ/2 + β. Research lane.

  • Method Details

    • fit

      public static GjrGarch11.Params fit(double[] returns)
      Fits GJR-GARCH(1,1) to (demeaned) returns by MLE with variance targeting.
    • conditionalVariances

      public static double[] conditionalVariances(double[] returns, GjrGarch11.Params params)
      Conditional variance series under the fitted parameters (seeded at sample variance).
    • forecastVariance

      public static double forecastVariance(double[] returns, GjrGarch11.Params params, int horizon)
      k-step-ahead variance forecast — mean-reverts to the unconditional variance at the persistence rate, exactly as Garch11 but with the asymmetric first step.