pub enum ExitStrategy {
StandardZScore {
exit_z: Decimal,
},
HardTimeStop {
max_duration_secs: u64,
},
HalfLifeTimeStop {
half_life_candles: u32,
multiplier: Decimal,
},
DecayingThreshold {
initial_exit_z: Decimal,
decay_rate_per_hour: Decimal,
},
}Expand description
Configurable exit management policies shared by strategies and control surfaces.
Variants§
StandardZScore
Exit once the z-score mean reverts to the configured level.
HardTimeStop
Force an exit once the holding period exceeds the configured duration.
HalfLifeTimeStop
Force an exit after a multiple of the observed half-life (in candles).
DecayingThreshold
Gradually relax the exit threshold over time.
Trait Implementations§
Source§impl Clone for ExitStrategy
impl Clone for ExitStrategy
Source§fn clone(&self) -> ExitStrategy
fn clone(&self) -> ExitStrategy
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 moreSource§impl Debug for ExitStrategy
impl Debug for ExitStrategy
Source§impl<'de> Deserialize<'de> for ExitStrategy
impl<'de> Deserialize<'de> for ExitStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ExitStrategy
impl PartialEq for ExitStrategy
Source§impl Serialize for ExitStrategy
impl Serialize for ExitStrategy
impl StructuralPartialEq for ExitStrategy
Auto Trait Implementations§
impl Freeze for ExitStrategy
impl RefUnwindSafe for ExitStrategy
impl Send for ExitStrategy
impl Sync for ExitStrategy
impl Unpin for ExitStrategy
impl UnwindSafe for ExitStrategy
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