Skip to main content

CreditIndexTemplate

Struct CreditIndexTemplate 

pub struct CreditIndexTemplate {
    pub family: String,
    pub currency: String,
    pub standard_coupon: f64,
    pub standard_recovery: f64,
    pub cds: CdsTemplate,
    pub anchor: (u32, NaiveDate),
}
Expand description

The conventions of a credit index family (CDX / iTraxx): the underlying homogeneous-pool CDS conventions plus the family’s standard coupon and standard recovery assumption. Booked through the index CDS builders, which take the family, the series and, for a CDO tranche, the attachment points; also constructible directly on the instruments.

Fields§

§family: String

Family name, e.g. "CDX.NA.IG" or "ITRAXX.EUROPE".

§currency: String

Contract currency (ISO 4217).

§standard_coupon: f64

Standard fixed running coupon (decimal; 100bp for investment grade).

§standard_recovery: f64

The family’s standard recovery assumption (market convention).

§cds: CdsTemplate

Underlying CDS schedule conventions.

§anchor: (u32, NaiveDate)

A series the family is known to have rolled, and the nominal date it rolled on — the anchor every other series’ dates count from, six months a series.

Implementations§

§

impl CreditIndexTemplate

pub fn series_roll(&self, series: u32) -> NaiveDate

The nominal date series rolled (or will roll) on: the 20th of March or September, six months a series from the family’s anchor. Trading in a series opens on the first business day on or after it.

pub fn on_the_run(&self, date: NaiveDate) -> u32

The series on the run on date: the latest to have rolled on or before it.

pub fn series_maturity(&self, series: u32, tenor_years: u32) -> NaiveDate

The maturity of series at tenor_years: the standard CDS date three months after its roll and the tenor on — the 20th of June for a March series, of December for a September one. An off-the-run series keeps the maturity it was launched with.

Trait Implementations§

§

impl Clone for CreditIndexTemplate

§

fn clone(&self) -> CreditIndexTemplate

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl From<CreditIndexTemplate> for AnyTemplate

§

fn from(t: CreditIndexTemplate) -> Self

Converts to this type from the input type.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.