Skip to main content

CdsResults

Struct CdsResults 

Source
pub struct CdsResults {
    pub instrument: InstrumentResults,
    pub fair_spread: Option<Rate>,
    pub fair_upfront: Option<Rate>,
    pub coupon_leg_bps: Option<Real>,
    pub coupon_leg_npv: Option<Real>,
    pub default_leg_npv: Option<Real>,
    pub upfront_bps: Option<Real>,
    pub upfront_npv: Option<Real>,
    pub accrual_rebate_npv: Option<Real>,
}
Expand description

Results returned by a credit-default-swap pricing engine (the C++ CreditDefaultSwap::results, creditdefaultswap.hpp:331-342).

A result the engine did not provide is None, the C++ Null<Real> / Null<Rate> sentinel reset restores; the matching accessor on the instrument then reports it as not available.

Fields§

§instrument: InstrumentResults

The instrument-level results (NPV and the rest).

§fair_spread: Option<Rate>

The spread that prices the contract at zero.

§fair_upfront: Option<Rate>

The upfront that prices the contract at zero.

§coupon_leg_bps: Option<Real>

The premium leg’s sensitivity to a one-basis-point spread move.

§coupon_leg_npv: Option<Real>

The premium leg’s NPV.

§default_leg_npv: Option<Real>

The protection leg’s NPV.

§upfront_bps: Option<Real>

The upfront payment’s sensitivity to a one-basis-point upfront move.

§upfront_npv: Option<Real>

The upfront payment’s NPV.

§accrual_rebate_npv: Option<Real>

The accrual rebate’s NPV.

Trait Implementations§

Source§

impl Default for CdsResults

Source§

fn default() -> CdsResults

Returns the “default value” for a type. Read more
Source§

impl Results for CdsResults

Source§

fn reset(&mut self)

Clears the results ahead of a calculation.
Source§

fn as_instrument_results(&self) -> Option<&InstrumentResults>

The instrument-level slice of the bundle, when the bundle carries one. Read more

Auto Trait Implementations§

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.