Home / Backtesting & trading frameworks
PyLOB
Fast limit order book simulator for trading strategy research
What it is
An in-memory limit order book simulation for exploring automated trading strategies offline. Operating standard price-time priority, it handles market and limit orders with add, cancel and modify actions, matching trades at the resting order's price under a zero-latency assumption. Researchers working with Level 2 market data can attach an optional SQLite sink to record events, trades, balances and commissions for later querying, and orders report their own status via attributes like fulfilled and remaining. The chief simplification is zero latency—every trader reacts before the next quote arrives—so it models an idealized single-layer exchange rather than realistic market conditions.
At a glance
Research onlyOur rating, based on popularity, maintenance and how ready it is for real use.
| Best for | Developers |
|---|---|
| Used for | Backtesting, Strategy research |
| Markets | Multi-market |
| Stack | Python |
| Learning curve | Moderate learning curve |
| Practical value | Medium practical value |
| Cost | Free and open source |
| Hardware | No GPU needed |
| Maintenance | Last commit 58 days ago |
GitHub stars, last 30 days
Daily snapshots since 2026-09-12 (up to 30 days): +1 over the period, now 204. Gaps mean no snapshot was taken that day.
Fully functioning fast Limit Order Book written in Python.
Similar tools
Deep reinforcement learning library for automated quantitative trading
Python algorithmic trading framework with machine learning support
Python backtesting and live trading platform for strategies
Python reinforcement learning framework for training trading agents
Modular schedule-driven backtesting engine for equities and ETFs
Gym-style environment for reinforcement learning trading and backtesting