Enum PayoffError
#[non_exhaustive]pub enum PayoffError {
EmptyCollar,
FloorAboveCap {
floor: f64,
cap: f64,
},
EmptyDigital,
NonPositiveGap(f64),
NonFinite,
EmptyRange,
InvertedRange {
lower: f64,
upper: f64,
},
UnanchoredCpiStrike,
DigitalOnCpiNotional,
}Expand description
Why an option on a coupon’s rate is not a payoff.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EmptyCollar
A collar with neither a cap nor a floor.
FloorAboveCap
A collar whose floor is above its cap: no rate lies within it.
EmptyDigital
A digital with neither a call nor a put.
NonPositiveGap(f64)
A call spread that is not a positive width.
NonFinite
A strike, cap, floor or cash rate that is not a finite number.
EmptyRange
A range accrual with neither a lower nor an upper bound.
InvertedRange
A range accrual whose lower bound is above its upper.
UnanchoredCpiStrike
A payoff on a CPI notional with no base date, or one not before the observation: its strikes are annualised zero-coupon rates, and there is no period to annualise them over.
DigitalOnCpiNotional
A digital on a CPI notional: a call spread in annualised strike is not a spread in the index ratio, so only a collar is carried.
Trait Implementations§
§impl Clone for PayoffError
impl Clone for PayoffError
§fn clone(&self) -> PayoffError
fn clone(&self) -> PayoffError
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 PayoffError
§impl Debug for PayoffError
impl Debug for PayoffError
§impl Display for PayoffError
impl Display for PayoffError
§impl Error for PayoffError
impl Error for PayoffError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl PartialEq for PayoffError
impl PartialEq for PayoffError
impl StructuralPartialEq for PayoffError
Auto Trait Implementations§
impl Freeze for PayoffError
impl RefUnwindSafe for PayoffError
impl Send for PayoffError
impl Sync for PayoffError
impl Unpin for PayoffError
impl UnsafeUnpin for PayoffError
impl UnwindSafe for PayoffError
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