Chartsv26.10.18
API reference

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.

Generated from the package entry packages/chart-kit-swaps/src/index.ts. Names are reachable through @unifin/chart-kit-swaps; use your editor for full signatures - this page carries the map.

Functions (24)

SymbolWhat it does
swapPeriodsAccrual periods from the start date; a negative tenor or step gives no periods.
sideOfSide factor of the holder: the payer of the fixed leg sees the fixed amounts negative.
swapScheduleFull schedule of both legs. The floating leg needs the projected rate of every period: the caller passes a reader (rateOf), and without one the floating leg is built with a zero rate so the schedule still describes its shape.
netFlowsNet flows of the swap by payment date. The two legs of a plain vanilla swap share their dates, and the reader wants the net - the two gross rows stay in the result so a report can still show them.
flowsTotalTotal of one leg or of the net, ignoring non-finite amounts.
flatCurveFlat curve of one continuous zero rate, valid for every horizon.
zeroCurveCurve from quoted points: sorted by horizon, non-finite points dropped.
zeroRateAtContinuous zero rate at a horizon: linear between the quoted points and flat outside them, which is what a panel of a swap book shows before bootstrapping.
discountFactorDiscount factor of a horizon: the exponential of the zero rate.
flowYearsYears between the valuation date and a payment date.
forwardRateForward rate of one accrual period implied by the curve (single-curve bootstrapping identity): the ratio of the two discount factors over the accrual. It is NaN when the accrual is not positive.
presentValuePresent value of one leg at the valuation date.
swapNpvNet present value of a swap: both legs discounted and their net.
cumulativePvCumulative present value of the net flows, one point per payment date: the curve a reader follows to see when the swap has paid for itself.
annuityFactorPresent value of a fixed annuity of one unit of notional (the denominator of a par rate).
parSwapRatePar swap rate: the fixed rate that makes the two legs equal at the valuation date. The floating leg is rebuilt from the curve, so the answer does not depend on the fixed rate of the terms.
swapScheduleOfSchedule of a swap whose floating leg is projected from the curve.
swapNpvFromCurveNet present value of a swap whose floating leg is projected from the curve.
legPointsLadder points of one leg: the horizon of the payment against its amount.
netPointsNet points of the payment dates: what the holder actually pays or receives.
cumulativePvPointsPoints of the cumulative PV curve of the swap.
paintSwapLadderBars of the two legs from the zero line; a negative bar is a payment.
paintNetArrowsMarks of the net flows: the amount of every payment date on the palette of the chart, labelled by the caller, because a net figure without its date is useless. An activeIndex overpaints one date - the busiest one of the panel.
paintCumulativePvCumulative PV as a curve with the points that build it and the S105 ribbon.

Types (11)

SymbolWhat it does
SwapDirectionWhich side of the swap the holder is on.
SwapTermsTerms of a plain vanilla swap: one notional, two legs, one frequency.
SwapLeg-
SwapFlowOne accrual period of one leg, with the amount that falls on its payment date.
SwapPeriodOne accrual period of the swap without a side.
SwapSchedule-
NetFlowNet amount on one payment date: the sum of both legs falling on it.
ZeroPointOne point of a discount curve: continuous zero rate at a horizon in years.
DiscountCurveA curve of continuous zero rates; one point makes it flat.
SwapNpv-
CumulativePvPointOne point of the cumulative PV curve: years from the valuation date and the total.

On this page