API reference
Options kit API (@unifin/chart-kit-options)
Generated reference of 71 public symbols of @unifin/chart-kit-options, grouped by kind and ordered as in the sources.
Generated from the package entry packages/chart-kit-options/src/index.ts. Names are reachable through
@unifin/chart-kit-options; use your editor for full signatures - this page carries the map.
Functions (33)
| Symbol | What it does |
|---|---|
buildOptionChainRows | Input order is kept: sorting is the host's controlled step. |
smileCurve | Smile model: atm + skew * ln(K/S) + curvature * ln(K/S)^2. |
termStructure | Term structure model: atm + slope * T (own demo-grade shape). |
smilePoints | Smile points as analytic samples (x = strike, y = iv). |
termPoints | Term points as analytic samples (x = years, y = iv). |
paintIvSmile | Paints the smile. |
paintIvTerm | Paints the term structure. |
ivSurface | Surface from the smile and term models: each expiry gets its own smile. |
paintIvSurface | Paints the surface as an accent-tinted heatmap with strike/expiry labels. |
normCdf | Standard normal cumulative distribution. |
normPdf | Standard normal density. |
intrinsic | Intrinsic value at expiry. |
bsPrice | Black-Scholes price; degenerate inputs fall back to the intrinsic value. |
bsDelta | Delta: the spot sensitivity (0..1 for calls, -1..0 for puts). |
bsGamma | Gamma: the delta sensitivity (same for calls and puts). |
bsVega | Vega per one unit of volatility (divide by 100 for a vol point). |
bsTheta | Theta per year (divide by 365 for a calendar day). |
bsRho | Rho per one unit of the rate (divide by 100 for a rate point). |
impliedVol | Implied volatility solved by bisection; NaN when the market price sits below the no-arbitrage lower bound or the inputs are degenerate. |
oiPoints | Split-bar samples: x = strike index shifted per side, y signed. |
oiTotals | Totals of the table: calls, puts (absolute) and the net. |
maxOi | Largest single value of the table (for the Y domain of the host). |
paintOpenInterest | Paints the split bars (calls up, puts down). |
legValue | Value of one leg at the given spot (premium already subtracted). |
payoffAt | Total payoff of the position at the given spot. |
payoffCurve | Sampled payoff curve; empty for a degenerate range. |
breakevens | Zero crossings of the curve with linear interpolation (grid precision). |
profitZones | Segments of the curve above zero, edges interpolated at the crossings. |
paintPayoffZones | Paints the gain and loss ribbons of the payoff: gain zones grow up from the zero line in the up colour, loss zones hang below it in the down colour. Returns the number of painted ribbons; a zero-width span paints nothing. |
paintPayoff | Paints the payoff curve itself. |
paintPayoffPair | Paints the expiry and the "now" curves (expiry accent, now muted). With zoneGradient the ribbon under the active (expiry) curve becomes a ramp dense at the curve and soft at the zero line (S105, ); the ramp is off by default and the return counts the curve samples only. |
greekProfile | Samples a greek across strikes or spot prices. |
paintGreekProfile | Paints the greek profile as a curve. |
Types (26)
| Symbol | What it does |
|---|---|
OptionChainQuote | - |
OptionChainStrike | - |
OptionChainContext | - |
ChainMoneyness | - |
OptionChainRow | - |
SmilePoint | - |
TermPoint | - |
IvCurveOptions | Options of the IV curve painters; the bare curve is the default. |
IvSurface | - |
SurfacePaintOptions | - |
OptionType | Option math of the options kit ( §2, ): the Black-Scholes price and greeks on the public 1973 formula plus an own implied-volatility solver. Reference values and properties (put-call parity, monotonicity) live in tests/options-math.test.ts; provenance - §2.10. |
BsParams | Standard Black-Scholes inputs: spot, strike, years, rate, volatility. |
StrikeOiRow | - |
OiMode | - |
OpenInterestOptions | Options of the open-interest painter; the flat fill is the default. |
LegKind | - |
OptionLeg | One leg: signed quantity, strike for options, premium paid per unit. |
PayoffMode | - |
NowParams | Parameters of the "now" valuation (remaining time, rate, volatility). |
PayoffCurveOptions | - |
ProfitZone | - |
PayoffZoneStyle | Zone style of the payoff painter; the flat fill is the compatible default. |
GreekName | - |
ProfileAxis | - |
ProfileParams | - |
ProfileRange | - |
Constants (12)
| Symbol | What it does |
|---|---|
CHAIN_COLUMNS | Chain columns of the options kit; the host renders and sorts them. |
IV_UNDERLAY_ALPHA_TOP | Underlay shares of the smile and the term curve (S105, ): the ribbon under the curve is dense at the line and soft at the plot bottom. |
IV_UNDERLAY_ALPHA_BOTTOM | - |
IV_FRAME_UNDERLAY_ALPHA | Wash of the surface frame over the heat cells (S105, ). |
IV_ROW_EDGE_ALPHA | Light edge of the row picked by the host (S105, ). |
OI_BAR_ALPHA_TOP | Bar ramp shares of the open interest (S105, ): dense at the tip of every bar, soft towards the baseline; the role colour stays the theme one. |
OI_BAR_ALPHA_BOTTOM | - |
PAYOFF_ZONE_ALPHA_TOP | Zone fills of the payoff (S105, ): the ramp is dense at the curve and fades towards the zero line, so the ribbons read as light. |
PAYOFF_ZONE_ALPHA_ZERO | - |
PAYOFF_ZONE_FLAT_ALPHA | Flat ribbon alpha: the host default and the canvas gradient degradation. |
PAYOFF_PAIR_ALPHA_CURVE | Underlay of the active curve of a pair: dense under the curve, soft at zero. |
PAYOFF_PAIR_ALPHA_ZERO | - |
Portfolio kit API (@unifin/chart-kit-portfolio)
Generated reference of 57 public symbols of @unifin/chart-kit-portfolio, grouped by kind and ordered as in the sources.
Swaps kit API (@unifin/chart-kit-swaps)
Generated reference of 35 public symbols of @unifin/chart-kit-swaps, grouped by kind and ordered as in the sources.
