What is NanoARB?
NanoARB is a nanosecond-level high-frequency trading engine designed for CME futures markets (ES, NQ). It combines cutting-edge machine learning models with ultra-low-latency Rust infrastructure to achieve institutional-grade performance for statistical arbitrage and market-making strategies. Built entirely in Rust with zero Python at runtime, NanoARB delivers sub-microsecond tick-to-trade latency while maintaining production-grade reliability and realistic backtesting capabilities.Key features
Sub-microsecond inference
< 800ns end-to-end tick-to-trade latency with median total latency of 780ns
Production Rust codebase
Zero Python at runtime, built for maximum performance and reliability
State-of-the-art ML
Mamba State Space Models for 10-50x faster inference than Transformers
Realistic backtesting
Latency simulation, queue position modeling, and adverse selection
Performance benchmarks
Measured on AMD EPYC 7763 (AWS c6a.8xlarge):| Operation | Median | P95 | P99 |
|---|---|---|---|
| LOB Update | 45ns | 62ns | 78ns |
| Feature Extraction | 120ns | 145ns | 168ns |
| Model Inference | 580ns | 720ns | 890ns |
| Total Tick-to-Trade | 780ns | 950ns | 1.2μs |
Trading capabilities
Data Pipeline- CME MDP 3.0 binary protocol parser with SBE encoding
- Zero-copy message parsing using
nom - Synthetic data generator for development and testing
- Historical replay support
- 20-level price aggregation with O(log n) updates using
BTreeMap - Real-time feature extraction: Microprice, OFI, VPIN, Book Imbalance
- Tensor serialization for ML inference
- Mamba-LOB: State Space Model for sequence modeling (~500K parameters, <800ns inference)
- Decision Transformer: Offline RL for market-making
- IQL: Implicit Q-Learning with expectile regression
- ONNX export for Rust inference via
ort
- Event-driven architecture with configurable latency models
- Realistic fill simulation with queue position tracking
- Walk-forward and purged cross-validation
Architecture overview
NanoARB is built as a modular Rust workspace with the following crates:| Crate | Description |
|---|---|
nano-core | Core types, traits, error handling |
nano-feed | CME MDP 3.0 parser, synthetic data generator |
nano-lob | Order book reconstruction, feature extraction |
nano-model | ONNX inference, signal generation |
nano-backtest | Event-driven backtesting engine |
nano-strategy | Trading strategies, RL environment |
nano-gateway | Entry point, metrics, configuration |
Who should use NanoARB?
NanoARB is designed for:- Quantitative researchers developing high-frequency trading strategies
- Algorithmic traders who need realistic backtesting with sub-microsecond precision
- HFT developers building low-latency trading systems in Rust
- Academic researchers studying market microstructure and ML for trading
- Trading firms evaluating market-making and statistical arbitrage strategies