Expand description
Inter-bar math helper functions Extracted from interbar.rs (Phase 2e refactoring)
GitHub Issue: https://github.com/terrylica/opendeviationbar-py/issues/59 Issue #96 Task #4: SIMD burstiness acceleration (feature-gated) Issue #96 Task #14: Garman-Klass libm optimization (1.2-1.5x speedup) Issue #96 Task #93: Permutation entropy batch processing optimization Issue #96 Task #130: Permutation entropy SIMD vectorization with wide crate
§FILE-SIZE-OK (600+ lines - organized by feature module)
Structs§
- Entropy
Cache - Entropy result cache for deterministic price sequences (Issue #96 Task #117)
- Lookback
Cache - Memoized lookback trade data (Issue #96 Task #99: Float conversion memoization)
Functions§
- accumulate_
buy_ sell_ branchless - Branchless conditional accumulation for buy/sell volume (Issue #96 Task #177)
- compute_
approximate_ entropy - Compute Approximate Entropy (ApEn)
- compute_
burstiness - Compute Burstiness (Goh-Barabasi)
- compute_
entropy_ adaptive - Adaptive entropy computation: Permutation Entropy for small windows, ApEn for large
- compute_
entropy_ adaptive_ cached - compute_
entropy_ adaptive_ cached_ readonly - Compute adaptive entropy with caching support (Issue #96 Task #117)
- compute_
garman_ klass - Compute Garman-Klass volatility estimator
- compute_
garman_ klass_ with_ ohlc - Compute Garman-Klass volatility with pre-computed OHLC
- compute_
hurst_ dfa - Compute Hurst exponent via Detrended Fluctuation Analysis (DFA)
- compute_
kaufman_ er - Compute Kaufman Efficiency Ratio
- compute_
kyle_ lambda - Compute Kyle’s Lambda (normalized version) with adaptive sampling for large windows
- compute_
ofi_ branchless - Compute Order Flow Imbalance (OFI) with branchless ILP (Issue #96 Task #194)
- compute_
permutation_ entropy - Compute Adaptive Permutation Entropy with dynamic embedding dimension
- compute_
volume_ moments - Compute volume moments (skewness and excess kurtosis)
- compute_
volume_ moments_ cached - Compute volume moments using pre-computed cache (Issue #96 Task #99)
- compute_
volume_ moments_ with_ mean - Compute volume moments with pre-computed mean (Issue #96 Task #51)
- extract_
lookback_ cache - Extract memoized lookback data in single pass (Issue #96 Task #99)
- extract_
ohlc_ batch - Issue #96 Task #129: Vectorized ordinal pattern batch computation (SIMD-ready)
- extract_
prices_ and_ ohlc_ cached - Issue #96 Task #77: Combined OHLC + prices extraction in single pass (1.3-1.6x speedup) Extract both prices vector and OHLC values in ONE pass through lookback Replaces separate price iteration + extract_ohlc_batch calls