Enum AccrualCompounding
pub enum AccrualCompounding {
Simple,
Compounded,
Continuous,
}Expand description
How sub-period (or whole-life) accrual is composed into a single rate.
Distinct from Compounding, which is a rate quotation convention (how a
quoted rate converts to a discount factor). This one composes realised
accrual within a coupon; the two overlap in variant spelling (Simple,
Continuous) but are never interchangeable.
Filed here rather than with the cashflow types that consume it: it is a convention — declared reference data, resolved at runtime — and instrument templates need it, which would otherwise make the reference-data layer depend on the cashflow layer above it.
Variants§
Simple
Σ rᵢ·τᵢ — linear accrual. The default.
Compounded
Π(1 + rᵢ·τᵢ) − 1 — geometric (overnight-style) accrual.
Continuous
exp(Σ rᵢ·τᵢ) − 1 — continuous accrual.
Implementations§
§impl AccrualCompounding
impl AccrualCompounding
Trait Implementations§
§impl Clone for AccrualCompounding
impl Clone for AccrualCompounding
§fn clone(&self) -> AccrualCompounding
fn clone(&self) -> AccrualCompounding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AccrualCompounding
§impl Debug for AccrualCompounding
impl Debug for AccrualCompounding
§impl Default for AccrualCompounding
impl Default for AccrualCompounding
§fn default() -> AccrualCompounding
fn default() -> AccrualCompounding
Returns the “default value” for a type. Read more
impl Eq for AccrualCompounding
§impl FromStr for AccrualCompounding
impl FromStr for AccrualCompounding
§impl PartialEq for AccrualCompounding
impl PartialEq for AccrualCompounding
§fn eq(&self, other: &AccrualCompounding) -> bool
fn eq(&self, other: &AccrualCompounding) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AccrualCompounding
Auto Trait Implementations§
impl Freeze for AccrualCompounding
impl RefUnwindSafe for AccrualCompounding
impl Send for AccrualCompounding
impl Sync for AccrualCompounding
impl Unpin for AccrualCompounding
impl UnsafeUnpin for AccrualCompounding
impl UnwindSafe for AccrualCompounding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more