pub enum RustyQLibError {
InvalidInput {
field: String,
reason: String,
},
UnsupportedEngine(String),
CalibrationFailed {
iterations: usize,
residual: f64,
reason: String,
},
NumericalError(String),
ParseError(String),
MissingMarketData {
key: String,
},
}Expand description
The error type returned by all fallible RustyQLib operations.
Variants§
InvalidInput
A user-supplied value is outside its valid domain (negative volatility, maturity in the past, correlation outside [-1, 1], …).
Fields
UnsupportedEngine(String)
The requested engine cannot price the requested product/model combination (e.g. path-dependent payoffs on the binomial engine).
CalibrationFailed
An iterative calibration or root search terminated without meeting its convergence criterion.
Fields
NumericalError(String)
A numerical method broke down on otherwise valid input (singular matrix, bracketing failure, NaN in an intermediate, …).
ParseError(String)
Contract or market data could not be parsed / deserialized.
MissingMarketData
A Market lookup found no datum at
the given key. key is the debug rendering of the typed key, e.g.
Spot("ACME").
Implementations§
Source§impl RustyQLibError
impl RustyQLibError
Sourcepub fn invalid_input(
field: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn invalid_input( field: impl Into<String>, reason: impl Into<String>, ) -> Self
Convenience constructor for RustyQLibError::InvalidInput.
Trait Implementations§
Source§impl Clone for RustyQLibError
impl Clone for RustyQLibError
Source§fn clone(&self) -> RustyQLibError
fn clone(&self) -> RustyQLibError
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 RustyQLibError
impl Debug for RustyQLibError
Source§impl Display for RustyQLibError
impl Display for RustyQLibError
Source§impl Error for RustyQLibError
impl Error for RustyQLibError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()