@insiderfinance/totalfinance/volatility/surface
VolatilitySurface · field contracts
Page 2 of 2. Back to the entry point or find this declaration.
| Name / type | Meaning & unit | Optional / default |
|---|---|---|
return.slicesSurfaceSlice[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
return.ssviSSVIParameters | The global SSVI parameters when `model: 'ssvi'`, else `undefined`. unitless by name | Optional No @default declared; consult the signature and description. |
return.toJSON() => VolatilitySurfaceSnapshot | Serialize the surface to a plain, JSON-safe {@link VolatilitySurfaceSnapshot} (no closures). Restore it
with {@link VolatilitySurface.fromJSON}; the pair round-trips `iv()` identically on all six models. unitless by name | Required / declared member No @default declared; consult the signature and description. |
return.toRows() => SurfaceRow[] | The smile-chart / heatmap feed: one {@link SurfaceRow} per (slice, stored strike), with
`logMoneyness = ln(strike/forward)` and the stored `delta`/`iv`. Per the workspace missing-value
policy (WS2.12), any non-finite chart-facing numeric is emitted as `null` (never `NaN`, never
omitted). unitless by name | Required / declared member No @default declared; consult the signature and description. |
shock(shifts: { parallel?: number; skewTilt?: number; }, { sticky }?: { sticky?: 'strike' | 'moneyness'; }) => VolatilitySurface | Return a NEW surface with a shifted vol structure, produced WITHOUT re-fitting: each stored IV
sample gains a `parallel` offset plus a `skewTilt · k` skew rotation (`k = ln(K/forward)`,
log-moneyness), the per-slice deltas are recomputed from the shifted IVs, and only the
interpolators are rebuilt. The shock is echoed in the new surface's `assumptions.shock`.
`sticky`: `'strike'` (default) pins the tilt to each stored strike's own log-moneyness vs the slice
forward; `'moneyness'` lets the same additive shift travel with moneyness. Because the shift is
applied to the stored strike-indexed IV samples, both modes coincide at the stored strikes in this
eager v1 — the distinction only matters once a surface is re-anchored to a new spot/forward, which
this method does not do; the requested mode is recorded in `assumptions.shock.sticky` so a caller
that later re-anchors knows how the tilt was meant to travel.
Parametric models (`svi`/`sabr`/`heston`) have no closed-form shock, so the current smile is SAMPLED
at each slice's stored strikes, those samples are shifted, and the result DEGRADES to
`'interpolated'` with a `volatility.shock_degraded_to_interpolated` `warn` — the parametric fit is not
re-fit. Non-parametric models (`raw`/`interpolated`/`smoothed`) are preserved. unitless by name | Required / declared member No @default declared; consult the signature and description. |
shock(__1){ sticky?: 'strike' | 'moneyness'; } | unitless by name | Optional No @default declared; consult the signature and description. |
shock(__1).sticky'strike' | 'moneyness' | unitless by name | Optional No @default declared; consult the signature and description. |
shock(shifts){ parallel?: number; skewTilt?: number; } | unitless by name | Required / declared member No @default declared; consult the signature and description. |
shock(shifts).parallelnumber | unitless by name | Optional No @default declared; consult the signature and description. |
shock(shifts).skewTiltnumber | unitless by name | Optional No @default declared; consult the signature and description. |
slice(expiry: string | number) => SurfaceSlice | undefined | The smile at an expiry (exact label or nearest by `t`), or `undefined` if none. unitless by name | Required / declared member No @default declared; consult the signature and description. |
slice().return.deltasnumber[] | Call-delta `e^{−qt}·N(d1)` at each strike (the smile's delta axis, for skew lookups). unitless by name | Required / declared member No @default declared; consult the signature and description. |
slice().return.essviESSVIParameters | The globally-calibrated eSSVI parameters when `model: 'essvi'` (shared across all slices). unitless by name | Optional No @default declared; consult the signature and description. |
slice().return.expirystring | unitless by name | Required / declared member No @default declared; consult the signature and description. |
slice().return.forwardnumber | Forward `S·e^{(r−q)t}`. unitless by name | Required / declared member No @default declared; consult the signature and description. |
slice().return.hestonHestonParameters | The globally-calibrated Heston parameters when `model: 'heston'` (shared across all slices). unitless by name | Optional No @default declared; consult the signature and description. |
slice().return.impliedVolatilitiesnumber[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
slice().return.sabrSabrParameters | Fitted SABR parameters when `model: 'sabr'` (absent if the slice fell back to interpolation). unitless by name | Optional No @default declared; consult the signature and description. |
slice().return.ssviSSVIParameters | The globally-calibrated SSVI parameters when `model: 'ssvi'` (shared across all slices). unitless by name | Optional No @default declared; consult the signature and description. |
slice().return.strikesnumber[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
slice().return.sviSVIParameters | Fitted raw-SVI parameters when `model: 'svi'` (absent if the slice fell back to interpolation). unitless by name | Optional No @default declared; consult the signature and description. |
slice().return.timeToExpiryYearsnumber | Time to expiry in years (ACT/365F). years (decimal) | Required / declared member No @default declared; consult the signature and description. |
slice(expiry)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
slicesSurfaceSlice[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
ssviSSVIParameters | The global SSVI parameters when `model: 'ssvi'`, else `undefined`. unitless by name | Optional No @default declared; consult the signature and description. |
ssvi.phiimport('@insiderfinance/totalfinance/volatility').SSVIPhi | Curvature function. unitless by name | Required / declared member No @default declared; consult the signature and description. |
ssvi.phi.etanumber | unitless by name | Required / declared member No @default declared; consult the signature and description. |
ssvi.phi.gammanumber | unitless by name | Required / declared member No @default declared; consult the signature and description. |
ssvi.phi.kind('heston') | ('power-law') | unitless by name | Required / declared member No @default declared; consult the signature and description. |
ssvi.phi.lambdanumber | unitless by name | Required / declared member No @default declared; consult the signature and description. |
ssvi.rhonumber | Global skew `ρ ∈ (−1, 1)`. unitless by name | Required / declared member No @default declared; consult the signature and description. |
ssvi.thetaTerm{ timeToExpiryYears: number; theta: number; }[] | ATM total-variance knots `(t, θ)`, strictly increasing in both (calendar-arbitrage-free). unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON() => VolatilitySurfaceSnapshot | Serialize the surface to a plain, JSON-safe {@link VolatilitySurfaceSnapshot} (no closures). Restore it
with {@link VolatilitySurface.fromJSON}; the pair round-trips `iv()` identically on all six models. unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.assumptionsAssumptions<{ shock?: SurfaceShock; }> | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.config{ cosineExpansionTerms: number; dividendYield: number; riskFreeRate: number; sabrBeta: number; sabrVolatilityType: SabrVolatilityType; smoothingBandwidth?: number; } | Config knobs needed to rebuild the per-slice interpolators without re-solving from quotes. unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.config.cosineExpansionTermsnumber | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.config.dividendYieldnumber | decimal rate (0.05 = 5%) | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.config.riskFreeRatenumber | decimal rate (0.05 = 5%) | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.config.sabrBetanumber | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.config.sabrVolatilityTypeSabrVolatilityType | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.config.smoothingBandwidthnumber | unitless by name | Optional No @default declared; consult the signature and description. |
toJSON().return.diagnosticsDiagnostics | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.essviESSVIParameters | The global eSSVI parameters when `model: 'essvi'`. unitless by name | Optional No @default declared; consult the signature and description. |
toJSON().return.hestonHestonParameters | The global Heston parameters when `model: 'heston'`. unitless by name | Optional No @default declared; consult the signature and description. |
toJSON().return.modelSurfaceModel | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.pointsSurfacePoint[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.referenceSpotnumber | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.schemaVersionstring | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.slicesSurfaceSlice[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
toJSON().return.ssviSSVIParameters | The global SSVI parameters when `model: 'ssvi'`. unitless by name | Optional No @default declared; consult the signature and description. |
toRows() => SurfaceRow[] | The smile-chart / heatmap feed: one {@link SurfaceRow} per (slice, stored strike), with
`logMoneyness = ln(strike/forward)` and the stored `delta`/`iv`. Per the workspace missing-value
policy (WS2.12), any non-finite chart-facing numeric is emitted as `null` (never `NaN`, never
omitted). unitless by name | Required / declared member No @default declared; consult the signature and description. |