pub struct MonteCarloConfig {
pub paths: usize,
pub time_steps: usize,
pub scheme: DiscretizationScheme,
pub sampler: Sampler,
pub seed: u64,
}Expand description
Dynamics used for path generation. Gbm diffuses at the option’s own
(constant) implied vol; LocalVol diffuses at the Dupire local
volatility calibrated from the option’s vol surface.
Fields§
§paths: usize§time_steps: usize1 = terminal simulation (exact); > 1 = path-wise stepping.
Local vol always steps path-wise (at least LOCAL_VOL_MIN_STEPS).
scheme: DiscretizationScheme§sampler: Sampler§seed: u64Implementations§
Source§impl MonteCarloConfig
impl MonteCarloConfig
Sourcepub fn from_data(data: &EquityOptionData) -> Result<Self, RustyQLibError>
pub fn from_data(data: &EquityOptionData) -> Result<Self, RustyQLibError>
Read the sampling configuration from contract data, reporting bad
mc_scheme / mc_sampler strings as typed errors naming the field.
Sourcepub fn validate(&self) -> Result<(), RustyQLibError>
pub fn validate(&self) -> Result<(), RustyQLibError>
Domain checks on the sampling parameters; field names match the
EquityOptionBuilder
setters.
Trait Implementations§
Source§impl Clone for MonteCarloConfig
impl Clone for MonteCarloConfig
Source§fn clone(&self) -> MonteCarloConfig
fn clone(&self) -> MonteCarloConfig
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 MonteCarloConfig
Source§impl Debug for MonteCarloConfig
impl Debug for MonteCarloConfig
Source§impl Default for MonteCarloConfig
impl Default for MonteCarloConfig
Source§impl PartialEq for MonteCarloConfig
impl PartialEq for MonteCarloConfig
impl StructuralPartialEq for MonteCarloConfig
Auto Trait Implementations§
impl Freeze for MonteCarloConfig
impl RefUnwindSafe for MonteCarloConfig
impl Send for MonteCarloConfig
impl Sync for MonteCarloConfig
impl Unpin for MonteCarloConfig
impl UnsafeUnpin for MonteCarloConfig
impl UnwindSafe for MonteCarloConfig
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