Skip to main content

Module discount

Module discount 

Expand description

The piecewise discount curve, and the evaluation trait pricers see.

Structs§

PiecewiseDiscount
A discount curve stored as log discount factors at dated pillars, linear in log-space between them and at the last segment’s forward rate beyond the last.
PiecewiseView
PiecewiseDiscount lifted into one pricing mode.
UnknownIndexError
The detail behind CurveError::UnknownIndex.

Enums§

CurveError
A curve query that cannot be answered.

Traits§

Seedable
A forward mode that can carry a seeded unit tangent.
YieldCurve
What a pricer sees. Four methods, one mode, no AD vocabulary.

Functions§

date_of_ordinal 🔒
The date at a proleptic-Gregorian day number, for the trait’s default ordinal entries. An ordinal outside chrono’s range maps to NaiveDate::MIN, which every curve then reports as a pre-reference query.
lift_seeded 🔒
Lift stored into mode R, setting a unit tangent at seed if one is given and leaving every other parameter at a zero tangent.
locate_segment 🔒
The index of the first pillar year fraction at or past tau, or fallback when tau lies beyond the last pillar — the segment locate every piecewise family shares.
require_finite 🔒
Rejects a quote that is NaN or infinite, before any bound is checked.
take_params 🔒
One step of a substituted walk over a composition’s parameters.
take_seed 🔒
One step of a seeded walk over a composition’s parameters.
year_fraction
Year fraction from reference to date on ACT/365.
year_fraction_at_ordinal 🔒
Year fraction from a reference ordinal to ordinal on ACT/365 — the integer form of year_fraction, bit-identical to it because date.num_days_from_ce() − reference.num_days_from_ce() equals (date − reference).num_days() exactly.
year_fraction_under
Year fraction from reference to date under day_count.