Struct LatticeMoments
pub struct LatticeMoments {
pub price: f64,
pub first: f64,
pub second: f64,
}Expand description
The callable’s clean price and its first two derivatives with respect to a parallel continuous shift of the discounting, from one lattice pass.
The lattice-space sibling of
YieldMoments: every effective
measure is a ratio of these three numbers, so a caller wanting duration,
convexity and DV01 together prices once and reads three.
The price is the clean price per 100 face, matching
clean_price_at_oas and
callable_oas, so the ratios are in the units
the bond is quoted in.
§Not the risk vector’s sum
This is not the sum of the bond’s zero-rate risk ladder, and the two
should not be reconciled. That sum is Σᵢ ∂P/∂paramᵢ · ∂paramᵢ/∂s, and
∂paramᵢ/∂s depends on what the curve family stores — 1 for a zero-rate
pillar, −τᵢ for a log-discount one — so the bare sum is only the parallel
sensitivity under one parameterisation. These moments are taken from a
shift of the discounting itself and are family-independent.
Fields§
§price: f64The clean price per 100 face.
first: f64∂P/∂s for a parallel continuous shift s.
second: f64∂²P/∂s².
Implementations§
§impl LatticeMoments
impl LatticeMoments
pub fn effective_duration(self) -> f64
pub fn effective_duration(self) -> f64
Effective duration: −P′/P.
“Effective” because the exercise decision moves with the shift — the callable’s cashflows are rate-dependent, so this is not its yield duration.
pub fn effective_convexity(self) -> f64
pub fn effective_convexity(self) -> f64
Effective convexity: P″/P. Negative where the call binds, which is
the defining feature of a callable.
pub fn effective_dv01(self) -> f64
pub fn effective_dv01(self) -> f64
Effective DV01 per 100 face: the price change for a one-basis-point parallel shift.
Trait Implementations§
§impl Clone for LatticeMoments
impl Clone for LatticeMoments
§fn clone(&self) -> LatticeMoments
fn clone(&self) -> LatticeMoments
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more