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: DayCountFractionImplementations§
§impl<'c> CreditWalk<'c>
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>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more