Skip to main content

Crate rangebar_core

Crate rangebar_core 

Source
Expand description

§rangebar-core has been renamed to opendeviationbar-core

This crate is a shim that re-exports everything from opendeviationbar-core.

§Migration

Update your Cargo.toml:

# Before
rangebar-core = "12"

# After
opendeviationbar-core = "12"

The algorithm uses open-anchored deviation thresholds (not classic Nicolellis range bars), so the name was updated to reflect this.

Modules§

checkpoint
Checkpoint system for cross-file open deviation bar continuation
entropy_cache_global
Global entropy cache for multi-symbol processors
errors
Processing error types
export_processor
Export-oriented open deviation bar processor Extracted from processor.rs (Phase 2d refactoring)
fixed_point
Fixed-point arithmetic for precise decimal calculations without floating point errors
interbar
Inter-bar microstructure features computed from lookback trade windows
interbar_cache
Inter-bar feature result caching for streaming optimization
interbar_math
Inter-bar math helper functions Extracted from interbar.rs (Phase 2e refactoring)
interbar_types
Inter-bar type definitions
intrabar
Intra-bar features computed from constituent aggTrades.
processor
Core open deviation bar processing algorithm
timestamp
Universal timestamp normalization utilities
trade
Trade and data source types
types
Type definitions for open deviation bar processing

Structs§

AggTrade
Aggregate trade data from Binance markets
AnomalySummary
Anomaly summary for quick inspection (counts only)
Checkpoint
Checkpoint for cross-file open deviation bar continuation
EntropyCache
Entropy result cache for deterministic price sequences (Issue #96 Task #117)
ExportOpenDeviationBarProcessor
Export-oriented open deviation bar processor for streaming use cases
FixedPoint
Fixed-point decimal representation using i64 with 8 decimal precision
InterBarCacheKey
Cache key for inter-bar feature results
InterBarConfig
Configuration for inter-bar feature computation
InterBarFeatureCache
LRU cache for inter-bar feature computation results
InterBarFeatures
Inter-bar features computed from lookback window
IntraBarConfig
Issue #128: Configuration for intra-bar feature computation.
IntraBarFeatures
All 22 intra-bar features computed from constituent trades.
OpenDeviationBar
Open deviation bar with OHLCV data and market microstructure enhancements
OpenDeviationBarProcessor
Open deviation bar processor with non-lookahead bias guarantee
TradeHistory
Trade history ring buffer for inter-bar feature computation
TradeSnapshot
Lightweight snapshot of trade for history buffer

Enums§

CheckpointError
Checkpoint-related errors
DataSource
Data source for market data (future-proofing for multi-exchange support)
LookbackMode
Lookback mode for trade history
PositionVerification
Position verification result when resuming from checkpoint
ProcessingError
Processing errors

Constants§

FEATURE_MANIFEST_TOML
Feature manifest TOML, embedded at compile time. SSoT for all microstructure feature metadata (Issue #95). Exposed to Python via PyO3 get_feature_manifest_raw().
GLOBAL_ENTROPY_CACHE_CAPACITY
Maximum capacity for the global entropy cache (tunable via this constant)
INTERBAR_FEATURE_CACHE_CAPACITY
Maximum capacity for inter-bar feature cache Trade-off: Larger → higher hit ratio; smaller → less memory

Functions§

compute_intra_bar_features
Compute all intra-bar features from constituent trades.
create_aggtrade_with_normalized_timestamp
Create a normalized AggTrade with automatic timestamp conversion
create_local_entropy_cache
Create a local entropy cache (backward compatibility)
get_global_entropy_cache
Get a reference to the global entropy cache
normalize_timestamp
Normalize any timestamp to 16-digit microseconds
validate_timestamp
Validate timestamp is in expected microsecond range