rangebar
Non-lookahead range bar construction for cryptocurrency trading with temporal integrity guarantees.
Quick Start
Add this to your Cargo.toml:
[]
= "0.5"
Usage
use ;
// Create processor with 25 basis points threshold
let mut processor = new;
// Create sample aggTrade
let trade = AggTrade ;
// Process aggTrade records into range bars
let agg_trade_records = vec!;
let bars = processor.process_agg_trade_records.unwrap;
for bar in bars
Algorithm
Range bars close when price moves ±threshold basis points from the bar's opening price:
- Non-lookahead bias: Thresholds computed only from bar open price
- Breach inclusion: Breaching aggTrade included in closing bar
- Fixed thresholds: Never recalculated during bar lifetime
Features
- Non-lookahead bias range bar construction
- Fixed-point arithmetic for precision
- Streaming and batch processing modes
- Tier-1 cryptocurrency symbol discovery
License
MIT license. See LICENSE for details.