Struct SimulationSettings
pub struct SimulationSettings {
pub paths: usize,
pub seed: u64,
pub antithetic: bool,
pub pfe_quantile: f64,
pub repeat_crises: bool,
pub recovery_volatility: f64,
}Expand description
How a simulation runs.
Fields§
§paths: usizeThe number of paths; even under antithetics.
seed: u64The seed every path’s stream derives from.
antithetic: boolWhether paths come in antithetic pairs.
pfe_quantile: f64The quantile the profile’s PFE reads, in (0, 1).
repeat_crises: boolSimulate every crisis rather than the first, the rest in expectation.
recovery_volatility: f64The standard deviation of the recovery a default pays: beta-distributed about the issuer’s market recovery and integrated at each default. Zero is the market recovery fixed. A model setting, with no risk row.
Implementations§
§impl SimulationSettings
impl SimulationSettings
pub fn check(&self) -> Result<(), PricingError>
pub fn check(&self) -> Result<(), PricingError>
Refuses fewer than two paths, an odd path count under antithetics, and
a PFE quantile outside (0, 1).
§Errors
PricingError::MalformedDeclaration naming the refused setting.
Trait Implementations§
§impl Clone for SimulationSettings
impl Clone for SimulationSettings
§fn clone(&self) -> SimulationSettings
fn clone(&self) -> SimulationSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SimulationSettings
§impl Debug for SimulationSettings
impl Debug for SimulationSettings
§impl Default for SimulationSettings
impl Default for SimulationSettings
§impl PartialEq for SimulationSettings
impl PartialEq for SimulationSettings
§fn eq(&self, other: &SimulationSettings) -> bool
fn eq(&self, other: &SimulationSettings) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SimulationSettings
Auto Trait Implementations§
impl Freeze for SimulationSettings
impl RefUnwindSafe for SimulationSettings
impl Send for SimulationSettings
impl Sync for SimulationSettings
impl Unpin for SimulationSettings
impl UnsafeUnpin for SimulationSettings
impl UnwindSafe for SimulationSettings
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