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.
1
Initialize
VolSurface takes the same constructor arguments as VolCurve. Configure the method and pricing engine once; the same settings apply to every expiry pillar.2
Fetch data
Use
sources.fetch_chain with a horizon argument to pull all expiries within your target window.This example uses the built-in yfinance fetcher. For research or production work, your own vendor, broker, or exchange data will usually be cleaner. See Data sources to load a CSV or DataFrame instead.3
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 optionshorizon 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.4
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.5
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.6
Plot
plot overlays the fitted smiles across the expiries that survived calibration. By default, it plots log-moneyness against total variance.
7
Probability surface
Convert the fitted
VolSurface to a ProbSurface with implied_distribution(). Use ProbSurface.from_chain(...) when you want OIPD to fit the volatility surface and derive probabilities in one step.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.