Expand description
Dual-mode feature calculation for both scalar and vectorized operations. Dual-mode feature calculation framework
Supports both real-time streaming and batch vectorized calculations with identical results guaranteed between modes.
§Memory Management Strategy
This module implements a size-based boxing strategy for enum variants containing large data structures. The strategy uses compile-time size calculations and a 1KB threshold to determine when to box variants:
- Stack allocation (< 1KB): Direct storage for optimal cache performance
- Heap allocation (≥ 1KB): Boxed storage to prevent stack overflow
This approach ensures predictable memory allocation patterns while maintaining high performance for small variants and preventing stack overflow for large ones.
Re-exports§
pub use DualModeOFI32 as DefaultDualModeOFI;pub use MarketUpdate32 as DefaultMarketUpdate;
Structs§
- Dual
Mode Book Slope - Order Book Slope dual-mode implementation Order Book Slope dual-mode implementation.
- Dual
Mode Kyle Lambda - Kyle’s Lambda dual-mode implementation Kyle’s Lambda dual-mode implementation.
- Dual
ModeOFI - Order Flow Imbalance (OFI) dual-mode implementation Order Flow Imbalance (OFI) dual-mode implementation.
- Dual
ModeVPIN - VPIN (Volume-Synchronized Probability of Informed Trading) dual-mode implementation.
- Feature
Engine - Feature calculation engine that manages multiple features
- Feature
Engine Builder - Builder for creating feature engines with common HFT features
- Market
Data - Market data for batch calculation Market data for batch calculation.
- Market
Update - Market data for incremental calculation
- Trade
Update - Trade update for incremental calculation Trade update for incremental calculation.
Enums§
- Calculation
Mode - The calculation mode for the feature engine.
- Feature
Value - Feature value that can hold different types Feature value that can hold different types.
- Trade
Side - The side of a trade.
Traits§
- Dual
Mode Feature - Trait for features that support both real-time and batch calculation
Type Aliases§
- Dual
ModeOF I5 - Type alias for a dual-mode OFI feature with 5 levels capacity.
- Dual
ModeOF I8 - Type alias for a dual-mode OFI feature with 8 levels capacity.
- Dual
ModeOF I16 - Type alias for a dual-mode OFI feature with 16 levels capacity.
- Dual
ModeOF I32 - Type alias for a dual-mode OFI feature with 32 levels capacity.
- Dual
ModeOF I64 - Type alias for a dual-mode OFI feature with 64 levels capacity.
- Dual
ModeOF I128 - Type alias for a dual-mode OFI feature with 128 levels capacity.
- Market
Update32 - Type alias for a market update with 32 order book levels and 16 trade records capacity.
- Market
Update64 - Type alias for a market update with 64 levels and 32 trades capacity.
- Market
Update128 - Type alias for a market update with 128 levels and 64 trades capacity.