Enum YieldConvention
pub enum YieldConvention {
Default,
UsStreet,
DeGovt,
UkGilt,
}Expand description
The street convention a market’s quoted yield compounds in, carried as data
rather than hard-coded per market. It selects the compounding basis street
yields quote at (periods per year under periodic compounding); accrual time
stays the bond’s own day-count. YieldConvention::Default is the bond’s
own payment frequency, so a bond carrying no explicit convention quotes as
it always has.
The convention is not itself a quoting rule — it resolves to a
YieldBasis, which is what the yield-space entry points take. A caller
passing an explicit basis has already said everything this would say, so
the convention applies where a basis is derived from the security.
Variants§
Default
The bond’s own payment frequency (today’s behavior).
UsStreet
US Treasury street convention: semiannual periodic compounding.
DeGovt
German government convention: annual periodic compounding.
UkGilt
UK gilt convention: semiannual periodic compounding.
Implementations§
§impl YieldConvention
impl YieldConvention
§impl YieldConvention
impl YieldConvention
pub fn street_periods_per_year(self, bond_frequency: Frequency) -> f64
pub fn street_periods_per_year(self, bond_frequency: Frequency) -> f64
The compounding periods per year street yields quote at, given the
bond’s own payment frequency (the Default basis).
pub fn basis(self, bond_frequency: Frequency) -> YieldBasis
pub fn basis(self, bond_frequency: Frequency) -> YieldBasis
The yield basis this convention quotes on for a bond paying at
bond_frequency.
Every street convention here is periodic; they differ only in how often.
So the basis is street_periods_per_year
under periodic compounding, and that accessor exists to be read from
exactly here.
Trait Implementations§
§impl Clone for YieldConvention
impl Clone for YieldConvention
§fn clone(&self) -> YieldConvention
fn clone(&self) -> YieldConvention
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more