Enum YieldKernel
#[non_exhaustive]pub enum YieldKernel {
Discounted(YieldBasis),
Ise,
JapaneseSimple,
}Expand description
The arithmetic a YieldQuoteMethod resolves to.
There are exactly three, and the count is the point. Most of what the market
calls a distinct yield convention is the crate’s single price/yield body at a
different YieldBasis; only two conventions are genuinely something else,
and both are named here rather than hidden inside a fourth basis field.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Discounted(YieldBasis)
The price/yield body at this basis. Serves periodic compounding and
money-market simple interest, and is both arms of Self::Ise.
Ise
The ISE convention (calc 1014): Self::Discounted at the bond’s own
basis before the final coupon period, and at simple interest over
ACT/365 inside it — where exactly one flow remains, so the “closed form”
the market quotes is the body with a single term.
Settlement decides which arm applies, so this cannot be one basis.
JapaneseSimple
The Japanese simple yield: (c·100 + (100 − clean)/n) / clean.
The one true outsider. It is linear in the clean price, discounts nothing, and inverts in closed form both ways — so it never reaches the body and never reaches a solver.
Trait Implementations§
§impl Clone for YieldKernel
impl Clone for YieldKernel
§fn clone(&self) -> YieldKernel
fn clone(&self) -> YieldKernel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more