Skip to main content

PaymentInKindBond

Struct PaymentInKindBond 

pub struct PaymentInKindBond {
    pub bond: FixedRateBond,
    pub accretion: Accretion,
    pub collateral: CollateralSpec,
    pub security_spread: Option<String>,
}
Expand description

A fixed-rate payment-in-kind bond.

Fields§

§bond: FixedRateBond

The par bullet: its coupon is the capitalisation rate, its schedule the capitalisation dates, its face the par face. It pays nothing in cash; it states the terms.

§accretion: Accretion

The accretion rule the par flows scale by.

§collateral: CollateralSpec

The discounting key.

§security_spread: Option<String>

A security-spread key composed onto the discounting.

Implementations§

§

impl PaymentInKindBond

pub fn new( currency: Currency, issue: NaiveDate, maturity: NaiveDate, rate: f64, frequency: Frequency, day_count: DayCountFraction, face: f64, ) -> Result<Self, PikError>

A PIK capitalising rate at frequency from issue to maturity on face of par, collateralised in its own currency.

§Errors

PikError::NonPositiveRate for a rate that is not finite and strictly positive; PikError::Bond if the bullet cannot be built.

pub fn spread_by(self, key: impl Into<String>) -> Self

Composes the security spread under key onto the discounting.

pub fn with_accrual_adjustment( self, calendar: Arc<dyn Calendar>, convention: BusinessDayConvention, ) -> Self

This bond capitalising over boundaries rolled on calendar under convention, as FixedRateBond::with_accrual_adjustment rolls them. The contractual accretion is rebuilt on the rolled periods.

pub fn with_settlement_lag(self, days: i32, calendar: Arc<dyn Calendar>) -> Self

This bond settling days business days on calendar after it trades, by forwarding to its par bullet’s with_settlement_lag.

pub fn settlement_date(&self, trade_date: NaiveDate) -> NaiveDate

The date a trade on trade_date settles on: the settlement lag walked from it, never before issue.

pub fn schedule(&self) -> &[NaiveDate]

The capitalisation boundary dates, issue first.

pub fn capitalisations(&self) -> Vec<Capitalisation>

Every capitalisation on the bond’s life, growing the par face.

pub fn accretion_factor(&self, date: NaiveDate) -> f64

The accretion factor at date — current_face / par face, and the conversion factor between the two quote bases.

pub fn current_face(&self, date: NaiveDate) -> f64

The accreted face at date. A face, not a trade notional: reaching for it as one reintroduces the per-100 ambiguity the ratio avoids.

pub fn redemption_per_100(&self) -> f64

The single cash flow per 100 of par face: the accreted redemption at maturity.

pub fn to_par_basis(&self, on_accreted_face: f64, settlement: NaiveDate) -> f64

Converts a quantity per 100 accreted face to per 100 par face at settlement.

pub fn to_accreted_basis(&self, on_par_face: f64, settlement: NaiveDate) -> f64

Converts a quantity per 100 par face to per 100 accreted face at settlement.

pub fn accrued_on_accreted_face(&self, settlement: NaiveDate) -> f64

Accrued per 100 of accreted face: the interest capitalising in the current period. Between capitalisations the face is constant, so on its own basis this is the plain coupon accrual.

pub fn accrued_on_par_face(&self, settlement: NaiveDate) -> f64

Accrued per 100 of par face — the accreted basis grown by the accretion in force.

fn time_to_maturity(&self, settlement: NaiveDate) -> f64

The year fraction from settlement to maturity on the bond’s basis.

pub fn dirty_price_on_par_face( &self, y: f64, settlement: NaiveDate, basis: YieldBasis, ) -> f64

Dirty price per 100 of par face at yield y: the accreted redemption discounted at y under compounding.

pub fn dirty_price_on_accreted_face( &self, y: f64, settlement: NaiveDate, basis: YieldBasis, ) -> f64

Dirty price per 100 of accreted face — the market convention.

pub fn clean_price_on_par_face( &self, y: f64, settlement: NaiveDate, basis: YieldBasis, ) -> f64

Clean price per 100 of par face — dirty less accrued on the same basis.

pub fn clean_price_on_accreted_face( &self, y: f64, settlement: NaiveDate, basis: YieldBasis, ) -> f64

Clean price per 100 of accreted face.

pub fn yield_from_par_face( &self, dirty: f64, settlement: NaiveDate, basis: YieldBasis, ) -> f64

The yield repricing a dirty price per 100 of par face — exact, since the bond is one flow: the discount factor is inverted in closed form. Zero at or past maturity.

pub fn yield_from_accreted_face( &self, dirty: f64, settlement: NaiveDate, basis: YieldBasis, ) -> f64

The yield repricing a dirty price per 100 of accreted face.

Trait Implementations§

§

impl Clone for PaymentInKindBond

§

fn clone(&self) -> PaymentInKindBond

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 Debug for PaymentInKindBond

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl PartialEq for PaymentInKindBond

§

fn eq(&self, other: &PaymentInKindBond) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<R: Scalar> Priceable<R> for PaymentInKindBond

§

fn npv(&self, view: &PricingView<'_, R>) -> Result<R, PricingError>

The one cash event: the accreted redemption at maturity, discounted on the collateral curve (with any composed security spread). The accretion factor is contract data and enters as a constant.

§

fn par_rate(&self, _view: &PricingView<'_, R>) -> Result<R, PricingError>

The par rate — the fixed rate at which the product is worth nothing. Read more
§

fn par_spread(&self, _view: &PricingView<'_, R>) -> Result<R, PricingError>

The par (breakeven) floating-leg spread. Zero for a product with no floating leg. Read more
§

impl PricingRiskFactors for PaymentInKindBond

§

fn risk_factors(&self) -> Result<RiskFactors<'_>, PricingError>

The market data this product is priced against. Read more
§

impl Product for PaymentInKindBond

§

fn currency(&self) -> Currency

The currency the product pays in. An FX product values in its quote currency; a book converts.
§

fn contract_dates(&self) -> Vec<(&'static str, NaiveDate)>

The contract dates the product resolved to, as (name, date) pairs — exactly the dates its stated constructor takes, so a product built through a derived form can be read back and rebuilt through the stated one. Empty for a product with no stated form. No default: every product states which it is — see AnyInstrument::contract_dates.
§

fn legs(&self) -> Option<Vec<&Leg>>

The legs the product itself holds, in a declared order, or None for a product that holds none — see AnyInstrument::legs. No default: every product states which it is.
§

fn final_payment_date(&self) -> Option<NaiveDate>

The date of the product’s final payment, where a calibration rung can be built on it; None for a product no ladder is built from.
§

fn restruck_at_rate(&self, _rate: f64) -> Option<AnyInstrument>

This product re-struck at the par rate rate — the scalar a par calibration rung on it is quoted in — or None for a product that carries no such scalar. What a quote scenario moves a rung to.
§

fn restruck_at_spread(&self, _spread: f64) -> Option<AnyInstrument>

This product re-struck at the basis spread spread on its spread leg, or None for a product that quotes none.
§

impl StructuralPartialEq for PaymentInKindBond

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.