Fixed income
Bonds, yields, duration and convexity, curves, swaps, caps, swaptions and futures.
Construct bonds with full schedules, price them from yields or curves, and read duration, convexity and key-rate risk. Curves bootstrap from market quotes; swaps, caps, floors, swaptions, short-rate models, credit and inflation products build on them.
Try it live
Common APIs
const
bondsBond constructors (spec §14.1).fnpriceFromYieldDirty/clean price and accrued interest for a bond at a given yield.fnyieldMetricsFull set of yield-based risk metrics at a given yield (actuarial convention).fnyieldToMaturitySolve the yield to maturity that reprices a bond to the observed price (Brent on [−0.99·f, 1]).constcurvesCurve constructors (spec §14.2).fncurveMetricsPrice a bond against a discount curve and report effective/key-rate risk from curve shocks.fnswapRatePar swap rate that makes the swap value zero: `floatLegPv / annuity`.fnswaptionPricePrice a European swaption.fncapFloorPricePrice a cap or floor as a strip of Black/Bachelier caplets/floorlets off discount/forecast curves.fnhullWhiteConstruct a Hull-White model `dr = (θ(t) − a·r)dt + σ dW`, with θ implied by `curve`.fncdsParSpreadSee the reference for its full contract.fnbondFutureBond-future basis, carry, implied repo rate, and cheapest-to-deliver across a basket.Complete API reference
Browse all public exports, types, and feature imports below.