Enum CashflowError
#[non_exhaustive]pub enum CashflowError {
Show 13 variants
Curve(CurveError),
MarketData(MarketDataError),
MissingContractRate,
NoCurveForIndex {
index: String,
},
InterpolatedStubOnOneCurve {
tenors: Box<(String, String)>,
},
PayoffWithoutCapVols {
currency: Currency,
},
PayoffWithoutYoyVols {
index: String,
},
PayoffWithoutCpiVols {
index: String,
},
PayoffNotLognormal,
NoIndexForCoupon {
index: String,
},
MalformedPayoff(PayoffError),
CmsWithoutSwaptionVols {
currency: Currency,
},
CmsRefused {
detail: String,
},
}Expand description
A cashflow that cannot be produced or valued.
Two sources, kept apart: a curve that could not answer a query, and market data that was never supplied. A missing historical reset is the second, and conflating it with the first would make it look like an extrapolation problem.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Curve(CurveError)
A curve could not answer a query.
MarketData(MarketDataError)
A market-data lookup could not be answered.
MissingContractRate
A leg accruing one contract rate over its period holds a coupon that carries no such rate — a floating coupon on a fixed zero leg.
NoCurveForIndex
An unfixed floating coupon must project, and the curves it was priced against hold none for its index. Named so a leg on two indices says which one it lacked.
InterpolatedStubOnOneCurve
A stub electing ISDA 2006 §8.3 Linear Interpolation reads two tenors’ curves, and it was valued through one. Refused rather than blending one curve with itself.
Fields
PayoffWithoutCapVols
A coupon still to fix with an option on its rate — a cap, a floor, a digital — is worth its optionlets, and the source it was valued through holds no cap vols for its currency.
PayoffWithoutYoyVols
A year-on-year inflation coupon still to fix with an option on its rate is worth its YoY optionlets, and the source it was valued through holds no YoY vols for its price index.
PayoffWithoutCpiVols
A CPI notional still to fix with an option on its growth is worth its zero-coupon optionlets, and the source it was valued through holds no zero-coupon CPI vols for its price index.
PayoffNotLognormal
A coupon’s option could not be valued: a lognormal surface met a non-positive forward or strike.
NoIndexForCoupon
A CPI coupon reads a price index, and the source it was valued through holds neither a print nor a curve for it.
MalformedPayoff(PayoffError)
A coupon’s option on its rate is not a payoff — built around its checked constructor with a floor above its cap, say.
CmsWithoutSwaptionVols
A CMS coupon still to fix is worth its replication off the swaption smile, and the source it was valued through holds no swaption vols for its currency — a curve source is not a vol source.
CmsRefused
A CMS coupon’s valuation was refused for a reason the pricing view named: an unregistered swap index, a lognormal smile on a non-positive forward.
Trait Implementations§
§impl Clone for CashflowError
impl Clone for CashflowError
§fn clone(&self) -> CashflowError
fn clone(&self) -> CashflowError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for CashflowError
impl Debug for CashflowError
§impl Display for CashflowError
impl Display for CashflowError
§impl Error for CashflowError
impl Error for CashflowError
§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()