Skip to main content

FloatingBondStatic

Struct FloatingBondStatic 

pub struct FloatingBondStatic {
Show 13 fields pub instrument_id: String, pub index: IborIndex, pub quoted_margin: f64, pub gearing: f64, pub fixing_lag: u16, pub face_amount: f64, pub issue: NaiveDate, pub maturity: NaiveDate, pub seniority: Option<Seniority>, pub credit_entity: Option<CreditCurveId>, pub calc_type: Option<u16>, pub coupon_step_days: Option<u16>, pub repo_group: Option<String>,
}
Expand description

The quote-less FpML reference definition of a floating-rate note (FRN).

The fixed BondStatic minus coupon_rate, plus the floating fields: the index, the quoted margin (FpML spread), the gearing (FpML floatingRateMultiplier), and the fixing lag (FpML fixingDateOffset). Its coupon_type is CouponType::Float. Materialised by FloatingRateBond::from_static; resolvable through the Securities.

Fields§

§instrument_id: String

Security identifier (FpML instrumentId, ISIN scheme).

§index: IborIndex

The floating index the coupons reference (carries currency, tenor, day-count, fixing calendar, and fixing lag).

§quoted_margin: f64

Quoted margin over the index (FpML spread, decimal).

§gearing: f64

Gearing / leverage (FpML floatingRateMultiplier); 1 for a vanilla FRN.

§fixing_lag: u16

Fixing lag in business days (FpML fixingDateOffset).

§face_amount: f64

Redeemed par (FpML faceAmount).

§issue: NaiveDate

First accrual date.

§maturity: NaiveDate

Maturity / redemption date.

§seniority: Option<Seniority>

Repayment seniority (FpML creditSeniority), if tagged.

§credit_entity: Option<CreditCurveId>

The issuer’s credit key (see BondStatic::credit_entity).

§calc_type: Option<u16>

The vendor DES calc-type code (see BondStatic::calc_type); resolved fail-loud (including instrument-kind checks) at materialisation.

§coupon_step_days: Option<u16>

Day-based coupon chain (see BondStatic::coupon_step_days).

§repo_group: Option<String>

The financing/repo group (see BondStatic::repo_group).

Implementations§

§

impl FloatingBondStatic

pub fn new( instrument_id: impl Into<String>, index: IborIndex, quoted_margin: f64, face_amount: f64, issue: NaiveDate, maturity: NaiveDate, ) -> Self

Builds a floating-rate BondStatic from its FpML reference fields. gearing defaults to 1 and the fixing lag to the index’s own fixing_lag_days via Self::new; override with the with_* setters.

pub fn currency(&self) -> &str

The currency of the floating bond (the index currency).

pub fn coupon_type(&self) -> CouponType

This is a floating-coupon security (FpML couponType = "Float").

pub fn with_calc_type(self, code: u16) -> Self

Sets the vendor calc-type code (resolved fail-loud, kind-checked, at materialisation).

pub fn with_coupon_step_days(self, days: u16) -> Self

Sets the day-based coupon chain (e.g. 91 for a Turkish 91-day FRN).

pub fn with_gearing(self, gearing: f64) -> Self

Sets the gearing / leverage (FpML floatingRateMultiplier).

pub fn with_fixing_lag(self, lag: u16) -> Self

Sets the fixing lag in business days (FpML fixingDateOffset).

pub fn with_seniority(self, seniority: Seniority) -> Self

Sets the repayment seniority (FpML creditSeniority).

pub fn with_credit_entity(self, credit: CreditCurveId) -> Self

Tags the issuer’s credit key (see BondStatic::with_credit_entity).

pub fn with_repo_group(self, group: impl Into<String>) -> Self

Tags the financing/repo group (see BondStatic::repo_group).

Trait Implementations§

§

impl Clone for FloatingBondStatic

§

fn clone(&self) -> FloatingBondStatic

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

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.