Class Egarch11
ln h_t = ω + β·ln h_{t-1} + α(|z_{t-1}| − √(2/π)) + γ·z_{t-1}
with standardized shocks z = r/√h. Two things the log form
buys: no positivity constraints AT ALL (any parameter signs give a
valid variance — the exp does the work Garch11's ω,α,β ≥ 0
constraints do), and leverage as a SIGN — γ < 0 means a
down move raises tomorrow's volatility more than an equal up move,
and the magnitude reads directly. Stationarity is |β| < 1,
nothing else.
Estimation mirrors the family: Gaussian MLE over a coarse-to-fine
grid spanning the EMPIRICALLY PLAUSIBLE box — α ∈ [0, 0.9],
γ ∈ [−0.9, 0.9], β ∈ [0, 0.995]. Negative α or β, while formally
admissible in the log form, are not searched (stated, not hidden:
they describe oscillating log-variance no asset-return series
exhibits). ω is targeted to the sample's log variance
(ω = (1−β)·ln σ̄² — an approximation, since
E[ln h] ≤ ln E[h] by Jensen; stated, not hidden). One-step-ahead nextVariance(double[], com.quantfinlib.volatility.Egarch11.Params) is exact; multi-
step forecasts are deliberately NOT offered — iterating the log
recursion forecasts the MEDIAN variance, not the mean, and quietly
returning it as "the forecast" is the kind of lie this library
refuses (Garch11/GjrGarch11 forecast multi-step
honestly; use them when you need horizons). Research lane.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic double[]conditionalVariances(double[] returns, Egarch11.Params p) Conditional variance series under the fitted parameters.static Egarch11.Paramsfit(double[] returns) Fits EGARCH(1,1) to (demeaned) returns by grid MLE.static doublenextVariance(double[] returns, Egarch11.Params p) One-step-ahead variance — EXACT (tomorrow's ln h is deterministic today).
-
Method Details
-
fit
Fits EGARCH(1,1) to (demeaned) returns by grid MLE. -
conditionalVariances
Conditional variance series under the fitted parameters. -
nextVariance
One-step-ahead variance — EXACT (tomorrow's ln h is deterministic today).
-