#[non_exhaustive]pub enum SolverStatus {
Converged,
NearExpiryIntrinsic,
NonPositivePrice,
BelowIntrinsic,
NoBracketInRange,
NotIdentifiable,
MaxIterations,
InvalidInput,
}Expand description
Why the IV solver returned: the precise outcome behind a (non-)convergence
(see SolverResult).
New variants may be added in future minor versions (the enum is
#[non_exhaustive]); always include a wildcard arm when matching.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Converged
A volatility was found within tolerance. iv is finite and usable.
NearExpiryIntrinsic
Time to expiry was below the near-expiry cutoff; the option should be
priced intrinsically and no implied volatility is solved. iv is
f64::NAN.
NonPositivePrice
The market price was zero or negative; no implied volatility exists.
iv is f64::NAN.
BelowIntrinsic
The market price was below the discounted intrinsic value (the
Black-76 no-arbitrage lower bound). iv is f64::NAN.
NoBracketInRange
No root exists in [iv_min, iv_max]; the price is unattainable for
any volatility in that range. iv is f64::NAN.
NotIdentifiable
Vega is below vega_floor, so the implied volatility is not
numerically identifiable from the price. iv is f64::NAN.
MaxIterations
The solver exhausted its iteration budget without meeting the
volatility-space tolerance. iv is f64::NAN.
InvalidInput
An input (market price, F, K, T, or r) was non-finite, so no
solve was attempted. iv is f64::NAN. Validate untrusted or
exchange-sourced inputs before calling.
Trait Implementations§
Source§impl Clone for SolverStatus
impl Clone for SolverStatus
Source§fn clone(&self) -> SolverStatus
fn clone(&self) -> SolverStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SolverStatus
impl Debug for SolverStatus
Source§impl<'de> Deserialize<'de> for SolverStatus
impl<'de> Deserialize<'de> for SolverStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for SolverStatus
impl Hash for SolverStatus
Source§impl PartialEq for SolverStatus
impl PartialEq for SolverStatus
Source§fn eq(&self, other: &SolverStatus) -> bool
fn eq(&self, other: &SolverStatus) -> bool
self and other values to be equal, and is used by ==.