Module discount
Expand description
The piecewise discount curve, and the evaluation trait pricers see.
Structs§
- Piecewise
Discount - 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.
- Piecewise
View PiecewiseDiscountlifted into one pricing mode.- Unknown
Index Error - The detail behind
CurveError::UnknownIndex.
Enums§
- Curve
Error - A curve query that cannot be answered.
Traits§
- Seedable
- A forward mode that can carry a seeded unit tangent.
- Yield
Curve - 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
storedinto modeR, setting a unit tangent atseedif 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, orfallbackwhentaulies 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
referencetodateon ACT/365. - year_
fraction_ 🔒at_ ordinal - Year fraction from a reference ordinal to
ordinalon ACT/365 — the integer form ofyear_fraction, bit-identical to it becausedate.num_days_from_ce() − reference.num_days_from_ce()equals(date − reference).num_days()exactly. - year_
fraction_ under - Year fraction from
referencetodateunderday_count.