Struct IndexSkew
pub struct IndexSkew {
pub segments: Vec<(NaiveDate, f64)>,
pub currency: Currency,
}Expand description
The skew adjustment of an index’s constituents: one piecewise-constant
term structure of hazard multipliers, (pillar, factor) in pillar order,
that every constituent’s curve is scaled by
(ScaledSurvival).
Fields§
§segments: Vec<(NaiveDate, f64)>(pillar, factor): the factor applies from the previous pillar (or
the curve’s reference date) to this one, the last one past it.
currency: CurrencyThe index’s currency — the currency each constituent’s curve is keyed in when the skew is applied to it.
Implementations§
§impl IndexSkew
impl IndexSkew
pub fn adjust(&self, curve: &Survival) -> Result<Survival, CurveError>
pub fn adjust(&self, curve: &Survival) -> Result<Survival, CurveError>
curve scaled by this skew.
§Errors
CurveError::Malformed if a
pillar is not after the curve’s reference date.
pub fn adjusted_market(
&self,
market: &MarketContext,
constituents: &[(ReferenceEntity, f64)],
) -> Result<MarketContext, PricingError>
pub fn adjusted_market( &self, market: &MarketContext, constituents: &[(ReferenceEntity, f64)], ) -> Result<MarketContext, PricingError>
market with every constituent re-pinned under its adjusted curve,
its recovery kept. A re-pinned curve carries no calibration ladder:
its node risk reads the base’s parameters, its par-quote risk is gone.
§Errors
The market’s missing-curve refusal for a constituent it holds no curve
for; a curve error from adjust.