pub struct OrderBookFeatures {
pub bid_liquidity: f64,
pub ask_liquidity: f64,
pub spread_bps: f64,
pub mid_price: f64,
pub queue_imbalance: f64,
pub book_depth_ratio: f64,
pub bid_slope: f64,
pub ask_slope: f64,
pub orderbook_skew: f64,
pub orderbook_imbalance: f64,
pub weighted_mid_price: f64,
pub ofi_basic: f64,
}Expand description
Order book-based features calculated from limit order book snapshots.
These features capture the state and dynamics of the order book, providing insights into liquidity, price pressure, and market microstructure that are essential for high-frequency trading strategies.
Fields§
§bid_liquidity: f64Total bid-side liquidity - Sum of all bid quantities
ask_liquidity: f64Total ask-side liquidity - Sum of all ask quantities
spread_bps: f64Bid-ask spread in basis points - Relative spread normalized by mid price
mid_price: f64Mid price - Average of best bid and best ask prices
queue_imbalance: f64Queue imbalance - Imbalance between best bid and ask quantities
book_depth_ratio: f64Book depth ratio - Ratio of bid to ask depth, indicating relative liquidity
bid_slope: f64Bid slope - Rate of price decay on bid side, indicating buying pressure
ask_slope: f64Ask slope - Rate of price increase on ask side, indicating selling pressure
orderbook_skew: f64Order book skew - Asymmetry in the order book shape
orderbook_imbalance: f64Order book imbalance - Overall imbalance between bid and ask sides
weighted_mid_price: f64Weighted mid price - Mid price weighted by best bid/ask quantities
ofi_basic: f64Basic order flow imbalance - Simple OFI calculation from order book changes
Trait Implementations§
Source§impl Clone for OrderBookFeatures
impl Clone for OrderBookFeatures
Source§fn clone(&self) -> OrderBookFeatures
fn clone(&self) -> OrderBookFeatures
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OrderBookFeatures
impl Debug for OrderBookFeatures
Source§impl Default for OrderBookFeatures
impl Default for OrderBookFeatures
Source§fn default() -> OrderBookFeatures
fn default() -> OrderBookFeatures
Auto Trait Implementations§
impl Freeze for OrderBookFeatures
impl RefUnwindSafe for OrderBookFeatures
impl Send for OrderBookFeatures
impl Sync for OrderBookFeatures
impl Unpin for OrderBookFeatures
impl UnwindSafe for OrderBookFeatures
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
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>
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>
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