Skip to main content

CreditWalk

Struct CreditWalk 

struct CreditWalk<'c> {
    boundaries: &'c [NaiveDate],
    effective: NaiveDate,
    day_count: DayCountFraction,
}
Expand description

The premium schedule and protection start of a standard credit contract, walked as the contract runs: periods ending on or before the protection start are skipped (the first accrual still starts at the prior IMM date), protection is discounted at each period’s midpoint and premium at its payment date, both clamped to the valuation.

Fields§

§boundaries: &'c [NaiveDate]§effective: NaiveDate§day_count: DayCountFraction

Implementations§

§

impl<'c> CreditWalk<'c>

fn of(cds: &'c CreditDefaultSwap) -> Self

fn legs<R: Scalar>( &self, view: &PricingView<'_, R>, state: impl Fn(NaiveDate) -> Result<R, PricingError>, outstanding: impl Fn(R, R) -> R, increment: impl Fn(R, R) -> R, ) -> Result<(R, R), PricingError>

(premium annuity, protection) for a trigger function state(date) — the expected tranche loss or the basket’s trigger survival — with the premium accruing on outstanding(state_prev, state_i) and the protection on increment(state_prev, state_i).

Auto Trait Implementations§

§

impl<'c> Freeze for CreditWalk<'c>

§

impl<'c> RefUnwindSafe for CreditWalk<'c>

§

impl<'c> Send for CreditWalk<'c>

§

impl<'c> Sync for CreditWalk<'c>

§

impl<'c> Unpin for CreditWalk<'c>

§

impl<'c> UnsafeUnpin for CreditWalk<'c>

§

impl<'c> UnwindSafe for CreditWalk<'c>

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.