Enum CreditError
#[non_exhaustive]pub enum CreditError {
Show 16 variants
IndexFactor(f64),
PoolNames,
Tranche {
attach: f64,
detach: f64,
},
EmptyBasket,
StartAfterMaturity(NaiveDate),
DuplicateEntity(String),
Rank {
n: usize,
basket: usize,
},
Correlation(f64),
EventWeight {
weight: f64,
factor: f64,
},
AuctionRecovery(f64),
RecoveryFloor(f64),
DegreesOfFreedom(f64),
DegreesOfFreedomPair,
DegreesOfFreedomSource,
Mark(String),
EventOutsideProtection(NaiveDate),
}Expand description
A credit trade that cannot be built as specified.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IndexFactor(f64)
An index factor outside (0, 1]: the remaining notional fraction of
an index is a share of what was issued.
PoolNames
A finite pool of no names.
Tranche
Tranche bounds not satisfying 0 ≤ attach < detach ≤ 1.
EmptyBasket
A basket with no constituents.
StartAfterMaturity(NaiveDate)
A protection start on or after the contract’s maturity.
DuplicateEntity(String)
A constituent named twice.
Rank
A trigger rank outside 1..=k.
Correlation(f64)
A correlation outside [0, 1).
EventWeight
A credit event’s weight that is not positive or exceeds the factor the index has left.
AuctionRecovery(f64)
An auction recovery outside [0, 1].
RecoveryFloor(f64)
A stochastic-recovery floor outside [0, 1).
DegreesOfFreedom(f64)
A Student-t copula’s degree of freedom outside (2, ∞).
DegreesOfFreedomPair
A Student-t copula named by one degree of freedom without the other.
DegreesOfFreedomSource
A Student-t copula with one degree of freedom from the contract and the other from the market: the market marks the pair together.
Mark(String)
A spelling that names neither a number nor "Market".
EventOutsideProtection(NaiveDate)
A credit event outside the contract’s protection.
Trait Implementations§
§impl Clone for CreditError
impl Clone for CreditError
§fn clone(&self) -> CreditError
fn clone(&self) -> CreditError
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 CreditError
impl Debug for CreditError
§impl Display for CreditError
impl Display for CreditError
§impl Error for CreditError
impl Error for CreditError
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()