pub enum ValuationContextError {
MissingDiscountCurve(Currency),
MissingForwardCurve(Currency),
MissingVolatilitySurface(String),
MissingFxRate {
from: Currency,
to: Currency,
},
TimeOutsideCurve,
InvalidCurve(&'static str),
Instrument(FinanceError),
Option(OptionError),
InvalidScenario(&'static str),
UnsupportedExercise(OptionStyle),
OutsideSurfaceValidity,
}Expand description
Why a valuation in a ValuationContext could not be produced.
Distinct from crate::contract::ValuationError, which is about a single contract’s own
arithmetic; this one is about the market data a valuation runs on.
Variants§
MissingDiscountCurve(Currency)
No discount curve for this currency. The context does not invent one.
MissingForwardCurve(Currency)
No forward curve for this currency.
MissingVolatilitySurface(String)
No volatility surface for this underlying.
MissingFxRate
No exchange rate connecting these two currencies.
TimeOutsideCurve
A curve was asked for a date before its reference date, or for a non-finite time.
InvalidCurve(&'static str)
The curve’s nodes do not describe a term structure.
Instrument(FinanceError)
The underlying instrument or its schedule is invalid.
Option(OptionError)
The option inputs are invalid.
InvalidScenario(&'static str)
A scenario’s shocks are not usable.
UnsupportedExercise(OptionStyle)
The instrument’s exercise style has no pricing engine in this crate.
OutsideSurfaceValidity
The requested strike or maturity lies further outside the quoted volatility grid than its declared validity allows.
Trait Implementations§
Source§impl Clone for ValuationContextError
impl Clone for ValuationContextError
Source§fn clone(&self) -> ValuationContextError
fn clone(&self) -> ValuationContextError
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 ValuationContextError
impl Debug for ValuationContextError
Source§impl Display for ValuationContextError
impl Display for ValuationContextError
Source§impl Error for ValuationContextError
impl Error for ValuationContextError
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()