tickbar
High-performance tick-to-bar aggregator for financial market data.
Converts raw trade/quote ticks into OHLCV bars with configurable time alignment, gap filling, VWAP, and corporate action adjustments. One-pass state machine — 119M ticks/s native Rust, 6.7M ticks/s from Python (PEP 3118 buffer protocol).
Features
- Fast — 119M ticks/s (Rust), 6.7M ticks/s (Python zero-copy)
- One-pass streaming — no windowing, no sorting
- VWAP per bar
- Gap filling + forward fill
- Multi-symbol parallel (rayon)
- Time alignment — UTC or custom offset
- Corporate actions — split/dividend backward adjustment
- Export — CSV, Arrow IPC, Polars DataFrame
- Memory-mapped I/O —
MmapTickReader - Python bindings — zero-copy via PEP 3118 buffer protocol
Quick start
Rust
use Duration;
use ;
let mut agg = builder
.interval
.symbol
.build?;
agg.push_tick?;
agg.push_tick?;
let bars = agg.finalize;
Python
=
=
Performance
| Path | Throughput | vs pandas |
|---|---|---|
| Rust native | 119M ticks/s | 25× |
| Python buffer (PEP 3118) | 6.7M ticks/s | 1.4× |
| pandas resample | 4.7M ticks/s | 1.0× |
Documentation
- Rust API docs (docs.rs) — full module reference with runnable examples
- GitHub repository — source, issues, contributing
Installation
[]
= "0.1"
License
MIT