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: StringSecurity identifier (FpML instrumentId, ISIN scheme).
index: IborIndexThe floating index the coupons reference (carries currency, tenor, day-count, fixing calendar, and fixing lag).
quoted_margin: f64Quoted margin over the index (FpML spread, decimal).
gearing: f64Gearing / leverage (FpML floatingRateMultiplier); 1 for a vanilla FRN.
fixing_lag: u16Fixing lag in business days (FpML fixingDateOffset).
face_amount: f64Redeemed par (FpML faceAmount).
issue: NaiveDateFirst accrual date.
maturity: NaiveDateMaturity / 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
impl FloatingBondStatic
pub fn new(
instrument_id: impl Into<String>,
index: IborIndex,
quoted_margin: f64,
face_amount: f64,
issue: NaiveDate,
maturity: NaiveDate,
) -> Self
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 coupon_type(&self) -> CouponType
pub fn coupon_type(&self) -> CouponType
This is a floating-coupon security (FpML couponType = "Float").
pub fn with_calc_type(self, code: u16) -> Self
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
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
pub fn with_gearing(self, gearing: f64) -> Self
Sets the gearing / leverage (FpML floatingRateMultiplier).
pub fn with_fixing_lag(self, lag: u16) -> Self
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
pub fn with_seniority(self, seniority: Seniority) -> Self
Sets the repayment seniority (FpML creditSeniority).
pub fn with_credit_entity(self, credit: CreditCurveId) -> Self
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
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
impl Clone for FloatingBondStatic
§fn clone(&self) -> FloatingBondStatic
fn clone(&self) -> FloatingBondStatic
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more