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§
- Curve
Pillar - One pillar of the curve, with the zero rate derived for inspection.
- Forward
Segment - One inter-pillar segment and its discrete continuously compounded
forward rate, as reported by
YieldCurve::min_forward. - Yield
Curve - A canonical discount curve anchored at
reference_date.
Enums§
- Compounding
- Convention used to convert between rates and discount factors.
- Curve
Error - Errors from curve construction or queries.
- Curve
Input - 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. - Interpolation
Method - Interpolation scheme between curve pillars.
- Rate
Shift - 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"or0.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.0027and the bump asks for1.0.