API reference
Bonds kit API (@unifin/chart-kit-bonds)
Generated reference of 314 public symbols of @unifin/chart-kit-bonds, grouped by kind and ordered as in the sources.
Generated from the package entry packages/chart-kit-bonds/src/index.ts. Names are reachable through
@unifin/chart-kit-bonds; use your editor for full signatures - this page carries the map.
Functions (69)
| Symbol | What it does |
|---|---|
yearFraction | Year fraction between two ISO dates under ACT/365 or 30/360; NaN on a bad date. 30/360 counts whole months as thirty days, which is the convention an accrual period of a swap is usually quoted under. |
curveCompassModel | Curves projected onto the tenor angles with a shared radius domain. |
paintCurveCompass | Paints the compass: the polar grid, muted family outlines, then the active ring filled with its vertex dots; tenor chips ride on wide panels. Returns the number of painted rings. |
countryHeatmapModel | Signed deviations of the countries mapped onto a diverging scale. |
paintCountryHeatmap | Paints the tile grid: diverging tiles, the value inside large tiles, the accent edge of the active tile and its card above or below it. Returns the number of painted tiles. |
creditSpreadPanel | The two readings over one window: series stats, stress zones and domain. |
paintCreditSpreadPanel | Paints the panel: the two corridors, the stress zones, the IG line and the glowing HY line with the window maximum marked and labelled in bp. Returns the number of painted lines (0..2). |
yieldCurvePoints | Sorted copy of the points (by years); non-finite samples are dropped. |
curveToPoints | Curve points as analytic samples for the core painters. |
interpolateCurveValue | Value of a cleaned, sorted curve at a tenor: exact nodes win, a hit between two nodes interpolates; a repeated tenor reads its first node. With clamp the ends extend to the nearest node, otherwise a tenor outside the quoted range gives null. |
curveSpread | Difference of two curves aligned by years, in basis points. |
paintYieldCurve | Paints the curve as a polyline over the numeric axis. |
paintCurveLabels | Paints the labelled curve points as markers (label to the right). |
paintCurveSpread | Paints the spread as signed bars from zero. |
yieldDecomposition | One nominal date split into the real part and the expectations. |
paintYieldDecomposition | Paints the decomposition: for every date the real block from the zero line and the expectations block above it, the light edge of the nominal top and the share labels. Returns the number of painted dates. |
morphShares | Interpolates the shares of the decomposition between two dates (S102): a linear blend with t clamped into 0..1; signs survive and the sum of the valid input pairs holds; a non-finite target returns from untouched. |
couponEvents | Events from the cash flows; the final flow is the redemption. |
eventPoints | Events as analytic samples (x = years, y = amount). |
eventsTotal | Total of all events (coupons plus redemption). |
paintCouponTimeline | Paints the events as labelled markers (label to the right of the dot). |
curveFanHistory | Aligns the dated history: cleans the samples, thins the excess, assigns the alpha ramp by age and pads the domain for the labels and the glow. |
paintCurveFan | Paints the fan: muted lines first (oldest to newest), the hero accent line last with a light glow when the canvas supports shadows. Returns the number of painted lines. |
buildLadder | Ladder buckets in the given order; non-finite amounts count as zero. |
ladderWeightedYtm | Amount-weighted average yield of the ladder; NaN when no row carries a yield. |
paintBondLadder | Paints the ladder as bars from zero over the category axis. |
marketMapModel | The curve plus the issues: every bond reads its spread to the interpolated curve; issues with unreadable values are dropped, a curve without readable nodes drops every issue (there is nothing to compare against). Codes of the issues are expected to be unique - the connector and the spread resolve the first row of a code. |
marketMapSpread | Spread between two issues in bp (A minus B); null when a code is absent. |
paintMarketMap | Paints the map: the hero curve, one bubble per issue in its verdict colour and, when two issues are selected, their connector with the spread chip. Returns the number of painted issues. |
couponSchedule | Coupon dates from settlement to maturity, back-stepped by the frequency. |
couponFlows | Coupon plus redemption flows of a plain vanilla bond, near to far. |
priceFromYield | Present value of the flows at the given yield (decimal, nominal annual). |
bondPrice | Clean price of the bond at the given yield. |
bondYtm | Yield to maturity solved by bisection against the target clean price. |
bondYtp | Yield to the call or put date: flows stop at the redemption date. |
flowsUntil | Cash flows of a bond that redeems early at redemptionYears. |
macaulayDuration | Macaulay duration in years: present-value weighted mean term. |
modifiedDuration | Modified duration: relative price sensitivity to the yield. |
convexity | Convexity in years squared: second-order price sensitivity (period-based). |
accruedInterest | Accrued interest since the last coupon: the coupon amount scales with the elapsed share of the coupon period under the chosen day count. |
morphEase | Cubic-in-out easing of the canon; non-finite input means the zero frame. |
morphCurveSeries | One morph frame: both curves are aligned on the union of their tenors (the ends extend to the nearest node: the morph moves the shape, not the range) and blended by the eased progress. t is clamped into 0..1; t = 0 gives the from curve, t = 1 the to curve. A curve empty on one side passes through unchanged. |
paintDot | Round dot; without arc the host canvas gets a square of the same box. |
paintLabelChip | Rounded label capsule with a centred text; x/y address the centre of the capsule. A canvas without arc degrades to a plain filled rectangle - the text stays legible, the contrast survives (BOND-VISUALS §5). |
priceToPar | Clean price to par (100) from the absolute price of the terms. |
parToPrice | Absolute clean price of the terms from a price-to-par reading. |
priceFromYieldSeries | Reads a yield series as clean prices to par: every point goes through the bond math of the terms. Unreadable points (zero face, NaN) are dropped. |
yieldFromPriceSeries | Reads a clean price series (to par) back as yields through the bond math. |
priceModeSeries | The series in the requested mode: yield passes the samples through (sorted, cleaned), price reads them as clean prices to par. |
tenorPulseChips | Chips of the pulse, ordered by tenor (the panel reads left to right). |
paintTenorPulse | Paints the pulse row: one chip per tenor with its tone underlay, the value inside and the signed delta under the chip on tall panels. Wraps the chips into at most rows (default 2) lines instead of clipping them. Returns the number of painted chips. |
pvWaterfall3dModel | Builds the waterfall model. Non-positive and out-of-window flows paint nothing; PVs come from priceFromYield on a one-flow array (the exact per-flow present value), so a scenario total equals the kit price at the shifted yield by construction. |
paintPvWaterfall3d | Paints the waterfall through the scene3d bars painter and returns the number of painted faces (three per bar). Bar colors: the active scenario takes the theme accent, negative shifts the down tone, the rest the muted tone; widths follow the flow and scenario counts, so a single scenario is one flat row. |
curveRidgelineModel | The dated history as bands: newest slot on top, alpha fading with age. |
paintCurveRidgeline | Paints the bands: oldest first, the hero last; labels ride in chips on wide panels. Returns the number of painted bands. |
spreadRiverModel | Parallel spread channels over one shared half-domain (the sign kept). |
paintSpreadRiver | Paints the river: zero edges of every channel, the muted outlines, then the active channel filled by its sign with extreme dots and bp chips. Returns the number of painted channels. |
buildBondScreenerRows | Input order is kept: sorting is the host's controlled step. |
formatTenor | 0.25 -> 3M, 1 -> 1Y, 7.5 -> 7.5Y; non-finite values render as -. |
curveSnapshotModel | Aligns the dated curves: cleans the samples, picks the hero and pads the domain so the hero underlay and labels never touch the edges. |
paintCurveSnapshot | Paints the snapshot: muted curves first, then the hero underlay, the hero line, its halo points and the term labels. Returns the number of painted curves (muted plus hero), matching the other painters of the kit. |
yieldAtYears | Linear interpolation of the curve at a tenor: exact nodes win, a hit between two nodes interpolates, anything outside the quoted range returns null. |
spreadStripModel | One pair over the dated history: spreads in bp, zones, stats and domain. |
paintSpreadStrip | Paints the strip: recession plates with their year, the inversion underlay below the threshold, signed gradient bars from zero, the zero line, the extreme dots and the haloed marker of the current reading. Returns the number of painted bars. |
curveSurfaceModel | The dated history as a surface: thinned rows, depth, alpha ramp and domain. |
paintCurveSurface | Paints the surface: the flat underlay of the front curve, the muted rows from the farthest to the nearest, then the front hero with its end dot. Returns the number of painted rows. |
yieldMapModel | The dated history as a tenor x time grid with a percentile colour domain. |
yieldMapIsolines | Isolines of the requested levels (default: the 1 pp grid inside the domain). |
paintYieldMap | Paints the map: one diverging tile per quotable cell, then the isolines and their level chips on wide panels. Returns the number of painted cells. |
Types (93)
| Symbol | What it does |
|---|---|
DayCountConvention | Day-count convention of an accrual period. |
CompassSeries | - |
CurveCompassOptions | - |
CompassVertex | - |
CompassRing | - |
CurveCompass | - |
CurveCompassPaintOptions | - |
CountryHeatmapEntry | - |
CountryHeatmapOptions | - |
CountryRegion | A titled cluster of country codes (order of the codes is the capture order). |
CountryHeatmapTone | - |
CountryHeatmapCell | - |
CountryHeatmapGroup | A titled cluster of tiles ready for the painter (empty clusters dropped). |
CountryHeatmap | - |
CountryHeatmapPaintInput | - |
CountryHeatmapPaintOptions | - |
CreditSpreadPoint | - |
CreditSpreadOptions | - |
CreditSpreadSeries | - |
CreditSpreadRange | - |
CreditSpreadSpan | Zone boundaries as indexes into hy.points; parallel to zones. |
CreditSpreadPanel | - |
CreditSpreadPaintOptions | - |
CurvePoint | One curve point: years to maturity and the yield as a decimal. |
CurveSpread | - |
YieldDecompositionInput | - |
YieldDecompositionRow | - |
YieldDecomposition | - |
YieldDecompositionPaintOptions | - |
CouponEventKind | - |
CouponEvent | One dated event of the bond: coupon C1..Cn plus the final redemption M. |
CurveFanEntry | - |
CurveFanOptions | - |
CurveFanLine | - |
CurveFan | - |
CurveFanPaintOptions | - |
BondLadderRow | One ladder row: a maturity bucket and the amount maturing in it. |
BondLadder | - |
MarketBondInput | - |
MarketMapOptions | - |
MarketMapRow | - |
MarketMap | - |
MarketMapPaintOptions | - |
CashFlow | One future cash flow: years to the payment and its amount (face currency). |
BondTerms | Terms of a plain vanilla coupon bond. |
MorphOptions | - |
LabelChipOptions | - |
PriceModePoint | One dated sample of the series; x is the position on the time axis. |
TenorPulseEntry | - |
TenorPulseChip | - |
TenorPulsePaintOptions | - |
PvWaterfallInput | - |
PvWaterfallOptions | - |
PvWaterfallBar | - |
PvWaterfall3d | - |
PvWaterfall3dPaintInput | - |
PvWaterfall3dPaintOptions | - |
CurveRidgelineEntry | - |
CurveRidgelineOptions | - |
CurveRidgelineRow | - |
CurveRidgeline | - |
CurveRidgelinePaintOptions | - |
SpreadRiverSeries | - |
SpreadRiverOptions | - |
SpreadRiverPoint | - |
SpreadRiverRow | - |
SpreadRiver | - |
SpreadRiverPaintOptions | - |
BondScreenerEntry | - |
BondScreenerRow | - |
CurveSnapshotInput | - |
CurveSnapshotOptions | - |
CurveSnapshotSeries | - |
CurveSnapshot | - |
CurveSnapshotPaintOptions | - |
SpreadPair | - |
SpreadStripInput | - |
SpreadStripRange | - |
SpreadStripOptions | - |
SpreadStripPoint | - |
SpreadStrip | - |
SpreadStripPaintOptions | - |
CurveSurfaceEntry | - |
CurveSurfaceOptions | - |
CurveSurfaceRow | - |
CurveSurface | - |
CurveSurfacePaintOptions | - |
YieldMapEntry | - |
YieldMapOptions | - |
YieldMap | - |
YieldMapIsolinePoint | - |
YieldMapIsoline | - |
YieldMapPaintOptions | - |
Constants (152)
| Symbol | What it does |
|---|---|
COMPASS_DEFAULT_TENORS | Tenor angles of the radar. |
COMPASS_MAX_SERIES | - |
COMPASS_MIN_VERTICES | - |
COMPASS_RING_COUNT | Rings of the polar grid and their tone. |
COMPASS_RING_ALPHA | - |
COMPASS_SPOKE_ALPHA | - |
COMPASS_ACTIVE_FILL_ALPHA | The active ring is the single filled one. |
COMPASS_MUTED_LINE_ALPHA | - |
COMPASS_HERO_WIDTH | - |
COMPASS_MUTED_WIDTH | - |
COMPASS_VERTEX_RADIUS | - |
COMPASS_TENOR_LABEL_MIN_PX | Tenor chips need this much panel width. |
COMPASS_LABEL_GAP_PX | - |
COMPASS_PAD_SHARE | Share of the radius kept free for the tenor chips. |
COUNTRY_REGION_GAP | Vertical gap between regional clusters (S102). |
COUNTRY_REGION_TITLE_MIN_PX | Cluster titles need this much panel width. |
COUNTRY_REGION_FONT_PX | - |
COUNTRY_MIN_ALPHA | Intensity floor and slope of a coloured tile (BOND-VISUALS §2: 0.06 + 0.5 t). |
COUNTRY_INTENSITY_ALPHA | - |
COUNTRY_FLAT_ALPHA | Quiet tile exactly on the neutral centre (text 0.04). |
COUNTRY_VALUE_MIN_PX | A tile shows its value only from this size (BOND-VISUALS §2). |
COUNTRY_VALUE_FONT_PX | - |
COUNTRY_ACTIVE_EDGE | Edge width of the active tile (BOND-VISUALS §2: 2 px accent). |
COUNTRY_DEFAULT_COLUMNS | Defaults of the tile grid. |
COUNTRY_DEFAULT_GAP | - |
COUNTRY_DEFAULT_PADDING | - |
CREDIT_CORRIDOR_ALPHA | Quiet corridor of each series (BOND-VISUALS §2: text 0.10). |
CREDIT_STRESS_ALPHA | Stress zone underlay (BOND-VISUALS §2: down 0.06). |
CREDIT_LINE_WIDTH | Width of the two lines; the glow belongs to HY alone. |
CREDIT_HY_GLOW_BLUR | - |
CREDIT_HY_GLOW_ALPHA | - |
CREDIT_MAX_DOT_RADIUS | Radius of the window-maximum dot. |
CREDIT_MARKER_GAP | Gap between the maximum dot and the bottom of its bp chip. |
CREDIT_PAD_SHARE | Vertical padding of the shared domain, as a share of the bp span. |
DECOMP_REAL_ALPHA_TOP | Gradients of the two stacked parts (BOND-VISUALS §2), top -> bottom. |
DECOMP_REAL_ALPHA_BOTTOM | - |
DECOMP_REAL_ALPHA_FLAT | - |
DECOMP_EXPECTED_ALPHA_TOP | - |
DECOMP_EXPECTED_ALPHA_BOTTOM | - |
DECOMP_EXPECTED_ALPHA_FLAT | - |
DECOMP_EDGE_ALPHA | Light 1 px edge on the top of the stack (BOND-VISUALS §2). |
DECOMP_BAR_WIDTH_SHARE | Bar width as a share of the slot between the samples (clamped 1..18 px). |
DECOMP_BAR_WIDTH_MAX | - |
DECOMP_LABEL_MIN_PX | A share label needs this much block height. |
DECOMP_LABEL_FONT_PX | - |
DECOMP_PAD_SHARE | Vertical padding of the domain, as a share of the value span. |
DECOMP_SHEEN_ALPHA | Diagonal sheen inside the stack (S102, BOND-VISUALS §2). |
DECOMP_SHEEN_ANGLE_DEG | - |
DECOMP_SHEEN_WIDTH_SHARE | - |
FAN_ALPHA_MIN | Muted alpha of the oldest line and of the one just before the hero. |
FAN_ALPHA_MAX | - |
FAN_PAD_SHARE | Vertical padding of the domain, as a share of the curve span. |
FAN_DEFAULT_MAX_LINES | Longest fan kept; the extra history is thinned evenly, the newest stays. |
FAN_HERO_GLOW_BLUR | Hero glow: shadow blur and its share (only when the canvas supports it). |
FAN_HERO_GLOW_ALPHA | - |
MARKET_BUBBLE_RADIUS | Bubble radius of one issue. |
MARKET_FAIR_ALPHA | Alpha of a fair (on-curve) issue. |
MARKET_LINK_ALPHA | Connector of the two selected issues. |
MARKET_CHIP_GAP | Gap between the connector and its bp chip. |
BOND_MORPH_DURATION_MS | Morph duration of the canon, ms. Prefixed: the core ships its own morph. |
BOND_MORPH_RACE_STEP_MS | Step of the race mode: the scene advances the frames by this, ms. |
CHIP_HEIGHT | Chip geometry and tone of the label capsules (BOND-VISUALS §3). |
CHIP_RADIUS | - |
CHIP_BG_ALPHA | - |
CHIP_PAD_X | - |
CHIP_FONT_PX | - |
PRICE_MODE_PAR | Par value the price mode reads against: the canonical clean price 100. |
PULSE_CHIP_GAP | - |
PULSE_CHIP_MIN_W | - |
PULSE_TONE_ALPHA | - |
PULSE_FLAT_ALPHA | - |
PULSE_MAX_CHIPS | - |
PULSE_DELTA_MIN_H | The delta line needs this much chip height. |
PULSE_DELTA_FONT_PX | - |
PULSE_CHIP_HEIGHT_MAX | - |
PV_WATERFALL3D_SHIFTS | Default rate scenarios: -25/0/+25 bp around the base yield. |
PV_WATERFALL3D_LABEL_MIN_WIDTH | Below this pane width the sum/date labels stay off. |
PV_WATERFALL3D_LABEL_MAX | Largest-PV bars of the active scenario that carry a label. |
RIDGE_DEFAULT_MAX_ROWS | Longest history kept; the extra rows are thinned evenly, the newest stays. |
RIDGE_ROW_GAP_SHARE | Share of a slot left as the gap between bands. |
RIDGE_ALPHA_FAR | Alpha of the farthest band and of the one next to the hero. |
RIDGE_ALPHA_NEAR | - |
RIDGE_HERO_WIDTH | - |
RIDGE_MUTED_WIDTH | - |
RIDGE_LABEL_MIN_PX | Labels need this much panel width. |
RIDGE_LABEL_FONT_PX | - |
RIDGE_LABEL_PAD_X | - |
RIVER_MAX_SERIES | - |
RIVER_ROW_GAP_SHARE | Share of a channel left as the gap between channels. |
RIVER_ACTIVE_TOP_ALPHA | Active channel gradient and muted outline. |
RIVER_ACTIVE_BOTTOM_ALPHA | - |
RIVER_MUTED_ALPHA | - |
RIVER_ZERO_ALPHA | - |
RIVER_EXTREME_RADIUS | - |
RIVER_ACTIVE_WIDTH | - |
RIVER_MUTED_WIDTH | - |
RIVER_CHIP_MIN_PX | Bp chips on the extremes need this much panel width. |
RIVER_CHIP_GAP | - |
BOND_SCREENER_COLUMNS | Screener columns of the bonds kit; the host renders and sorts them. |
SNAPSHOT_MUTED_ALPHA_MIN | Muted alpha of the oldest curve and of the one just before the hero. |
SNAPSHOT_MUTED_ALPHA_MAX | - |
SNAPSHOT_PAD_SHARE | Vertical padding of the domain, as a share of the curve span. |
SNAPSHOT_HERO_ALPHA_TOP | Hero underlay gradient (BOND-VISUALS §2): top alpha -> bottom alpha. |
SNAPSHOT_HERO_ALPHA_BOTTOM | - |
SNAPSHOT_HERO_ALPHA_FLAT | Flat fallback of the underlay when gradients are unavailable. |
SNAPSHOT_POINT_RADIUS | Hero marker geometry: dot radius, halo radius and its alpha. |
SNAPSHOT_HALO_RADIUS | - |
SNAPSHOT_HALO_ALPHA | - |
SNAPSHOT_LABEL_GAP_PX | Term label: gap between the point and the bottom of its chip. |
STRIP_BAR_ALPHA_BASE | Base and tip alpha of a bar: the tip of the move carries the accent. |
STRIP_BAR_ALPHA_TIP | - |
STRIP_BAR_ALPHA_FLAT | Flat share of the bar when the canvas cannot paint gradients. |
STRIP_ZONE_ALPHA | Underlay of the inversion zones: everything below the threshold (BOND-VISUALS §2). |
STRIP_RECESSION_ALPHA | Quiet plate of a recession range and its year label. |
STRIP_RECESSION_FONT_PX | - |
STRIP_RECESSION_LABEL_MIN_PX | Narrowest recession range that still earns a year label. |
STRIP_BAR_WIDTH_SHARE | Width of a bar as a share of the slot between the samples (clamped 1..12 px). |
STRIP_MARKER_RADIUS | Radius of the current marker and its halo. |
STRIP_HALO_RADIUS | - |
STRIP_HALO_ALPHA | - |
STRIP_ZERO_ALPHA | Alpha of the zero line. |
STRIP_EXTREME_RADIUS | Dot radius of the extremes. |
STRIP_EXTREME_ALPHA | - |
SPREAD_PAIRS_DEFAULT | The two canonical readings of the Treasury curve. |
STRIP_PAD_SHARE | The value is in the domain share of the padded span, either sign. |
SURFACE_DEFAULT_MAX_ROWS | Longest surface kept; the extra history is thinned evenly, the newest stays. |
SURFACE_SKEW_PX | Depth offsets of one step back, pixels: right and up. |
SURFACE_LIFT_PX | - |
SURFACE_ALPHA_FAR | Muted alpha of the farthest and the nearest (pre-hero) curve. |
SURFACE_ALPHA_NEAR | - |
SURFACE_UNDERLAY_ALPHA | Flat underlay of the front curve (BOND-VISUALS §2: accent 0.04). |
SURFACE_HERO_WIDTH | Width of the front curve and of the muted rows, and the dot radius. |
SURFACE_MUTED_WIDTH | - |
SURFACE_FRONT_DOT_RADIUS | - |
SURFACE_PAD_SHARE | Vertical padding of the domain, as a share of the yield span. |
SURFACE_FOG_ALPHA | Fog of depth: a quiet background wash towards the far edge (S102). |
SURFACE_EDGE_ALPHA | Light edge above the hero line (BOND-VISUALS §2 highlight). |
SURFACE_PLENUM_ALPHA | Isometric mesh of the floor under the rows (S102 plenum). |
SURFACE_YEAR_CHIP_GAP | Inset of a year chip from the frame edge; the chip font. |
SURFACE_YEAR_LABEL_FONT_PX | - |
SURFACE_YEAR_LABEL_MIN_PX | Year chips need this much panel width. |
YIELD_MAP_DEFAULT_COLUMNS | Longest history kept; the extra dates are thinned evenly, the newest stays. |
YIELD_MAP_ROW_COUNT | Tenor grid lines (rows of the heatmap). |
YIELD_MAP_LOW_PCT | Percentile bounds of the colour domain (outliers do not stretch it). |
YIELD_MAP_HIGH_PCT | - |
YIELD_MAP_FLAT_ALPHA | Cell tones: quiet exactly on the centre, 0.06 + 0.5 t away from it. |
YIELD_MAP_MIN_ALPHA | - |
YIELD_MAP_INTENSITY_ALPHA | - |
YIELD_MAP_LEVEL_STEP | Isolines of the level contour: 1 pp step, thin text-toned line. |
YIELD_MAP_ISOLINE_ALPHA | - |
YIELD_MAP_LEVEL_LABEL_MIN_PX | Level chips appear only on panels at least this wide. |
YIELD_MAP_LEVEL_LABEL_GAP | - |
Element API (@unifin/chart-element)
Generated reference of 18 public symbols of @unifin/chart-element, grouped by kind and ordered as in the sources.
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.
