VolSurface extends single-expiry smile fitting to the term structure. It fits an SVI smile at each expiry in your chain, builds a total-variance interpolator between pillars, and exposes maturities within the fitted range as VolCurve slices. The guide below covers initialization, fitting, slicing, export, and conversion to a probability surface.
Initialize
VolSurface takes the same constructor arguments as VolCurve. Configure the method and pricing engine once; the same settings apply to every expiry pillar.Fetch data
Use
sources.fetch_chain with a horizon argument to pull all expiries within your target window.Fit
Call
Accepted formats:
vol_surface.fit(chain, market). The method requires at least two distinct expiries. By default it uses failure_policy="skip_warn", which skips any expiry that fails to calibrate and records a WorkflowWarning rather than aborting the entire fit.failure_policy options| Value | Behavior |
|---|---|
"skip_warn" (default) | Skips failing expiries and continues fitting the surface. |
"raise" | Raises a CalculationError on the first expiry that fails. |
horizon filteringPass horizon directly to fit to discard expiries beyond a cutoff, even if your chain already contains them:"30d", "6m", "1y", or an explicit future date string or datetime.date.Slice
vol_surface.expiries returns a sorted tuple of pd.Timestamp objects for every successfully fitted pillar. vol_surface.slice(expiry) returns a VolCurve at that maturity.When you slice at a maturity that is not an exact fitted pillar,
VolSurface derives a synthetic VolCurve from the total-variance interpolator. The interpolated curve supports implied_vol, price, greeks, and implied_distribution just like a directly fitted curve.Export
iv_results returns a long-format DataFrame spanning all fitted pillars. Supply start, end, and step_days to control the time grid.expiry column. Set include_observed=True to add observed market bid/ask/mid IV columns from each pillar.VolSurface.fit requires at least two unique expiries. A single-expiry chain raises a CalculationError. Use VolCurve.fit for single-expiry chains. Surface queries are limited to positive maturities up to the last fitted expiry.Column mapping
If your DataFrame uses non-standard column names, passcolumn_mapping before fitting. The mapping direction is {"your_column": "oipd_column"}. See Standard columns for the target names.
strike, expiry, option_type, bid, ask, last_price, volume, and last_trade_date.