Enum Input
enum Input<'a> {
Term(&'a CurveId, &'a Term),
Fixings(&'a FixingStore),
Fx(&'a FxRates),
Vol(&'a VolSurfaceId, &'a VolSurface),
Recovery(&'a CreditCurveId, f64),
Mark(&'a MarkId, &'a Mark),
}Expand description
One stored input as the lift reads it, with the key it is stored under.
Self-describing: it names its own InputId, labels its own parameters and
reports its own refusal, so no walk pairs a span with a store it must look
the input back up in. A closed enum rather than a trait object because the
kinds are fixed and three of them are not curves — a shared trait would hand
a fixing store a method about adjoint refusals it has no use for.
Variants§
Term(&'a CurveId, &'a Term)
One term structure, by identity.
Fixings(&'a FixingStore)
Fx(&'a FxRates)
Vol(&'a VolSurfaceId, &'a VolSurface)
One vol surface, by identity: one parameter per node.
Recovery(&'a CreditCurveId, f64)
One entity’s market recovery, by entity: walked after every curve and surface so pinning one moves no earlier offset.
Mark(&'a MarkId, &'a Mark)
One model mark, by identity: walked last, so pinning one moves no other input.
Implementations§
§impl Input<'_>
impl Input<'_>
fn contents(&self) -> Vec<(&'static str, String)>
fn contents(&self) -> Vec<(&'static str, String)>
This input’s stored identifiers as (kind, key) rows, in store order.
The kind names the builder verb that fills the store, so a row reads as the call that would put it back. A store holding several things yields several rows — one fixing observation, one FX quote, one watched label each — because each is separately addressable; a store holding nothing yields none.
fn parameter_count(&self) -> usize
fn parameter_count(&self) -> usize
How many free parameters this input contributes.
fn extend_into(&self, out: &mut Vec<f64>)
fn extend_into(&self, out: &mut Vec<f64>)
Appends this input’s parameters to out, in the order its view consumes
them. A composed curve flattens through for_each_owner, in
parameter_owners order — the order view_with consumes — so a market
of leaves fills one vector rather than one per curve.
fn labels(&self) -> Vec<MarketInputId>
fn labels(&self) -> Vec<MarketInputId>
The identifier of each parameter this input contributes, in the same
order extend_into lays them down.
fn adjoint_refusal(&self) -> Option<(CurveId, &'static str)>
fn adjoint_refusal(&self) -> Option<(CurveId, &'static str)>
Why this input cannot report correct sensitivities, with the curve to name, if it cannot. Only a curve can refuse.