pub struct AsymmetryIndexCalculator { /* private fields */ }Expand description
Asymmetry Index calculator for order book skewness
Measures the asymmetry between bid and ask sides of the order book to identify potential directional pressure and price movements.
Implementations§
Source§impl AsymmetryIndexCalculator
impl AsymmetryIndexCalculator
Sourcepub fn new(
max_levels: usize,
volume_weighted: bool,
distance_decay: f64,
window_size: usize,
) -> Self
pub fn new( max_levels: usize, volume_weighted: bool, distance_decay: f64, window_size: usize, ) -> Self
Create a new asymmetry index calculator
§Arguments
max_levels- Maximum number of price levels to analyzevolume_weighted- Whether to weight by volumedistance_decay- Decay factor for price distance weighting (0-1)window_size- Size of rolling window for smoothing
Sourcepub fn calculate(&mut self, snapshot: &OrderBookSnapshot) -> AsymmetryMetrics
pub fn calculate(&mut self, snapshot: &OrderBookSnapshot) -> AsymmetryMetrics
Calculate asymmetry index from order book snapshot
Trait Implementations§
Source§impl Clone for AsymmetryIndexCalculator
impl Clone for AsymmetryIndexCalculator
Source§fn clone(&self) -> AsymmetryIndexCalculator
fn clone(&self) -> AsymmetryIndexCalculator
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AsymmetryIndexCalculator
impl RefUnwindSafe for AsymmetryIndexCalculator
impl Send for AsymmetryIndexCalculator
impl Sync for AsymmetryIndexCalculator
impl Unpin for AsymmetryIndexCalculator
impl UnwindSafe for AsymmetryIndexCalculator
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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