Back to browse
GitHub Repository

Rust-first L3 limit order book backtesting engine with Python bindings for market microstructure research.

7 starsPython

Rust-First L3 Limit Order Book Backtesting Engine with Python Bindings

by chasemetoyer·Mar 6, 2026·1 point·0 comments

AI Analysis

●●SolidNiche GemWizardry

L3 limit order book replay beats OHLC backtesting, but only matters if you're serious quant.

Strengths
  • Deterministic event-driven matching with FIFO queue modeling mirrors real exchange behavior
  • Rust engine + Python bindings combines performance with research-friendly workflows
  • Parquet ingestion and trace debugging tooling show production-grade data handling
Weaknesses
  • Niche audience: only valuable for market microstructure-focused quant shops
  • Requires raw exchange L3 data (CoinAPI, Databento) — setup friction for new users
Target Audience

Quantitative traders, market microstructure researchers, algorithmic trading teams

Similar To

Backtrader · VectorBT · QuantConnect

Post Description

Hi HN,

I’ve been building a Rust-first backtesting engine for limit order book strategies and just open sourced the core engine.

Repo: https://github.com/chasemetoyer/Backtesting-Engine

The goal was to build something closer to how exchanges actually behave than typical OHLC-based backtesting frameworks.

Key features:

• L3 limit order book replay • deterministic event-driven matching engine • FIFO queue position modeling • Python strategy bindings for research workflows • parquet ingestion for high-volume datasets • replay trace tools for debugging strategy behavior

The core engine is written in Rust and exposed to Python via maturin. The idea is to combine Rust performance with Python-based research workflows.

Typical workflow:

1) Convert raw exchange data (ex: CoinAPI LIMITBOOK files) into canonical engine parquet 2) Run deterministic replay through the Rust engine 3) Execute strategies through Python bindings 4) analyze fills, equity curves, and risk metrics

The repo currently includes several example microstructure strategies such as:

• queue imbalance scalper • flow microprice scalper • cumulative flow momentum

I built this mainly to experiment with order book strategies where queue position and microstructure actually matter.

Would love feedback from people working on:

• market microstructure research • HFT simulation • Rust systems engineering • trading infrastructure

Especially interested in ideas for improving:

• event replay throughput • strategy interface design • multi-asset simulation

Thanks!

Similar Projects

Infrastructure●●●Banger

Sayiir – A simple durable workflow engine (Rust core, Python/Node.js)

Checkpoint-based recovery beats determinism constraints; embed without separate server, unlike Temporal/Airflow.

Big BrainDark HorseSolve My Problem
ybsoft
103mo ago