VolCurve fits an implied volatility smile for a single option expiry using the SVI parametrization. After calling fit, you can query implied volatilities, total variance, option prices, and all standard Greeks across any set of strikes. You can also derive the full risk-neutral probability distribution from the fitted smile via implied_distribution.
Constructor
Pricing model used for implied volatility inversion. Use
"black76" for options on futures or forwards, and "bs" for spot options (Black-Scholes). The choice affects how Greeks are computed and how the forward price is resolved.Quote type to fit against.
"mid" uses the midpoint of bid and ask, with last_price as a fallback when available. "last" fits against last_price.Maximum age of option quotes in calendar days, relative to the valuation date. Rows older than this threshold are excluded before fitting.
Methods
fit(chain, market, column_mapping)
fit(chain, market, column_mapping)
Calibrate the SVI smile to market data. Must be called before any query method. Returns Raises:
self for chaining.Option chain DataFrame containing a single expiry. Must include an
expiry column and at least one supported price column (last_price, or bid/ask).Market inputs providing the risk-free rate, valuation date, and underlying price.
Optional mapping in the form
{"dataframe_column": "oipd_column"}. For example, {"type": "option_type"} means your DataFrame has a type column and OIPD should treat it as option_type. See Standard columns for the target names.ValueError if the expiry column is missing, invalid, or contains multiple expiries. CalculationError if calibration fails.implied_vol(strikes)
implied_vol(strikes)
total_variance(strikes)
total_variance(strikes)
iv_results(domain, points, include_observed)
iv_results(domain, points, include_observed)
Return a DataFrame comparing the fitted smile against market observations. Useful for inspecting calibration quality.
Optional
(min_strike, max_strike) range. Inferred from the data when omitted.Whether to include observed market IV columns (bid IV, ask IV, last IV) in the output.
plot(x_axis, y_axis, include_observed, figsize, title, xlim, ylim)
plot(x_axis, y_axis, include_observed, figsize, title, xlim, ylim)
Plot the fitted implied volatility smile.
X-axis mode.
"log_moneyness" requires a positive forward price in fit metadata.price(strikes, call_or_put)
price(strikes, call_or_put)
delta(strikes, call_or_put)
delta(strikes, call_or_put)
gamma(strikes)
gamma(strikes)
vega(strikes)
vega(strikes)
theta(strikes, call_or_put)
theta(strikes, call_or_put)
rho(strikes, call_or_put)
rho(strikes, call_or_put)
greeks(strikes, call_or_put)
greeks(strikes, call_or_put)
Calculate all Greeks at once and return them as a single DataFrame.
implied_distribution(grid_points, cdf_violation_policy)
implied_distribution(grid_points, cdf_violation_policy)
Derive the risk-neutral probability distribution from the fitted smile. Returns a Raises:
ProbCurve.Policy for CDF monotonicity violations.
"warn" repairs and warns; "raise" fails on material violations.ValueError if fit has not been called.Properties
At-the-money implied volatility, defined at Strike = Forward Price. Returned in decimal form (e.g.,
0.20 for 20%).A 1-element tuple containing the fitted expiry timestamp. Returns an empty tuple if the curve has not been fitted.
Structured diagnostic events for this curve. Inspect
.warning_diagnostics.events for data-quality and model-risk details.