Module family
Expand description
The closed curve-family set, and its per-mode view.
A generic view::<R>() cannot live on a trait object โ a generic method is
not object-safe โ so the families are enumerated. The set is closed in
practice anyway: every implementor is in-crate, and the Python surface cannot
expose a foreign Rust implementation.
Closing it buys three things beyond the lift: Clone, Debug and
PartialEq derive, which is what retires the hand-written boxed-clone
implementations; composed families become ordinary recursive values; and a
new family is a variant the compiler makes you handle everywhere.
The set divides three ways. A leaf owns its parameters and answers on its own โ every spread is one, because a spread is calibrated, quoted and risked as a curve in its own right. A transform has no meaning without something to transform, so it carries its base. A binary family reads a base together with market data of its own. A spread is composed onto a curve only at resolution, so no stored family is the product of two curves.
Macrosยง
- dispatch ๐
- Dispatch one
YieldCurvemethod across every variant.
Enumsยง
- Curve
- A stored discount curve. Passive parameters, no AD state.
- Curve
View - A
Curvelifted into one pricing mode. - Parameter
Label - What one free parameter of a curve is, for risk labelling.
Traitsยง
- Family
- The parameter discipline every closed family set shares.
- Lift
- The mode lift every closed family set provides: a view type per mode, and the three ways of producing one.
Functionsยง
- dated ๐
- Every date in
datesas an ordinary pillar.