pub struct StressTestResult {
pub var_95: f64,
pub var_99: f64,
pub expected_shortfall: f64,
pub max_drawdown: f64,
pub probability_of_loss: f64,
pub mean_portfolio_value: f64,
pub std_dev: f64,
pub num_simulations: usize,
}Expand description
Aggregated results of a Monte Carlo stress-test simulation run.
All monetary values are expressed in the portfolio’s currency. VaR figures
are reported as positive numbers representing the magnitude of loss at the
given confidence level (i.e. the loss that is not exceeded with the stated
probability). expected_shortfall is the average loss in the tail beyond
the 95% VaR. max_drawdown is the worst single-simulation loss relative to
the initial portfolio value.
Fields§
§var_95: f64Value-at-Risk at the 95% confidence level (positive = loss magnitude).
var_99: f64Value-at-Risk at the 99% confidence level (positive = loss magnitude).
expected_shortfall: f64Expected shortfall (average loss beyond the 95% VaR).
max_drawdown: f64Largest single-simulation loss relative to the initial portfolio value.
probability_of_loss: f64Fraction of simulations that ended below the initial portfolio value.
mean_portfolio_value: f64Mean portfolio value across all simulations.
std_dev: f64Standard deviation of simulated portfolio values.
num_simulations: usizeNumber of simulations run.
Trait Implementations§
Source§impl Clone for StressTestResult
impl Clone for StressTestResult
Source§fn clone(&self) -> StressTestResult
fn clone(&self) -> StressTestResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StressTestResult
impl Debug for StressTestResult
Source§impl PartialEq for StressTestResult
impl PartialEq for StressTestResult
Source§fn eq(&self, other: &StressTestResult) -> bool
fn eq(&self, other: &StressTestResult) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StressTestResult
Auto Trait Implementations§
impl Freeze for StressTestResult
impl RefUnwindSafe for StressTestResult
impl Send for StressTestResult
impl Sync for StressTestResult
impl Unpin for StressTestResult
impl UnsafeUnpin for StressTestResult
impl UnwindSafe for StressTestResult
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more