pub struct PathConfig {
pub initial_value: f64,
pub drift: f64,
pub dividend: f64,
pub volatility: f64,
pub time_horizon: f64,
pub n_steps: usize,
pub variance_reduction: VarianceReduction,
}Expand description
Configuration for path generation
Fields§
§initial_value: f64Initial value (e.g., spot price)
drift: f64Drift rate (e.g., risk-free rate - dividend)
dividend: f64Dividend yield
volatility: f64Volatility
time_horizon: f64Time horizon (years)
n_steps: usizeNumber of time steps
variance_reduction: VarianceReductionVariance reduction technique
Implementations§
Source§impl PathConfig
impl PathConfig
Sourcepub fn new(
initial_value: f64,
risk_free_rate: f64,
dividend: f64,
volatility: f64,
time_horizon: f64,
) -> Self
pub fn new( initial_value: f64, risk_free_rate: f64, dividend: f64, volatility: f64, time_horizon: f64, ) -> Self
Create a new path configuration
Sourcepub fn with_steps(self, n_steps: usize) -> Self
pub fn with_steps(self, n_steps: usize) -> Self
Set number of time steps
Sourcepub fn with_variance_reduction(
self,
variance_reduction: VarianceReduction,
) -> Self
pub fn with_variance_reduction( self, variance_reduction: VarianceReduction, ) -> Self
Set variance reduction technique
Trait Implementations§
Source§impl Clone for PathConfig
impl Clone for PathConfig
Source§fn clone(&self) -> PathConfig
fn clone(&self) -> PathConfig
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 PathConfig
impl RefUnwindSafe for PathConfig
impl Send for PathConfig
impl Sync for PathConfig
impl Unpin for PathConfig
impl UnwindSafe for PathConfig
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