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 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.

  • Method Details

    • fit

      public static GjrGarch11.Params fit(double[] returns)
      Gaussian maximum-likelihood fit; see estimate(double[], Innovation).
    • estimate

      public static GjrGarch11.Fit estimate(double[] returns, Innovation innovation)
      Maximum-likelihood fit with standard errors (at least 100 finite returns).
    • 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.