Skip to main content

Lumina LOB

CI

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)

  1. Log in to pypi.org as satyamdas03.
  2. Go to Account settings → Publishing.
  3. Add a new pending publisher:
    • PyPI project name: lumina-lob
    • Owner: satyamdas03
    • Repository name: lumina-lob
    • Workflow name: build.yml
    • Environment name: pypi
  4. Save. The next push of a v*.*.* tag will automatically publish.
  5. The v0.1.1 tag is already pushed; after configuring the publisher, re-run the failed Build wheels workflow run or push a new v*.*.* 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

Release files for lumina-lob 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lumina-lob 0.1.4
File Size Uploaded
lumina_lob-0.1.4.tar.gz 266.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for lumina-lob 0.1.4
File
lumina_lob-0.1.4-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
lumina_lob-0.1.4-cp313-cp313-macosx_10_14_universal2.whl CPython 3.13 CPython 3.13 macOS 10.14+ universal2 (ARM64, x86-64) Details
lumina_lob-0.1.4-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
lumina_lob-0.1.4-cp312-cp312-macosx_10_14_universal2.whl CPython 3.12 CPython 3.12 macOS 10.14+ universal2 (ARM64, x86-64) Details
lumina_lob-0.1.4-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
lumina_lob-0.1.4-cp311-cp311-macosx_10_14_universal2.whl CPython 3.11 CPython 3.11 macOS 10.14+ universal2 (ARM64, x86-64) Details

Total release size: 1.9 MB

Release files / lumina_lob-0.1.4.tar.gz

Download URL lumina_lob-0.1.4.tar.gz
Size 266.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c2b87f874952ee8781f410becf4706e8b96a9e952def965e43512413940ce993
BLAKE2b-256 checksum
How to use checksums
28be96ef64eceef9606c51abc26db2b7567ac1ca7d1087f3ba3e5394135c020f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / lumina_lob-0.1.4-cp313-cp313-win_amd64.whl

Download URL lumina_lob-0.1.4-cp313-cp313-win_amd64.whl
Size 188.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a2dadfd88990265e0d269753abefc4fe5b2db3c5a48b1ca6ca51779afb7e9a31
BLAKE2b-256 checksum
How to use checksums
f487e315ef53973ee471f27c9ddfcd001bcd86efe236087ae292f2fa4263f532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / lumina_lob-0.1.4-cp313-cp313-macosx_10_14_universal2.whl

Download URL lumina_lob-0.1.4-cp313-cp313-macosx_10_14_universal2.whl
Size 358.8 kB
Tags CPython 3.13 macOS 10.14+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
1f0658e497ee34ae2333a054d3d2bd473a87c49ce81daa7e3336d5285413e89f
BLAKE2b-256 checksum
How to use checksums
47651d3f5a10ea03da6825b2087b8a30bf73118dbddfa8733db975ea4c1669a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / lumina_lob-0.1.4-cp312-cp312-win_amd64.whl

Download URL lumina_lob-0.1.4-cp312-cp312-win_amd64.whl
Size 188.4 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6cfb6df9c9b76059a4bb87a894c018f59c8b4d8e374e62b119e4f556e010ce9a
BLAKE2b-256 checksum
How to use checksums
8178f128393820ec5e3cbe02ba3002b2a8ccc694d20096b95613fa20a42feb69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / lumina_lob-0.1.4-cp312-cp312-macosx_10_14_universal2.whl

Download URL lumina_lob-0.1.4-cp312-cp312-macosx_10_14_universal2.whl
Size 362.9 kB
Tags CPython 3.12 macOS 10.14+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
f91b3fc972d16c16cd5a5dcc814f8599ab85fd0ed40b04159c245a38319df908
BLAKE2b-256 checksum
How to use checksums
c92d9fe77e1af880f8f7b65171f9e37f75722409a0fb409df005b25380633d9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / lumina_lob-0.1.4-cp311-cp311-win_amd64.whl

Download URL lumina_lob-0.1.4-cp311-cp311-win_amd64.whl
Size 186.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b2eb27ba0d97eb5f2016d326cad5270e23bf7aba6ad535de61388c6b0c272c31
BLAKE2b-256 checksum
How to use checksums
076abdf0eb6538b3f533c85335fd879b1769ac960f407feee0221f2493a27cdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / lumina_lob-0.1.4-cp311-cp311-macosx_10_14_universal2.whl

Download URL lumina_lob-0.1.4-cp311-cp311-macosx_10_14_universal2.whl
Size 355.7 kB
Tags CPython 3.11 macOS 10.14+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
e35e3a4aa59c6ee4eeada1df7e967774b4f7af27e4a63a52ea66895284c0b092
BLAKE2b-256 checksum
How to use checksums
746e41dccedbd93dea64857146e427ff320c625e795147e0d797b57467e0a4df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

7 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page