Skip to main content

extract_lookback_cache

Function extract_lookback_cache 

Source
pub fn extract_lookback_cache(lookback: &[&TradeSnapshot]) -> LookbackCache
Expand description

Extract memoized lookback data in single pass (Issue #96 Task #99)

Replaces multiple independent passes through lookback trades with a single traversal that extracts prices, volumes, and OHLC bounds together.

§Complexity

  • O(n) single pass through lookback trades
  • Constant-time access to pre-computed values for all feature functions

§Returns

Cache with pre-computed prices, volumes, OHLC, and aggregates