Enum Term
enum Term {
Rate(Arc<Curve>),
RepoSpread {
spread: Arc<Curve>,
over: CurveId,
},
Survival(CreditEntry),
Inflation(Arc<Inflation>),
DiscountRatio {
base: CurveId,
numerator: CurveId,
denominator: CurveId,
},
}Expand description
One term structure as the store holds it: the payload a CurveId maps
to. The identity’s role decides the arm — the four rate roles a rate
curve, Credit a survival curve with its stated recovery, Inflation an
inflation curve — which is what lets the three former stores be one map
in the identity’s one order.
Variants§
Rate(Arc<Curve>)
RepoSpread
A repo spread declared over a base: the spread is this key’s own curve
(its parameters, its risk rows), and over is the key resolution
composes it onto — a discount key, or another repo key.
Survival(CreditEntry)
Inflation(Arc<Inflation>)
DiscountRatio
A discount ratio over three keys, D = D_base · D_numerator / D_denominator, composed at resolution: it owns no parameters, so its
risk lands on the three keys it reads.
Implementations§
§impl Term
impl Term
fn parameter_count(&self) -> usize
fn extend_into(&self, out: &mut Vec<f64>)
fn extend_into(&self, out: &mut Vec<f64>)
Appends the curve’s parameters to out, in parameter_owners order.
fn labels(&self, id: &CurveId) -> Vec<MarketInputId>
fn labels(&self, id: &CurveId) -> Vec<MarketInputId>
The curve’s parameter labels as risk-vector keys under id.
fn adjoint_refusal(&self, id: &CurveId) -> Option<(CurveId, &'static str)>
fn adjoint_refusal(&self, id: &CurveId) -> Option<(CurveId, &'static str)>
Why the curve cannot report correct sensitivities, if it cannot.
fn rate(&self) -> Option<&Arc<Curve>>
fn rate(&self) -> Option<&Arc<Curve>>
The rate curve held — for a repo spread, the spread itself: the curve whose parameters this key owns.
fn repo_base(&self) -> Option<&CurveId>
fn repo_base(&self) -> Option<&CurveId>
The base a repo spread is declared over; None for a whole curve.