pub struct AdvancedRiskMetrics {
pub value_at_risk_95: Option<Decimal>,
pub value_at_risk_99: Option<Decimal>,
pub expected_shortfall: Option<Decimal>,
pub tail_ratio: Option<Decimal>,
pub max_consecutive_losses: usize,
pub ulcer_index: Option<Decimal>,
pub pain_index: Option<Decimal>,
}Expand description
Represents a collection of advanced risk metrics for assessing investment performance, focusing on downside risk and tail events beyond simple standard deviation.
Fields§
§value_at_risk_95: Option<Decimal>Value at Risk (VaR) at the 95% confidence level.
Represents the maximum potential loss over a specific time period
with 95% confidence. None if not calculated.
value_at_risk_99: Option<Decimal>Value at Risk (VaR) at the 99% confidence level.
Represents the maximum potential loss over a specific time period
with 99% confidence. None if not calculated.
expected_shortfall: Option<Decimal>Expected Shortfall (ES), also known as Conditional Value at Risk (CVaR).
Represents the expected loss given that the loss exceeds the VaR threshold
(typically calculated at the 95% or 99% level). None if not calculated.
tail_ratio: Option<Decimal>The ratio of the 95th percentile gain to the absolute value of the 5th percentile loss.
Provides insight into the symmetry of the return distribution’s tails. None if not calculated.
max_consecutive_losses: usizeThe maximum number of consecutive periods (e.g., days, weeks) with negative returns.
ulcer_index: Option<Decimal>The Ulcer Index, measuring the depth and duration of drawdowns from peak values.
Higher values indicate more significant and prolonged drawdowns. None if not calculated.
pain_index: Option<Decimal>The Pain Index, similar to the Ulcer Index, measuring the average depth and duration
of drawdowns. None if not calculated.
Trait Implementations§
Source§impl Clone for AdvancedRiskMetrics
impl Clone for AdvancedRiskMetrics
Source§impl Debug for AdvancedRiskMetrics
impl Debug for AdvancedRiskMetrics
Source§impl Default for AdvancedRiskMetrics
impl Default for AdvancedRiskMetrics
Source§impl<'de> Deserialize<'de> for AdvancedRiskMetrics
impl<'de> Deserialize<'de> for AdvancedRiskMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for AdvancedRiskMetrics
impl RefUnwindSafe for AdvancedRiskMetrics
impl Send for AdvancedRiskMetrics
impl Sync for AdvancedRiskMetrics
impl Unpin for AdvancedRiskMetrics
impl UnsafeUnpin for AdvancedRiskMetrics
impl UnwindSafe for AdvancedRiskMetrics
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.