Class VolSurface

java.lang.Object
com.quantfinlib.pricing.VolSurface

public final class VolSurface extends Object
Implied volatility surface built from (expiry, strike, vol) pillar quotes — or directly from market option prices via implied-vol inversion.

Interpolation follows market practice:

  • Within a smile — linear in vol across strikes, flat extrapolation beyond the quoted wings.
  • Across expiries — linear in total variance (w = σ²·T) at fixed strike, which keeps the interpolated term structure calendar-consistent; flat vol extrapolation outside the quoted expiry range.
Immutable and thread-safe once built.
  • Method Details

    • builder

      public static VolSurface.Builder builder()
    • vol

      public double vol(double expiryYears, double strike)
      Interpolated implied volatility at any (expiry, strike).
    • atmVol

      public double atmVol(double expiryYears, double forward)
      ATM vol, taking the forward (or spot) as the at-the-money strike.
    • price

      public double price(BlackScholes.OptionType type, double spot, double strike, double rate, double carry, double expiryYears)
      Option price using the surface vol at (expiry, strike).
    • skew

      public double skew(double expiryYears, double strikeLow, double strikeHigh)
      Smile slope between two strikes, in vol points per unit of strike.
    • expiries

      public NavigableSet<Double> expiries()
    • strikes

      public NavigableSet<Double> strikes(double expiryYears)