rangebar_core/
lib.rs

1//! Core range bar processing algorithms
2//!
3//! Non-lookahead bias range bar construction with temporal integrity guarantees.
4//!
5//! ## Features
6//!
7//! - Non-lookahead bias: Thresholds computed only from bar open price
8//! - Breach inclusion: Breaching trade included in closing bar
9//! - Fixed thresholds: Never recalculated during bar lifetime
10//! - Temporal integrity: Guaranteed correct historical simulation
11//! - **Cross-file checkpoints**: Seamless continuation across file boundaries (v6.1.0+)
12
13pub mod checkpoint;
14pub mod fixed_point;
15pub mod processor;
16pub mod timestamp;
17pub mod types;
18
19// Test utilities (only available in test builds or with test-utils feature)
20#[cfg(any(test, feature = "test-utils"))]
21pub mod test_utils;
22
23#[cfg(any(test, feature = "test-utils"))]
24pub mod test_data_loader;
25
26// Re-export commonly used types
27pub use checkpoint::{AnomalySummary, Checkpoint, CheckpointError, PositionVerification};
28pub use fixed_point::FixedPoint;
29pub use processor::{ExportRangeBarProcessor, ProcessingError, RangeBarProcessor};
30pub use timestamp::{
31    create_aggtrade_with_normalized_timestamp, normalize_timestamp, validate_timestamp,
32};
33pub use types::{AggTrade, DataSource, RangeBar};