Class VolSurface
java.lang.Object
com.quantfinlib.pricing.VolSurface
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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondoubleatmVol(double expiryYears, double forward) ATM vol, taking the forward (or spot) as the at-the-money strike.static VolSurface.Builderbuilder()expiries()doubleprice(BlackScholes.OptionType type, double spot, double strike, double rate, double carry, double expiryYears) Option price using the surface vol at (expiry, strike).doubleskew(double expiryYears, double strikeLow, double strikeHigh) Smile slope between two strikes, in vol points per unit of strike.strikes(double expiryYears) doublevol(double expiryYears, double strike) Interpolated implied volatility at any (expiry, strike).
-
Method Details
-
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
-
strikes
-