Class VolatilityIndex
σ² = (2/T)·Σᵢ (ΔKᵢ/Kᵢ²)·e^{rT}·Q(Kᵢ) − (1/T)·(F/K₀ − 1)²
where Q(K) is the OUT-OF-THE-MONEY option mid at strike K (puts below
the forward, calls above, the put/call average at the pivot K₀ — the
highest strike at or below F), ΔK the half-distance between
neighboring strikes, and the last term corrects for K₀ ≠ F.
Why OTM options? Each strike's option contributes exactly the 1/K² slice needed to build a constant-dollar-gamma payoff — a position whose P&L IS realized variance. The market prices that portfolio, so the portfolio's price reveals the market's variance expectation, whatever model anyone used. That is why a vol SMILE raises the index above ATM implied vol: the wings carry real premium and the replication weights them in.
Honesty notes: single-expiry (the CBOE interpolates two expiries to exactly 30 days — supply the chain nearest your target tenor, or compute two indices and interpolate variance in time); truncation bias: strikes should span several σ√T or the index reads LOW (the tails you cannot see are variance you do not count). Styled after the methodology, not certified. Research lane, static, deterministic.
-
Method Summary
Modifier and TypeMethodDescriptionstatic doubleindex(double[] strikes, double[] putMids, double[] callMids, double forward, double rate, double tYears) The index (annualized volatility, e.g. 0.20 = "a VIX of 20") from one expiry's chain.
-
Method Details
-
index
public static double index(double[] strikes, double[] putMids, double[] callMids, double forward, double rate, double tYears) The index (annualized volatility, e.g. 0.20 = "a VIX of 20") from one expiry's chain.- Parameters:
strikes- ascending strikes, ≥ 3, all > 0putMids- put mid prices per strike, ≥ 0, finitecallMids- call mid prices per strike, ≥ 0, finiteforward- the forward F for this expiry, strictly inside (strikes[0], strikes[last]) — an index built on extrapolation would be an opinion, not a measurementrate- continuously-compounded rate to expirytYears- time to expiry, > 0
-