pub struct SimulationResult {
pub paths: Vec<SimulationPath>,
pub diagnostics: ConvergenceDiagnostics,
pub model_name: String,
pub seed: u64,
}Expand description
Result of a Monte Carlo simulation
Fields§
§paths: Vec<SimulationPath>All simulation paths
diagnostics: ConvergenceDiagnosticsConvergence diagnostics
model_name: StringModel name
seed: u64Seed used for simulation
Implementations§
Source§impl SimulationResult
impl SimulationResult
Sourcepub fn final_values(&self) -> Vec<f64>
pub fn final_values(&self) -> Vec<f64>
Get final values from all paths
Sourcepub fn total_returns(&self) -> Vec<f64>
pub fn total_returns(&self) -> Vec<f64>
Get total returns from all paths
Sourcepub fn final_value_statistics(&self) -> Statistics
pub fn final_value_statistics(&self) -> Statistics
Calculate statistics for final values
Sourcepub fn return_statistics(&self) -> Statistics
pub fn return_statistics(&self) -> Statistics
Calculate statistics for returns
Sourcepub fn values_at_time(&self, time_idx: usize) -> Vec<f64>
pub fn values_at_time(&self, time_idx: usize) -> Vec<f64>
Get values at specific time index across all paths
Sourcepub fn statistics_over_time(&self) -> Vec<Statistics>
pub fn statistics_over_time(&self) -> Vec<Statistics>
Calculate statistics at each time point
Sourcepub fn final_value_percentiles(&self) -> Percentiles
pub fn final_value_percentiles(&self) -> Percentiles
Get percentiles of final values
Sourcepub fn return_percentiles(&self) -> Percentiles
pub fn return_percentiles(&self) -> Percentiles
Get percentiles of returns
Trait Implementations§
Source§impl Clone for SimulationResult
impl Clone for SimulationResult
Source§fn clone(&self) -> SimulationResult
fn clone(&self) -> SimulationResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SimulationResult
impl RefUnwindSafe for SimulationResult
impl Send for SimulationResult
impl Sync for SimulationResult
impl Unpin for SimulationResult
impl UnwindSafe for SimulationResult
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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