Module surface
Expand description
Volatility-surface traits and typed market-data contracts.
Structs§
- BidAsk
Inversion Error - Error returned by
NormalizedSurfaceQuote::bid_ask_iv_boundswhen one side of the spread fails to invert. Carries thesidethat failed so downstream diagnostics can attribute the failure correctly. - BidAsk
IvBounds - Bid/ask implied-volatility band derived from
BidAskPrices. - BidAsk
Penalty - Tuning for the bid-ask-infeasibility penalty.
- BidAsk
Penalty Record - Trace entry for one quote that received a bid-ask-infeasibility penalty during calibration (#154 soft-penalty mode).
- BidAsk
Prices - Raw bid/ask market quote data attached to a normalized surface quote.
- Butterfly
Arbitrage Projection - Per-slice record of a butterfly-arbitrage projection applied by the joint
SSVI calibrator’s post-fit cleanup. When
g(k) < 0was detected at one or more strikes on a slice, the projection raisesϕ_Tfromphi_beforetophi_afteruntilmin_k g(k) ≥ 0on the strike grid.max_g_violation_beforerecords the most-negativeg(k)observed before the projection (0.0when no violation existed and the projection was a no-op). - Butterfly
Arbitrage Violation - Representative butterfly arbitrage violation on one smile slice.
- Butterfly
Violation - One slice-strike pair at which Gatheral’s butterfly-arbitrage condition
g(k) ≥ 0was violated by the joint SSVI fit. Reported onJointSsviGlobals::butterfly_arbitrage_violationsalongside any post-fit projection corrections. - Calendar
Arbitrage Violation - Representative calendar arbitrage violation across two expiries.
- Dupire
Extraction Diagnostics - Aggregate diagnostics emitted by Dupire grid extraction.
- Dupire
Extraction Grid - Result of
extract_dupire_local_volatility_grid. - Dupire
Extraction Policy - Numerical policy for
extract_dupire_local_volatilityandextract_dupire_local_volatility_grid. - Dupire
Local VolPoint - One Dupire-extracted local-volatility node and its supporting derivatives.
- Feasibility
Drop - One quote dropped by the calibration-time feasibility filter.
- Huber
Loss - Validated configuration for a Huber loss.
- Joint
Ssvi Calibration Bounds - Bounds for the joint Gatheral-Jacquier SSVI calibrator. Composes the
per-slice
SsviCalibrationBounds(carriesθ,ρ,φadmissibility) with bounds on the surface-global Gatheral-Jacquier parameters(η, γ)and on the term-structure parameters used by eachThetaTermStructurevariant. - Joint
Ssvi Calibration Policy - Policy for the joint Gatheral-Jacquier SSVI calibrator
(
calibrate_joint_ssvi_surface). - Joint
Ssvi Calibration Prior - Validated Bayesian-smoothing prior for the joint Gatheral-Jacquier SSVI
calibrator. When configured on
JointSsviCalibrationPolicy, the calibration objective gains an additive penalty termλ · Σᵢ ((paramᵢ − prior_paramᵢ) / rangeᵢ)²summed over the five jointly optimised parameters:(power_law_a, power_law_b, eta, gamma, rho). Per-axisrangecomes from the policy’sJointSsviCalibrationBounds. - Joint
Ssvi Globals - Surface-global outputs of the joint Gatheral-Jacquier SSVI calibration.
Returned on
SurfaceCalibrationReport::joint_ssvi_globalsfor surfaces produced bycalibrate_joint_ssvi_surface;Nonefor per-slice fits. - Local
VolSurface Grid - Local-volatility surface evaluated on a tensor
(expiry, log_moneyness)grid. - Normalized
Surface Quote - Calibration-ready quote data with explicit weighting and provenance.
- Parity
Consistency Report - Verdict on whether a chain’s supplied forward agrees with put-call parity.
- Parity
Forward Curve - A
{constant log-offset, borrow/financing rate}decomposition of the per-tenor parity forwards of one underlying. - Parity
Forward Curve Point - One tenor’s input to
estimate_parity_forward_curve: the time to expiry in years and the parity forward recovered from that tenor’s pairs. - Parity
Forward Curve Residual - Per-tenor residual produced by
estimate_parity_forward_curve, one per inputParityForwardCurvePointin the order supplied. - Parity
Forward Estimate - Forward and discount factor recovered from put-call parity.
- Parity
Quote Pair - A call and put price observed at one strike and a common expiry.
- Sabr
Calibration Bounds - Bounds for calibrating SABR slice parameters with fixed beta.
- Sabr
Calibration Policy - Policy for calibrating a SABR surface with fixed beta.
- Sabr
Calibration Prior - Validated Bayesian-smoothing prior for SABR calibration.
- Sabr
Parameters - One SABR parameter set under the Hagan 2002 lognormal approximation.
- Sabr
Smile - One SABR smile slice at a specific expiry.
- Sabr
Surface - Discrete-expiry surface backed by SABR smile slices.
- Ssvi
Calibration Bounds - Bounds for calibrating SSVI slice parameters.
- Ssvi
Calibration Policy - Policy for calibrating an SSVI surface.
- Ssvi
Calibration Prior - Validated Bayesian-smoothing prior for SSVI slice calibration.
- Ssvi
Slice - One SSVI slice at a specific expiry.
- Ssvi
Surface - Discrete-expiry surface backed by SSVI slices.
- Static
Arbitrage Check Policy - Policy controlling tolerance thresholds for static-arbitrage diagnostics.
- Static
Arbitrage Diagnostics - Richer static-arbitrage diagnostics than the legacy
ArbFreeReport. - Surface
Butterfly Selection - Butterfly selection and value from one smile.
- Surface
Calibration Input - End-to-end normalized calibration payload for one option-chain snapshot.
- Surface
Calibration Outcome - Fitted surface plus its structured calibration report.
- Surface
Calibration Quality Thresholds - Thresholds used to classify calibrated surface fit quality.
- Surface
Calibration Report - Full report for one calibrated surface.
- Surface
Calibration Residual - Residual row for one normalized quote in a fitted surface report.
- Surface
Calibration Search Policy - Optimization controls shared by the public surface calibration APIs.
- Surface
Calibration Summary - Aggregate fit-quality summary for a calibrated surface.
- Surface
Carry Inputs - Explicit carry assumptions required to normalize a live chain into calibration-ready surface observations.
- Surface
Delta Coordinate - Optional delta-space coordinate carried with a normalized quote.
- Surface
Delta Strike - One delta-grid node paired with its inverted strike.
- Surface
Delta Strike Selection - One theoretical delta strike and the nearest listed strike selected for it.
- Surface
Delta Strike Selection Request - Parameters for selecting a listed strike from a delta target.
- Surface
Delta Wing Strike Selection - Put/call wing strikes selected from the same absolute delta.
- Surface
LogMoneyness - Log-moneyness coordinate, typically
ln(K / F)orln(F / K)depending on the caller’s convention. - Surface
Market Context - Market context shared across a normalized calibration payload.
- Surface
Normalization Outcome - Normalized calibration payload plus the diagnostics emitted while building it from live chain state.
- Surface
Normalization Policy - Policy governing how live quotes are turned into calibration-ready surface observations.
- Surface
Normalization Report - Structured diagnostics emitted by quote normalization.
- Surface
PerTenor Forwards - Per-tenor forward overrides applied on top of the spot-plus-carry forward.
- Surface
Quality Filtered Outcome - End-to-end outcome of the quality-filtered prep pipeline.
- Surface
Quote Adjustment - One retained quote-quality adjustment inside a normalization report.
- Surface
Quote Coordinate - Strike-space coordinate for one normalized surface quote.
- Surface
Quote Observation - Market observation attached to one normalized surface quote.
- Surface
Quote Provenance - Provenance attached to one normalized surface quote.
- Surface
Quote Quality - Live-feed anomaly flags attached to a normalized quote.
- Surface
Quote Quality Policy - Quality gates applied to raw chain quotes before normalization.
- Surface
Quote Quality Rejection - One contract dropped by the quality filter, with metadata for debugging.
- Surface
Quote Quality Report - Full diagnostic report from one quality-filter pass.
- Surface
Quote Quality Summary - Compact diagnostic counters from one quality-filter pass.
- Surface
Quote Treatment - Quote-quality treatment used for crossed, locked, and stale markets.
- Surface
Quote Weight - Weight decomposition attached to one normalized quote.
- Surface
Rejected Quote - One quote rejected from the normalized calibration payload.
- Surface
Repair Adjustment - Final adjustment applied to one representative
(expiry, strike)node. - Surface
Repair Input Outcome - Repaired normalized input plus the explicit repair report that produced it.
- Surface
Repair Outcome - Family-specific post-fit repair result with repaired nodes and recalibration.
- Surface
Repair Policy - Deterministic repair controls for explicit post-fit smoothing workflows.
- Surface
Repair Report - Structured report for one explicit repair pass over normalized surface data.
- Surface
Repair Summary - Aggregate summary of an explicit surface repair pass.
- Surface
Risk Reversal Selection - Risk-reversal selection and value from one smile.
- Surface
Selected Smile Point - One validated
(strike, implied volatility)smile point. - Surface
Selection Quote Policy - Policy for consuming normalized quotes in strike-selection helpers.
- Surface
Slice Calibration Report - Slice-level summary row for a fitted surface.
- Surface
Smile American Delta Strike Selection Request - Validated request for selecting a listed strike at a target absolute delta using actual American model delta and smile-sourced implied volatility.
- Surface
Smile Delta Selection Policy - Tunable convergence policy for smile-aware delta-target strike selection.
- Surface
Smile Delta Strike Selection Request - Validated request for selecting a listed strike at a target absolute delta against a calibrated smile.
- Surface
Smile Risk Metrics - Standard smile-metrics bundle: ATM IV plus 25-delta and 10-delta risk
reversals (each carrying its own butterfly via
SurfaceSmileRiskReversal::butterfly). - Surface
Smile Risk Reversal - Smile-based risk reversal with companion butterfly and ATM IV.
- Surface
Smile Risk Reversal Wing - One side of a smile-based risk reversal: both wing strikes plus the smile IV evaluated at the theoretical strike.
- Surface
Tenor - Surface expiry represented in years.
- Surface
Wing Smile Selection - ATM and wing points selected from one smile.
- SviCalibration
Policy - Policy for calibrating an SVI surface.
- SviCalibration
Prior - Validated Bayesian-smoothing prior for raw-SVI calibration.
- SviNatural
Calibration Bounds - Bounds for calibrating natural SVI parameters.
- SviNatural
Parameters - Natural SVI parameterization.
- SviRaw
Calibration Bounds - Bounds for calibrating raw SVI parameters.
- SviRaw
Parameters - Raw SVI parameterization.
- SviSmile
- One SVI smile slice at a specific expiry.
- SviSurface
- Discrete-expiry surface backed by SVI smile slices.
- Trimmed
MseLoss - Validated configuration for a trimmed-MSE loss.
Enums§
- Acceptable
Reason - Specific reason a calibrated fit was classified as
FitQuality::Acceptable. - BidOr
Ask - Which side of a bid/ask spread an operation refers to.
- Degeneracy
Reason - Specific degeneracy detected on an otherwise successful calibration.
- Failure
Reason - Specific failure mode for a calibration report.
- Feasibility
Drop Reason - Reason an individual quote was hard-dropped by the bid-ask-feasibility filter (#154).
- Feasibility
Policy - Bid-ask-feasibility configuration applied during surface calibration.
- Feasibility
Warning - Non-fatal warning produced by the bid-ask-feasibility filter while preparing the calibration (#154).
- FitQuality
- Overall trust classification for a calibrated surface fit.
- Loss
Function - Loss function used to aggregate per-quote residuals during surface calibration.
- Moneyness
Window - Per-expiry moneyness-window gate.
- Surface
Calibration Model - Fitted model family recorded in a calibration report. Joint
Gatheral-Jacquier surfaces produced by
calibrate_joint_ssvi_surfaceare tagged asSurfaceCalibrationModel::Ssvi(same surface family); consumers distinguish them from per-slice fits by inspectingSurfaceCalibrationReport::joint_ssvi_globalsforSome(_)— keeping this enum exhaustive and SemVer-stable. - Surface
Calibration Objective Space - Residual space used to compare market and model quotes during surface calibration.
- Surface
Delta Convention - Delta convention carried alongside a delta-space coordinate.
- Surface
Normalization Adjustment Reason - Adjustment reason recorded when normalization retains a quote but reduces its quality weight.
- Surface
Normalization Reject Reason - Reject reason recorded in the normalization report when one live quote is dropped from the calibration payload.
- Surface
Price Source - Source used to derive the normalized reference price.
- Surface
Quote Quality Reject Reason - Reasons a chain contract is dropped by the quality filter.
- Surface
Quote Treatment Kind - Quality-treatment kind applied to a normalized quote.
- Surface
Reference Price Policy - Reference-price selection policy used during quote normalization.
- Surface
Repair Adjustment Reason - Why one surface node was adjusted during an explicit repair workflow.
- Surface
Slice Calibration Parameters - Slice-level fitted parameter payload attached to a calibration report.
- Surface
Smile Risk Reversal Wing Quality - Whether a wing’s evaluation point fell inside the listed-strikes support on that wing.
- SviCalibration
Parameterization - Which SVI parameterization to fit during calibration.
- Theta
Term Structure - Parameterisation of the ATM total-variance term-structure
θ(T)used by the joint Gatheral-Jacquier SSVI calibrator. Each variant determines both the closed-form / small-search Pass-1 fit ofθ(T)and the post-fit extrapolation ofθ(T)outside the anchor tenor range. - Theta
Term Structure Params - Parametric payload for a fitted
crate::ThetaTermStructure. Carried onJointSsviGlobals::theta_term_structure_params; the variant matches the one configured oncrate::JointSsviCalibrationPolicy.
Constants§
- DEFAULT_
FORWARD_ PARITY_ RELATIVE_ TOLERANCE - Suggested relative tolerance for
check_forward_parity: a supplied forward within 10 bp of the parity forward is treated as consistent. - DEFAULT_
PARITY_ MONEYNESS_ WINDOW - Suggested half-width of the near-ATM log-moneyness window for
select_near_atm_parity_pairs:±0.05, roughly±5%in strike. - SMILE_
DELTA_ DEFAULT_ BRACKET_ EXPANSIONS - Default cap on doubling / halving expansions used to bracket the delta-target objective in the American smile-delta path.
- SMILE_
DELTA_ DEFAULT_ MAX_ ITERATIONS - Default cap on smile-aware delta-target fixed-point iterations (European path) and on bisection iterations (American path).
- SMILE_
DELTA_ DEFAULT_ OBJECTIVE_ TOLERANCE - Default absolute tolerance on the absolute-delta residual used by the American smile-delta seed early-exit and bisection convergence checks.
- SMILE_
DELTA_ DEFAULT_ RELATIVE_ TOLERANCE - Default convergence tolerance on
(next_strike - prev_strike).abs() / max(forward.abs(), 1.0)between successive smile-aware delta-target iterations.
Traits§
- Surface
Smile - Trait for querying a single-expiry implied-volatility smile slice.
- VolSurface
- Trait for querying an implied-volatility surface.
Functions§
- calibrate_
joint_ ssvi_ surface - Calibrate an SSVI surface jointly across all expiry slices (Gatheral-Jacquier 2014).
- calibrate_
sabr_ surface - Calibrate a SABR surface from normalized market quotes.
- calibrate_
ssvi_ surface - Calibrate an SSVI surface from normalized market quotes.
- calibrate_
svi_ surface - Calibrate an SVI surface from normalized market quotes.
- check_
forward_ parity - Check a supplied forward against the put-call-parity forward of the chain.
- diagnose_
static_ arbitrage - Diagnose representative static-arbitrage violations using the default tolerances.
- diagnose_
static_ arbitrage_ with_ policy - Diagnose representative static-arbitrage violations using an explicit tolerance policy.
- estimate_
parity_ forward - Recover the forward and discount factor from put-call parity.
- estimate_
parity_ forward_ curve - Fit a
{constant log-offset, borrow/financing rate}curve across per-tenor parity forwards. - extract_
dupire_ local_ volatility - Extract one Dupire local-volatility node at
(expiry, strike). - extract_
dupire_ local_ volatility_ grid - Extract Dupire local volatility on a tensor grid of
(expiry, log_moneyness)nodes. - normalize_
chain_ for_ surface - Normalize the live chain into calibration-ready surface quotes.
- normalize_
chain_ for_ surface_ with_ forward_ overrides - Normalize the live chain with explicit per-tenor forward overrides applied to the shared market context.
- prepare_
calibration_ input_ with_ quality_ policy - Apply the quality policy to a raw chain, then normalize the survivors into
a calibration-ready
SurfaceCalibrationInput. - prepare_
calibration_ input_ with_ quality_ policy_ and_ forward_ overrides - Like
prepare_calibration_input_with_quality_policy, but with per-tenor forward overrides applied to the shared market context. - repair_
sabr_ surface - Sample a calibrated SABR surface, repair the sampled nodes explicitly, and re-fit a SABR surface from the repaired payload.
- repair_
ssvi_ surface - Sample a calibrated SSVI surface, repair the sampled nodes explicitly, and re-fit an SSVI surface from the repaired payload.
- repair_
surface_ input - Repair representative surface nodes explicitly and return a new normalized calibration payload plus a structured repair report.
- repair_
svi_ surface - Sample a calibrated SVI surface, repair the sampled nodes explicitly, and re-fit an SVI surface from the repaired payload.
- select_
near_ atm_ parity_ pairs - Keep only the pairs whose strike sits within
max_abs_log_moneynessofreference_forward— i.e.|ln(K / reference_forward)| <= max_abs_log_moneyness. - surface_
butterfly_ from_ normalized_ quotes - Select a butterfly from normalized quotes.
- surface_
butterfly_ from_ smile - Select a butterfly from one smile.
- surface_
delta_ from_ strike - Compute an absolute delta coordinate for a strike.
- surface_
delta_ grid - Build a sorted, deduplicated absolute-delta coordinate grid.
- surface_
nearest_ strike - Select the listed strike nearest to a target, with lower-strike tie-breaks.
- surface_
raw_ interpolated_ skew - Non-parametric short-DTE risk reversal, butterfly, and ATM IV from raw quotes.
- surface_
risk_ reversal_ from_ normalized_ quotes - Select a risk reversal from normalized quotes.
- surface_
risk_ reversal_ from_ smile - Select a risk reversal from one smile.
- surface_
select_ delta_ strike - Select the nearest listed strike to a theoretical delta strike.
- surface_
select_ delta_ wing_ strikes - Select put and call listed wing strikes from one absolute delta.
- surface_
select_ smile_ american_ delta_ strike - Select one listed strike at a target absolute delta using actual American model delta and a calibrated smile for strike-local implied volatility.
- surface_
select_ smile_ american_ delta_ wing_ strikes - Select put and call listed wing strikes at one absolute delta using actual American model delta and smile-sourced implied volatility.
- surface_
select_ smile_ delta_ strike - Select one listed strike at a target absolute delta using a calibrated smile to source the implied volatility consistent with each iterate.
- surface_
select_ smile_ delta_ wing_ strikes - Select put and call listed wing strikes at one absolute delta using a calibrated smile for the implied volatility at each iterate.
- surface_
select_ wing_ normalized_ quotes - Select ATM and symmetric wings from normalized quotes.
- surface_
select_ wing_ smile_ points - Select ATM and symmetric listed wings from one smile.
- surface_
signed_ delta_ from_ strike - Compute signed delta for a strike under a supported surface convention.
- surface_
smile_ iv_ at_ delta - Look up smile-implied IV at a single delta target on one wing.
- surface_
smile_ risk_ metrics - Compute the standard smile-metrics bundle: ATM IV, RR25, RR10, fly25, fly10 in one call.
- surface_
smile_ risk_ reversal - Compute a smile-based risk reversal, butterfly, and ATM IV in one call.
- surface_
strike_ from_ delta - Invert an absolute delta coordinate into a strike.
- surface_
strike_ grid_ from_ deltas - Build a sorted delta grid and invert each coordinate to a strike.