ProbCurve extracts that distribution from a single-expiry option chain by fitting an SVI volatility smile and converting it into probabilities. The walkthrough below takes you from data download to distributional statistics in five steps.
Select expiry
Start by fetching the available expiry dates for your ticker.
sources.list_expiry_dates calls the built-in yfinance connection and returns dates as YYYY-MM-DD strings.Fetch chain
Pass the selected expiry to
sources.fetch_chain. It returns two objects: a normalized chain DataFrame and a VendorSnapshot that records the underlying price and download timestamp.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.MarketInputs
MarketInputs bundles the market context needed for calibration. Use the snapshot fields to avoid mis-dating your inputs.Fit
ProbCurve.from_chain fits an SVI volatility smile and derives the risk-neutral distribution in one call.ModelRiskWarning. Use cdf_violation_policy="raise" if you want strict violations to propagate as errors instead.ProbCurve.from_chain requires a chain with a single expiry. If your DataFrame contains multiple expiry dates, OIPD raises a ValueError and asks you to use ProbSurface.from_chain instead.