Enum SabrError
#[non_exhaustive]pub enum SabrError {
Parameter {
name: &'static str,
value: f64,
},
Domain {
forward: f64,
strike: f64,
},
NonPositiveVol {
formula: SabrFormula,
vol: f64,
},
NoAlpha {
atm_vol: f64,
},
}Expand description
SABR inputs the formulas cannot evaluate.
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.
Parameter
A parameter outside the model’s domain.
Domain
A shifted forward or strike at or below zero, which the lognormal and shifted normal expansions take a power or a log of.
NonPositiveVol
The expansion’s correction took the vol to zero or below.
NoAlpha
No positive α reproduces the ATM vol.
Trait Implementations§
impl Copy for SabrError
§impl Error for SabrError
impl Error for SabrError
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 StructuralPartialEq for SabrError
Auto Trait Implementations§
impl Freeze for SabrError
impl RefUnwindSafe for SabrError
impl Send for SabrError
impl Sync for SabrError
impl Unpin for SabrError
impl UnsafeUnpin for SabrError
impl UnwindSafe for SabrError
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