#[non_exhaustive]pub enum QuadraticRoughHestonError {
AlphaOutOfRange {
alpha: Decimal,
},
NoFactors,
RatioNotAboveOne {
ratio: Decimal,
},
KernelOutOfRange {
quantity: &'static str,
index: usize,
},
NonPositiveStep {
horizon: Decimal,
steps: usize,
},
InvalidParameter {
parameter: &'static str,
value: Decimal,
reason: &'static str,
},
InitialFactorCount {
expected: usize,
actual: usize,
},
NonFinite {
quantity: &'static str,
step: usize,
},
BufferTooLarge {
buffer: &'static str,
len: usize,
},
Decimal(DecimalError),
}Expand description
Reasons why a quadratic rough Heston kernel, simulation or price cannot be produced.
Raised by the constructors and functions around
QuadraticRoughHestonParams.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AlphaOutOfRange
The roughness exponent alpha is outside the open interval (1/2, 1).
NoFactors
The kernel was asked for no factors.
RatioNotAboveOne
The geometric ratio x_n of the partition is not above one.
KernelOutOfRange
A kernel weight or discount has no positive value in a Decimal: it overflows,
or it is smaller than the resolution of 1e-28.
Fields
NonPositiveStep
The time step is not positive: the horizon is not above zero, there are no steps,
or the step rounds to zero in a Decimal.
InvalidParameter
A model or run parameter is outside its domain.
Fields
InitialFactorCount
The number of initial factors is not the number of factors of the kernel.
NonFinite
A value of the simulated state stopped being finite. The variance is not truncated, so this is how an exploding path is reported.
Fields
BufferTooLarge
A buffer of the requested size cannot be allocated.
Decimal(DecimalError)
A value does not fit a Decimal, or Decimal arithmetic failed.
Trait Implementations§
Source§impl Debug for QuadraticRoughHestonError
impl Debug for QuadraticRoughHestonError
Source§impl Display for QuadraticRoughHestonError
impl Display for QuadraticRoughHestonError
Source§impl Error for QuadraticRoughHestonError
impl Error for QuadraticRoughHestonError
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()
Source§impl From<DecimalError> for QuadraticRoughHestonError
impl From<DecimalError> for QuadraticRoughHestonError
Source§fn from(source: DecimalError) -> Self
fn from(source: DecimalError) -> Self
Auto Trait Implementations§
impl Forget for QuadraticRoughHestonError
impl Freeze for QuadraticRoughHestonError
impl RefUnwindSafe for QuadraticRoughHestonError
impl Send for QuadraticRoughHestonError
impl Sync for QuadraticRoughHestonError
impl Unpin for QuadraticRoughHestonError
impl UnsafeUnpin for QuadraticRoughHestonError
impl UnwindSafe for QuadraticRoughHestonError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.