Enum Measure
#[non_exhaustive]pub enum Measure {
Npv,
Delta {
axis: RiskAxis,
basis: Basis,
aggregation: Aggregation,
scale: Option<Scale>,
},
Bumped(BumpedKind),
}Expand description
A quantity a report asks for. Names a number; says nothing about how it is computed, which is what keeps it mode-free.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Npv
Present value.
Delta
A first-order sensitivity on one risk axis, read against a basis, collapsed by an aggregation, and reported in a scale.
The variant carries the sensitivity’s order; the axis carries what it
is a sensitivity to, the basis carries whose quote it is expressed
against, the aggregation carries how many rows it comes back as, and the
scale carries the unit each row is in. A vega is therefore a Delta on
a vol axis rather than a variant of its own, and a par DV01 is a Delta
at Basis::Par rather than a measure of its own.
Fields
aggregation: AggregationHow it is collapsed for reporting.
Bumped(BumpedKind)
A sensitivity no single risk pass produces. Named so that the catalogue
lists it beside its risk-pass sibling; report refuses it, naming the
method that computes it.
Implementations§
§impl Measure
impl Measure
pub fn sensitivity(
axis: RiskAxis,
basis: Basis,
aggregation: Aggregation,
scale: Option<Scale>,
) -> Self
pub fn sensitivity( axis: RiskAxis, basis: Basis, aggregation: Aggregation, scale: Option<Scale>, ) -> Self
A first-order sensitivity with every part stated: what the grammar
spells delta:<axis>:<basis>:<aggregation>[:<scale>].
pub fn per_basis_point(self) -> Self
pub fn per_basis_point(self) -> Self
This measure read per basis point: the same rows, each × 1e-4.
pub fn delta(axis: RiskAxis) -> Self
pub fn delta(axis: RiskAxis) -> Self
The axis’s exposure at the curve-node basis, as one number — the reading
a bare delta:<axis> names, and the one every earlier caller wrote.
pub fn par_ladder(axis: RiskAxis) -> Self
pub fn par_ladder(axis: RiskAxis) -> Self
The axis’s exposure attributed to the instruments that calibrated it — one row per rung of each contributing curve’s ladder.
pub fn at(self, scale: Scale) -> Self
pub fn at(self, scale: Scale) -> Self
This measure reported in scale. A value and a bumped measure carry no
scale and are returned as they are.
pub fn unscaled(self) -> Self
pub fn unscaled(self) -> Self
This measure with no stated scale — the point in measure space, which is what names it.
Trait Implementations§
impl Copy for Measure
§impl Display for Measure
The one spelling of a measure: npv, delta:<axis> in the axis’s own
spelling with its basis, aggregation and stated scale, or a bumped measure’s
catalogue name — what a caller writes.
impl Display for Measure
The one spelling of a measure: npv, delta:<axis> in the axis’s own
spelling with its basis, aggregation and stated scale, or a bumped measure’s
catalogue name — what a caller writes.