Skip to main content

Module curves

Module curves 

Source
Expand description

Yield / discount curve infrastructure shared by all asset classes.

Design invariant: discount factors are state, rates are views. A YieldCurve stores only pillar times and raw discount factors; zero and forward rates are derived on demand. The Compounding and DayCountConvention fields are conventions — they control how rates are converted in (at construction) and out (rate queries), never what df(t) returns.

Structs§

CurvePillar
One pillar of the curve, with the zero rate derived for inspection.
ForwardSegment
One inter-pillar segment and its discrete continuously compounded forward rate, as reported by YieldCurve::min_forward.
YieldCurve
A canonical discount curve anchored at reference_date.

Enums§

Compounding
Convention used to convert between rates and discount factors.
CurveError
Errors from curve construction or queries.
CurveInput
The accepted input forms for a curve. This is what deserializes from JSON; every form is canonicalized to discount factors at construction (YieldCurve::from_input), so pricing code sees a single representation.
InterpolationMethod
Interpolation scheme between curve pillars.
RateShift
A shift applied to a curve by YieldCurve::bumped. Shifts act on the continuously compounded zero rates (the curve’s discount factors are re-derived exactly), independent of the curve’s quoting convention.
Tenor
A curve pillar location: either an absolute date or a year fraction relative to the curve’s reference date (e.g. "2027-07-16" or 0.25).

Constants§

KEY_RATE_TENOR_TOLERANCE
A bump tenor within this distance (in years, ~3.7 days) of an existing pillar reuses that pillar; farther away, a new pillar is inserted. Prevents needle-thin tents when date-built pillars sit at times like 1.0027 and the bump asks for 1.0.