Struct BondStatic
pub struct BondStatic {Show 22 fields
pub instrument_id: String,
pub currency: String,
pub coupon_rate: f64,
pub coupon_type: CouponType,
pub day_count: DayCountFraction,
pub payment_frequency: Frequency,
pub face_amount: f64,
pub issue: NaiveDate,
pub maturity: NaiveDate,
pub seniority: Option<Seniority>,
pub call_put_schedule: Vec<Callability>,
pub credit_entity: Option<CreditCurveId>,
pub yield_convention: YieldConvention,
pub ex_div: Option<ExDivRule>,
pub calc_type: Option<u16>,
pub coupon_step_days: Option<u16>,
pub repo_group: Option<String>,
pub ex_div_dates: Option<Vec<(NaiveDate, NaiveDate)>>,
pub settlement_days: u16,
pub schedule_override: Option<Vec<NaiveDate>>,
pub end_of_month: bool,
pub pays_in_kind: bool,
}Expand description
The quote-less FpML reference definition of a fixed-coupon debt security.
Mirrors FpML Bond / FixedIncomeSecurityContent: the economic fields that
define the security, with no market price (the price is the hole, filled by
a BondQuote). Pure reference data — no curve, market, or instrument
dependency — so it lives in statics beside CouponType/Seniority and is
materialised one layer up by FixedRateBond::from_static.
Fields§
§instrument_id: StringSecurity identifier (FpML instrumentId, ISIN scheme).
currency: StringISO 4217 currency.
coupon_rate: f64Annual coupon rate (decimal, FpML couponRate). 0 ⇒ zero-coupon.
coupon_type: CouponTypeCoupon type (FpML couponType).
day_count: DayCountFractionAccrual day-count (FpML dayCountFraction).
payment_frequency: FrequencyCoupon payment frequency (FpML paymentFrequency).
face_amount: f64Redeemed par (FpML faceAmount).
issue: NaiveDateFirst accrual date.
maturity: NaiveDateMaturity / redemption date.
seniority: Option<Seniority>Repayment seniority (FpML creditSeniority), if tagged.
call_put_schedule: Vec<Callability>Embedded call/put schedule (fixed-price European/Bermudan). Empty ⇒ a plain non-callable bond, behaviourally identical to the pre-embedded-option form.
credit_entity: Option<CreditCurveId>The issuer’s credit key into the CreditRegistry (the same namespace CDS
survival curves pin under — a credit-curve identifier). None ⇒
default-free pricing; Some opts the bond into survival-weighted (risky)
valuation against the entity’s pinned curve and recovery.
yield_convention: YieldConventionThe street convention the market’s quoted yield compounds in
(YieldConvention::Default ⇒ today’s behavior).
ex_div: Option<ExDivRule>The ex-dividend rule, when the market trades ex-div (None ⇒ always
cum-dividend — today’s behavior).
calc_type: Option<u16>The vendor DES calc-type code (VendorCalcMethod registry key), when
the security is booked by its market’s convention bundle. Stored raw so
it round-trips even for codes the registry learns later; resolution
happens (fail-loud) at materialisation.
coupon_step_days: Option<u16>Day-based coupon chain: when set, coupon dates step backward from
maturity in exact steps of this many calendar days (Turkish government
bonds pay every 91/182/364 days) instead of calendar months. The
compounding/ICMA frequency stays Self::payment_frequency
(a 182-day chain books as 6M). None ⇒ calendar-month schedule.
repo_group: Option<String>The financing/repo group the security carries in (a free-form key such
as "GC:GBP" or a specialness bucket): the middle tier of the repo
resolution cascade (ISIN → group → currency GC → discount fallback).
None ⇒ resolution skips straight from the ISIN tier to currency GC.
ex_div_dates: Option<Vec<(NaiveDate, NaiveDate)>>Explicit per-period detachment dates (coupon_date, ex_div_date) for
exchange-published irregular ex-div calendars. A listed coupon’s
detachment overrides the Self::ex_div-rule-derived date; unlisted
coupons keep the rule’s. None ⇒ rule-only.
settlement_days: u16MarketContext settlement lag in business days on the bond’s calendar (0 ⇒
same-day settlement — the pre-lag behaviour). Copied to the materialised
bond, so settlement_date(valuation) — and therefore the settlement any
quoted measure is priced at — advances by this lag.
schedule_override: Option<Vec<NaiveDate>>Explicit coupon boundary dates, ascending and spanning issue … maturity
— for bonds whose published schedule no roll rule reproduces (the
South-African R2048 pays on 28 February even in a leap year).
Authoritative when set: it supersedes Self::end_of_month, the
Self::coupon_step_days chain and backward generation from maturity,
and it is not business-day adjusted — the dates are taken exactly as
given. Generate them with hlx.schedule(..) (which adjusts) and patch the
exceptions. None ⇒ the generated schedule.
end_of_month: boolWhether the coupon schedule rolls on the end of the month rather than preserving the maturity’s day-of-month.
Takes effect only when the maturity anchors a month end — the standard
gate on the rule — and is ignored entirely when
Self::schedule_override is set. false ⇒ day-of-month preservation.
pays_in_kind: boolWhether the coupon capitalises into the principal instead of paying
in cash — a payment-in-kind bond. false ⇒ an ordinary cash-paying bond
(today’s behaviour).
The declaration is a plain flag because only a contractual accretion is
bookable: the rate is Self::coupon_rate and the capitalisation dates
are the coupon schedule, so nothing further is needed. A capitalisation
rate driven by a floating index, or elected per period by the issuer, has
no representation here by design — see
Accretion for the closed set of
sources, and the calc_methods module
docs for the refusals and their stated reasons.
Implementations§
§impl BondStatic
impl BondStatic
pub fn new(
instrument_id: impl Into<String>,
currency: impl Into<String>,
coupon_rate: f64,
coupon_type: CouponType,
day_count: DayCountFraction,
payment_frequency: Frequency,
face_amount: f64,
issue: NaiveDate,
maturity: NaiveDate,
) -> Self
pub fn new( instrument_id: impl Into<String>, currency: impl Into<String>, coupon_rate: f64, coupon_type: CouponType, day_count: DayCountFraction, payment_frequency: Frequency, face_amount: f64, issue: NaiveDate, maturity: NaiveDate, ) -> Self
Builds a fixed-coupon BondStatic from its FpML reference fields. Optional
seniority is set via Self::with_seniority.
pub fn with_settlement_days(self, days: u16) -> Self
pub fn with_settlement_days(self, days: u16) -> Self
Sets the market settlement lag (business days on the bond’s calendar).
pub fn with_schedule(self, dates: Vec<NaiveDate>) -> Self
pub fn with_schedule(self, dates: Vec<NaiveDate>) -> Self
States the coupon boundary dates explicitly, superseding every generation
rule. The vector is taken as given and is not business-day adjusted;
see Self::schedule_override.
pub fn with_end_of_month(self, end_of_month: bool) -> Self
pub fn with_end_of_month(self, end_of_month: bool) -> Self
Rolls the coupon schedule on the end of the month. Ignored when
Self::schedule_override is set.
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_ex_div(self, rule: ExDivRule) -> Self
pub fn with_ex_div(self, rule: ExDivRule) -> Self
Sets the ex-dividend rule.
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 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. 182 for a Turkish 182-day bond).
pub fn with_credit_entity(self, credit: CreditCurveId) -> Self
pub fn with_credit_entity(self, credit: CreditCurveId) -> Self
Tags the issuer’s credit key (the survival-curve name), opting the bond into survival-weighted valuation.
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 (the middle tier of the repo cascade).
Trait Implementations§
§impl Clone for BondStatic
impl Clone for BondStatic
§fn clone(&self) -> BondStatic
fn clone(&self) -> BondStatic
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more