LibreQuant

Open source · Local-first · MIT

The Local-First Workbench
for Algorithmic Alpha.

A Next.js shell that talks to a Jupyter Server on your machine: open notebooks, browse the library, and edit strategy packages—without shipping your code to a hosted runtime.

The Assistant organizes the workbench; you stay the Architect of signal logic, environment, and how you validate ideas.

Python Jupyter Docker Next.js

Design principles

Three pillars

Jupyter-native execution

Python runs in the notebook kernel (Docker by default). The app uses the standard Jupyter protocol for files, kernels, and cells—familiar tooling, local process.

Local custody

Notebooks and strategies live in your Jupyter workspace (e.g. Docker volume). You hold the token and filesystem layout—the app is not a hosted black box.

One workbench shell

Notebook library, strategy tree, and Python editor in one routed UI—so you move between research artifacts without juggling disconnected tools.

Notebooks & kernel

Open and save .ipynb files through the Jupyter Contents API, run cells, and manage the session from the workbench toolbar.

Strategy library

Create and edit strategy packages on the server; new modules include a PARAMS dict and signal stub so notebooks can import from the shared PYTHONPATH.

Strategy template

1 PARAMS = {
2     "lookback": 20,
3 }
4
5 def signal(prices):
6     # Your signal logic — run from a notebook cell

Quick start

Fastest path: clone the repo and bring up Jupyter with Docker Compose, then run the Next.js app from librequant/ (see the repo README for the one-command dev stack).

# Clone
git clone https://github.com/tompcurran/LibreQuant.git
cd LibreQuant

# Jupyter (repo root)
docker compose up -d

# App — from librequant/
cd librequant && npm install && npm run dev:stack

See librequant/README.md for environment variables, security notes, and configuration.

FAQ

How is this different from JupyterLab alone?
JupyterLab already runs kernels and files. LibreQuant adds a focused Next.js UI: notebook library routes, a strategy file tree, loading states for Jupyter connectivity, and helpers that align PYTHONPATH with your compose layout—so you spend less time wiring paths and tabs by hand.
Where does code run?
Notebook cells execute in the Jupyter kernel (typically inside the Docker container on your machine). The browser shell does not replace the kernel—it connects to it over the standard Jupyter HTTP and WebSocket APIs.
What about risk and backtests?
The workbench does not validate trading performance for you. Any P&L or risk analysis is whatever you implement in notebooks and libraries—never treat an experiment as production-ready without your own checks and out-of-sample discipline.