Docs › MTS Lab
MTS Lab quick start
Install MTS Lab, open it, create a project from the example, run your first experiment and read its report — about ten minutes on Linux.
1 · Install
MTS Lab runs natively on Linux x86-64: RHEL, Rocky and Alma 8 and 9, Ubuntu 20.04 or newer, Debian 11 or newer. It installs for your user only; no root. On macOS, Windows or another Linux, use Docker.
curl -LO https://priorstates.com/download/mtslab/mtslab-0.4.1-49-linux-x86_64.tar.gz tar -xzf mtslab-0.4.1-49-linux-x86_64.tar.gz && cd mtslab-0.4.1-49-linux-x86_64 ./install.sh
The installer copies the app to ~/.local/share/mtslab, adds the mtslab command to ~/.local/bin and an MTS Lab entry to your applications menu, runs the engine's self-test, and tells you what your computer is missing:
- Python 3.9 or newer — required; the installer picks the newest one it finds (on RHEL / Rocky 8, whose
python3is 3.6, installpython3.11first). Research steps use numpy and pandas; notebooks run as steps need nbclient, nbformat and ipykernel (MTS Lab offers to install those when a step needs them). - g++ (C++17) — to build your own components and strategies. git — every project is a git repository.
- Claude Code, signed in — for the AI agent. Everything else works without it.
Upgrading is the same three lines with the new file: a running MTS Lab is restarted on the new version and its window reloads. ~/.local/share/mtslab/current/standalone/uninstall.sh removes the app; your work in ~/MTS Lab stays.
Or in Docker
The same download carries a Docker setup for macOS (Docker Desktop), Windows (Docker Desktop, from Git Bash or WSL) and any Linux. From the unpacked folder:
./mtslab-docker # builds the image once (a few minutes), starts MTS Lab, opens http://127.0.0.1:8920 ./mtslab-docker login # once: sign Claude Code in inside the container, for the agent (then /login) ./mtslab-docker stop | logs | shell | rebuild
The image has Python with numpy, pandas, scikit-learn and JupyterLab, g++, git and Claude Code. The container runs as you, reachable from this computer only (127.0.0.1:8920, JupyterLab on 8931); your work stays in ~/MTS Lab on your computer, and Claude Code's sign-in in the Docker volume mtslab-home. MTSLAB_SSH=1 ./mtslab-docker also gives it your ~/.ssh, read-only, to open servers' workspaces from it. On Apple silicon the x86-64 engine runs under emulation, slower; VS Code buttons do not reach into the container (use VS Code's Dev Containers to attach).
2 · Open it
mtslab
Or open MTS Lab from your menu. It starts in the background (on 127.0.0.1:8920, this computer only) and opens in a window of its own. Your work lives in the workspace folder ~/MTS Lab: projects, libraries, data, instruments.
Other commands: mtslab start (no window — for a server), mtslab serve (in the foreground, for systemd or to watch the log), mtslab stop, mtslab status, mtslab version. Options: --port N, --workspace DIR.
3 · Your first project
On the home page, Projects tab: type a name (say leadlag), keep the template leadlag, press Create. The project opens: files on the left, the editor in the middle, Steps · History · Agent on the right.
The template is a complete small study: does one venue's price lead another's, and does a market maker that leans on that forecast do better? It brings what it needs into your workspace — two instruments and three days of synthetic data (nobody's market data; the leader leads by 20 seconds, so the effect is easy to find).
Its steps
vargen builds the variables and records their values over the data · parity checks the engine's values against the Python research features · fit fits an elastic net on the earlier days · sim backtests the maker with and without the model on the held-out day · notebook runs the research notebook.
Its files
config.py settings · vargen.py fit.py sim.py parity.py the steps · features.py the research features · strategies/maker.cpp the strategy · variables/trade_flow.cpp a custom variable · notebooks/ · project.json the steps' list.
4 · Run an experiment
In Steps, give it a title (what this run tries) and, if you like, a hypothesis (what you expect, and what would show you are wrong). Leave every step ticked, Run on this computer, and press Run experiment. It takes about a minute.
The Lab snapshots the project's code (uncommitted edits included), runs the steps from that snapshot in order, and keeps each step's outputs, numbers, charts and log. You can keep editing meanwhile: the running experiment never sees your later edits.
5 · Read the report
Press Experiments and click your experiment. Each step shows its numbers (r² in sample, on validation and held out; P&L, fills, fees), its tables and charts (feature weights, calibration, daily P&L, drawdown, intraday P&L of the baseline and the model), and its per-day runs: for every day, the generated cfg, the engine's log and the fills or values — open one and step through days with ◀ ▶.
Set a verdict (winner, loser, inconclusive) with a line on what it showed. Change something — a horizon in config.py, a feature in vargen.py — run again, then tick both experiments and press Compare: the code diff, the metrics side by side, the curves overlaid.
Next
- Projects and experiments — how a project is laid out, the
mtslabPython library, reuse and rerun, servers and clusters. - Components and libraries — the engine's building blocks, your own C++ classes, a quant library shared by projects.
- Notebooks and editors — JupyterLab, VS Code, and turning a notebook into engine code with a parity check.
- The agent · Your data · Servers and workspaces