Enum PnlError
#[non_exhaustive]pub enum PnlError {
LayoutMismatch(Box<LayoutMismatch>),
Pricing(PricingError),
Risk(RiskError),
Curve(CurveError),
MoveOutsideParameters {
reached: f64,
after: f64,
},
ValuationDateMismatch {
before: NaiveDate,
after: NaiveDate,
},
}Expand description
An attribution that could not be produced.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LayoutMismatch(Box<LayoutMismatch>)
The two markets do not lift to the same input sequence, so their
parameters cannot be compared position by position. Boxed: it names
two inputs, and an error that size on every Result would tax the
happy path.
Pricing(PricingError)
A valuation inside the attribution failed.
Risk(RiskError)
The risk pass failed.
Curve(CurveError)
A directional lift was refused.
MoveOutsideParameters
The ending market’s value is not the starting market’s structure at the ending market’s parameters: the two differ by something no attribution step moves — a curve built another way, or, for the prediction, a scenario’s shock transform, which carries no parameter.
Fields
ValuationDateMismatch
The two markets are valued on different days. A reset attribution publishes prints onto one day’s market; the move from one day’s close to the next re-dates every pillar and is a carry-and-roll step this module does not take.
Trait Implementations§
§impl Error for PnlError
impl Error for PnlError
§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()