pub struct ParameterOptimizer {
pub constraints: RebalanceConstraints,
/* private fields */
}Expand description
Optimizer for rebalancing strategy parameters.
Fields§
§constraints: RebalanceConstraintsConstraints for parameter search.
Implementations§
Source§impl ParameterOptimizer
impl ParameterOptimizer
Sourcepub fn with_price_thresholds(self, thresholds: Vec<Decimal>) -> Self
pub fn with_price_thresholds(self, thresholds: Vec<Decimal>) -> Self
Sets custom price threshold grid.
Sourcepub fn with_il_thresholds(self, thresholds: Vec<Decimal>) -> Self
pub fn with_il_thresholds(self, thresholds: Vec<Decimal>) -> Self
Sets custom IL threshold grid.
Sourcepub fn with_intervals(self, intervals: Vec<u64>) -> Self
pub fn with_intervals(self, intervals: Vec<u64>) -> Self
Sets custom interval grid.
Sourcepub fn with_constraints(self, constraints: RebalanceConstraints) -> Self
pub fn with_constraints(self, constraints: RebalanceConstraints) -> Self
Sets constraints.
Sourcepub fn optimize_threshold<O: ObjectiveFunction>(
&self,
config: &OptimizationConfig,
range_width: Decimal,
objective: &O,
) -> Vec<ThresholdCandidate>
pub fn optimize_threshold<O: ObjectiveFunction>( &self, config: &OptimizationConfig, range_width: Decimal, objective: &O, ) -> Vec<ThresholdCandidate>
Optimizes threshold strategy parameters.
Sourcepub fn optimize_periodic<O: ObjectiveFunction>(
&self,
config: &OptimizationConfig,
range_width: Decimal,
objective: &O,
) -> Vec<PeriodicCandidate>
pub fn optimize_periodic<O: ObjectiveFunction>( &self, config: &OptimizationConfig, range_width: Decimal, objective: &O, ) -> Vec<PeriodicCandidate>
Optimizes periodic strategy parameters.
Sourcepub fn optimize_il_limit<O: ObjectiveFunction>(
&self,
config: &OptimizationConfig,
range_width: Decimal,
objective: &O,
) -> Vec<ILLimitCandidate>
pub fn optimize_il_limit<O: ObjectiveFunction>( &self, config: &OptimizationConfig, range_width: Decimal, objective: &O, ) -> Vec<ILLimitCandidate>
Optimizes IL limit strategy parameters.
Trait Implementations§
Source§impl Clone for ParameterOptimizer
impl Clone for ParameterOptimizer
Source§fn clone(&self) -> ParameterOptimizer
fn clone(&self) -> ParameterOptimizer
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 ParameterOptimizer
impl Debug for ParameterOptimizer
Auto Trait Implementations§
impl Freeze for ParameterOptimizer
impl RefUnwindSafe for ParameterOptimizer
impl Send for ParameterOptimizer
impl Sync for ParameterOptimizer
impl Unpin for ParameterOptimizer
impl UnsafeUnpin for ParameterOptimizer
impl UnwindSafe for ParameterOptimizer
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