pub struct OptimizationConfig {
pub mc_iterations: usize,
pub simulation_steps: usize,
pub time_step_years: f64,
pub volatility: f64,
pub drift: f64,
pub current_price: Decimal,
pub pool_liquidity: u128,
pub fee_rate: Decimal,
pub tx_cost: Decimal,
}Expand description
Configuration for optimization runs.
Fields§
§mc_iterations: usizeNumber of Monte Carlo iterations.
simulation_steps: usizeNumber of simulation steps.
time_step_years: f64Time step in years.
volatility: f64Volatility assumption.
drift: f64Drift assumption.
current_price: DecimalCurrent price.
pool_liquidity: u128Pool liquidity.
fee_rate: DecimalFee rate.
tx_cost: DecimalTransaction cost per rebalance.
Implementations§
Source§impl OptimizationConfig
impl OptimizationConfig
Sourcepub fn with_iterations(self, iterations: usize) -> Self
pub fn with_iterations(self, iterations: usize) -> Self
Sets the Monte Carlo iterations.
Sourcepub fn with_steps(self, steps: usize) -> Self
pub fn with_steps(self, steps: usize) -> Self
Sets the simulation steps.
Sourcepub fn with_volatility(self, volatility: f64) -> Self
pub fn with_volatility(self, volatility: f64) -> Self
Sets the volatility.
Sourcepub fn with_price(self, price: Decimal) -> Self
pub fn with_price(self, price: Decimal) -> Self
Sets the current price.
Sourcepub fn with_fee_rate(self, fee_rate: Decimal) -> Self
pub fn with_fee_rate(self, fee_rate: Decimal) -> Self
Sets the fee rate.
Trait Implementations§
Source§impl Clone for OptimizationConfig
impl Clone for OptimizationConfig
Source§fn clone(&self) -> OptimizationConfig
fn clone(&self) -> OptimizationConfig
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 moreSource§impl Debug for OptimizationConfig
impl Debug for OptimizationConfig
Auto Trait Implementations§
impl Freeze for OptimizationConfig
impl RefUnwindSafe for OptimizationConfig
impl Send for OptimizationConfig
impl Sync for OptimizationConfig
impl Unpin for OptimizationConfig
impl UnsafeUnpin for OptimizationConfig
impl UnwindSafe for OptimizationConfig
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