Skip to main content

CreditLadder

Struct CreditLadder 

struct CreditLadder<'a> {
    reference: NaiveDate,
    discount: &'a Curve,
    rungs: &'a [Rung],
    recovery: Option<f64>,
    fixings: &'a FixingStore,
    fx: &'a FxRates,
    tolerance: Tolerance,
    day_count: DayCountFraction,
}
Expand description

What a credit ladder was solved against — the part of its inputs its read back needs, whichever family it solved.

Fields§

§reference: NaiveDate§discount: &'a Curve§rungs: &'a [Rung]§recovery: Option<f64>§fixings: &'a FixingStore§fx: &'a FxRates§tolerance: Tolerance§day_count: DayCountFraction

Implementations§

§

impl CreditLadder<'_>

fn solve_pillars( &self, build: impl Fn(&[f64]) -> Result<Survival, CalibrationError>, ) -> Result<(Vec<f64>, Vec<PillarSolve>), CalibrationError>

The pillars solved one by one, each from the one before, on the curve build makes of the per-pillar parameters — the hazard or the density ladder, one body. A contract pillared on its maturity reads almost nothing past it, so one pass nearly solves the ladder; but a weekend maturity’s last coupon is observed the day before its Monday payment, a day into the next segment, so solving that segment moves the rung behind it. The pass therefore sweeps again, each pillar from its solved value, until a sweep takes no step — or max_sweeps is spent.

fn read_back( &self, storage: &Survival, params: &[f64], family: SurvivalFamily, ) -> Result<(Provenance, Arc<SurvivalRefit>), CalibrationError>

The solved curve’s ladder and refit: every rung read back and differentiated at the solution over params, checked as a rate ladder is, and inverted into parameter per unit quote.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for CreditLadder<'a>

§

impl<'a> !UnwindSafe for CreditLadder<'a>

§

impl<'a> Freeze for CreditLadder<'a>

§

impl<'a> Send for CreditLadder<'a>

§

impl<'a> Sync for CreditLadder<'a>

§

impl<'a> Unpin for CreditLadder<'a>

§

impl<'a> UnsafeUnpin for CreditLadder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.