Production-grade limit order book simulator with market-making and RL support
Project description
Lumina LOB
A production-grade, educational Limit Order Book (LOB) simulator with algorithmic market-making, reinforcement learning support, and real-time visualization.
Mission: Build the most complete open-source LOB simulator that demonstrates tick-level market microstructure — matching engines, market impact, adverse selection, inventory risk, RL-based market making, and replay against real tick data.
Why this matters
Quant firms like Jane Street, Citadel Securities, Optiver, and IMC make markets at the tick level. Most open-source simulators are either too academic or too toy-like. Lumina LOB fills the gap with realistic agents, performance benchmarks, calibration to real data, and RL training.
Documentation
Full docs site: https://satyamdas03.github.io/lumina-lob
Blog post
Draft: blog/build-a-lob-simulator.md — "Build a Limit Order Book Simulator from Scratch".
Social launch drafts: blog/social-launch.md — LinkedIn post + X/Twitter thread ready for human review/posting.
Install
pip install lumina-lob
The package is published to PyPI. If pip install lumina-lob is not yet live, the wheels/sdist are built and the release tag is ready; PyPI trusted publishing must be configured by the repository owner for the first upload.
First-time PyPI trusted publishing setup (repository owner only)
- Log in to pypi.org as
satyamdas03. - Go to Account settings → Publishing.
- Add a new pending publisher:
- PyPI project name:
lumina-lob - Owner:
satyamdas03 - Repository name:
lumina-lob - Workflow name:
build.yml - Environment name:
pypi
- PyPI project name:
- Save. The next push of a
v*.*.*tag will automatically publish. - The
v0.1.1tag is already pushed; after configuring the publisher, re-run the failed Build wheels workflow run or push a newv*.*.*tag.
The GitHub Actions run for v0.1.1 confirmed that all 9 OS/Python matrix builds pass and produce both wheels and an sdist; only the final publish step fails until this configuration is done.
Optional visualization support:
pip install lumina-lob[viz]
Development install from source:
git clone https://github.com/satyamdas03/lumina-lob.git
cd lumina-lob
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev,viz,docs]"
pytest
The C++ accelerated core builds automatically when a compiler and pybind11 are available; otherwise the package falls back to the pure-Python engine.
Quickstart
from lumina_lob import Order, OrderBook, MatchingEngine, Side
book = OrderBook()
engine = MatchingEngine(book)
engine.process(Order(1, Side.BID, 100, 10))
engine.process(Order(2, Side.ASK, 100, 4))
engine.process(Order(3, Side.BID, 101, 6))
print(book.snapshot())
print(book.trades)
For an interactive walkthrough, open the first available notebook: notebooks/02_agents_and_impact.ipynb.
Features
| Feature | Status |
|---|---|
| Price-time priority matching engine (Python) | ✅ Done |
| Optional C++17 hot path via pybind11 | ✅ Done |
| Limit, market, IOC, FOK, cancel, modify orders | ✅ Done |
| Event log with nanosecond timestamps | ✅ Done |
| Noise trader, informed trader, market makers | ✅ Done |
| Propagator / Almgren-Chriss market impact | ✅ Done |
| Simulation orchestrator + pandas history export | ✅ Done |
| Polygon.io + Databento data downloaders | ✅ Done |
| Calibration to real tick data | ✅ Done |
| Gymnasium RL market-maker environment (PPO/SAC) | ✅ Done |
| Matplotlib depth ladder + history + real-time animator | ✅ Done |
| GIF/MP4 replay export | ✅ Done |
| PyPI packaging | ✅ Done |
| GitHub Actions CI | ✅ Done |
| MkDocs documentation site | ✅ Done |
| Technical blog post | ✅ Done (draft) |
| Social launch (LinkedIn/X) | ✅ Done (drafts) |
| GitHub release + PyPI publish | ✅ Ready (tag v0.1.0 pushed; PyPI trusted publishing required) |
Roadmap
The project is built in six phases:
| Phase | Goal | Status |
|---|---|---|
| Phase 0 | Core engine hardening | ✅ Done |
| Phase 1 | Market model + agents | ✅ Done |
| Phase 2 | Data + calibration | ✅ Done |
| Phase 3 | RL market maker | ✅ Done |
| Phase 4 | C++ performance layer | ✅ Done |
| Phase 5 | Visualization | ✅ Done |
| Phase 6 | Packaging + publication | ✅ Done |
Project spec
See PROJECT_SPEC.txt for the full vision, market gap, build phases, and interview talking points.
License
MIT © Satyam Das
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lumina_lob-0.1.4.tar.gz.
File metadata
- Download URL: lumina_lob-0.1.4.tar.gz
- Upload date:
- Size: 266.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2b87f874952ee8781f410becf4706e8b96a9e952def965e43512413940ce993
|
|
| MD5 |
97bc3170f5ccb79db7e12d07894a56e0
|
|
| BLAKE2b-256 |
28be96ef64eceef9606c51abc26db2b7567ac1ca7d1087f3ba3e5394135c020f
|
Provenance
The following attestation bundles were made for lumina_lob-0.1.4.tar.gz:
Publisher:
build.yml on satyamdas03/lumina-lob
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumina_lob-0.1.4.tar.gz -
Subject digest:
c2b87f874952ee8781f410becf4706e8b96a9e952def965e43512413940ce993 - Sigstore transparency entry: 2093096373
- Sigstore integration time:
-
Permalink:
satyamdas03/lumina-lob@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/satyamdas03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lumina_lob-0.1.4-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: lumina_lob-0.1.4-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 188.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2dadfd88990265e0d269753abefc4fe5b2db3c5a48b1ca6ca51779afb7e9a31
|
|
| MD5 |
c543a57567f54249be2f73d1ce4d9dc3
|
|
| BLAKE2b-256 |
f487e315ef53973ee471f27c9ddfcd001bcd86efe236087ae292f2fa4263f532
|
Provenance
The following attestation bundles were made for lumina_lob-0.1.4-cp313-cp313-win_amd64.whl:
Publisher:
build.yml on satyamdas03/lumina-lob
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumina_lob-0.1.4-cp313-cp313-win_amd64.whl -
Subject digest:
a2dadfd88990265e0d269753abefc4fe5b2db3c5a48b1ca6ca51779afb7e9a31 - Sigstore transparency entry: 2093096641
- Sigstore integration time:
-
Permalink:
satyamdas03/lumina-lob@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/satyamdas03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lumina_lob-0.1.4-cp313-cp313-macosx_10_14_universal2.whl.
File metadata
- Download URL: lumina_lob-0.1.4-cp313-cp313-macosx_10_14_universal2.whl
- Upload date:
- Size: 358.8 kB
- Tags: CPython 3.13, macOS 10.14+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f0658e497ee34ae2333a054d3d2bd473a87c49ce81daa7e3336d5285413e89f
|
|
| MD5 |
2e5c8616ea220b607196d5e3cc8bf9eb
|
|
| BLAKE2b-256 |
47651d3f5a10ea03da6825b2087b8a30bf73118dbddfa8733db975ea4c1669a9
|
Provenance
The following attestation bundles were made for lumina_lob-0.1.4-cp313-cp313-macosx_10_14_universal2.whl:
Publisher:
build.yml on satyamdas03/lumina-lob
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumina_lob-0.1.4-cp313-cp313-macosx_10_14_universal2.whl -
Subject digest:
1f0658e497ee34ae2333a054d3d2bd473a87c49ce81daa7e3336d5285413e89f - Sigstore transparency entry: 2093096573
- Sigstore integration time:
-
Permalink:
satyamdas03/lumina-lob@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/satyamdas03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lumina_lob-0.1.4-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: lumina_lob-0.1.4-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 188.4 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cfb6df9c9b76059a4bb87a894c018f59c8b4d8e374e62b119e4f556e010ce9a
|
|
| MD5 |
48add987c494a6e46403e1fe39d0159d
|
|
| BLAKE2b-256 |
8178f128393820ec5e3cbe02ba3002b2a8ccc694d20096b95613fa20a42feb69
|
Provenance
The following attestation bundles were made for lumina_lob-0.1.4-cp312-cp312-win_amd64.whl:
Publisher:
build.yml on satyamdas03/lumina-lob
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumina_lob-0.1.4-cp312-cp312-win_amd64.whl -
Subject digest:
6cfb6df9c9b76059a4bb87a894c018f59c8b4d8e374e62b119e4f556e010ce9a - Sigstore transparency entry: 2093096464
- Sigstore integration time:
-
Permalink:
satyamdas03/lumina-lob@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/satyamdas03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lumina_lob-0.1.4-cp312-cp312-macosx_10_14_universal2.whl.
File metadata
- Download URL: lumina_lob-0.1.4-cp312-cp312-macosx_10_14_universal2.whl
- Upload date:
- Size: 362.9 kB
- Tags: CPython 3.12, macOS 10.14+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f91b3fc972d16c16cd5a5dcc814f8599ab85fd0ed40b04159c245a38319df908
|
|
| MD5 |
d5fd10b9c3d08194bc2b7d93c820afd1
|
|
| BLAKE2b-256 |
c92d9fe77e1af880f8f7b65171f9e37f75722409a0fb409df005b25380633d9a
|
Provenance
The following attestation bundles were made for lumina_lob-0.1.4-cp312-cp312-macosx_10_14_universal2.whl:
Publisher:
build.yml on satyamdas03/lumina-lob
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumina_lob-0.1.4-cp312-cp312-macosx_10_14_universal2.whl -
Subject digest:
f91b3fc972d16c16cd5a5dcc814f8599ab85fd0ed40b04159c245a38319df908 - Sigstore transparency entry: 2093096867
- Sigstore integration time:
-
Permalink:
satyamdas03/lumina-lob@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/satyamdas03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lumina_lob-0.1.4-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: lumina_lob-0.1.4-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 186.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2eb27ba0d97eb5f2016d326cad5270e23bf7aba6ad535de61388c6b0c272c31
|
|
| MD5 |
40e0e81a3e96e8d7a60a9c54ac0281d6
|
|
| BLAKE2b-256 |
076abdf0eb6538b3f533c85335fd879b1769ac960f407feee0221f2493a27cdd
|
Provenance
The following attestation bundles were made for lumina_lob-0.1.4-cp311-cp311-win_amd64.whl:
Publisher:
build.yml on satyamdas03/lumina-lob
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumina_lob-0.1.4-cp311-cp311-win_amd64.whl -
Subject digest:
b2eb27ba0d97eb5f2016d326cad5270e23bf7aba6ad535de61388c6b0c272c31 - Sigstore transparency entry: 2093096734
- Sigstore integration time:
-
Permalink:
satyamdas03/lumina-lob@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/satyamdas03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lumina_lob-0.1.4-cp311-cp311-macosx_10_14_universal2.whl.
File metadata
- Download URL: lumina_lob-0.1.4-cp311-cp311-macosx_10_14_universal2.whl
- Upload date:
- Size: 355.7 kB
- Tags: CPython 3.11, macOS 10.14+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e35e3a4aa59c6ee4eeada1df7e967774b4f7af27e4a63a52ea66895284c0b092
|
|
| MD5 |
ab64327a413d89ef4514f3b9d491974f
|
|
| BLAKE2b-256 |
746e41dccedbd93dea64857146e427ff320c625e795147e0d797b57467e0a4df
|
Provenance
The following attestation bundles were made for lumina_lob-0.1.4-cp311-cp311-macosx_10_14_universal2.whl:
Publisher:
build.yml on satyamdas03/lumina-lob
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumina_lob-0.1.4-cp311-cp311-macosx_10_14_universal2.whl -
Subject digest:
e35e3a4aa59c6ee4eeada1df7e967774b4f7af27e4a63a52ea66895284c0b092 - Sigstore transparency entry: 2093096959
- Sigstore integration time:
-
Permalink:
satyamdas03/lumina-lob@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/satyamdas03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@d9b31ec0a8c7a925621c9f43050e6160db9d0e13 -
Trigger Event:
push
-
Statement type: