Skip to content
SenseiIsseiPublic

About

Paper-first trading cockpit with a research lab that counts every try. Rust engine, desktop app for Windows, macOS and Linux, web UI and CLI.

Topics

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

899 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pythia

English · Deutsch · 简体中文 · 日本語 · 한국어 · Español · Français · Português

Pythia is a trading cockpit that starts on paper and stays there until a strategy has earned more. It has a Rust engine, a desktop app and a web UI on top of it, and a research lab in Python that decides what the engine may trade. The lab counts every idea it ever tried, so a lucky backtest does not get through.

No strategy in here is known to be profitable. Read SAFETY.md before you connect a real account.

Home screen Autopilot screen

Screenshots from a development build with sample data.

Download

The latest release has:

Platform File
Windows Pythia_<version>_x64-setup.exe
macOS (Apple silicon and Intel) Pythia_<version>_universal.dmg
Linux .AppImage, .deb or .rpm
Command line pythia-cli-<version>-<platform>: pythia and the headless engine pythia-server, see cli/README.md

The builds are not code-signed yet. Windows asks once (More info, then Run anyway); on macOS, right-click the app and choose Open the first time.

What it does

  • An autopilot is an amount of money that trades one strategy on its own until you stop it or a stop rule fires. Several run side by side, each measured against BTC.
  • Crypto, US shares and ETFs trade on the Alpaca paper account. The long/short books trade perps on paper, or on a Bybit demo account if you add demo keys.
  • The risk manager sits in front of every order: kill switch, daily loss and drawdown limits, exposure caps, volatility targeting. If something is unclear, it refuses.
  • Every study in the lab is written down before its first run, tested out of sample after costs, and its Sharpe is deflated by the number of trials so far.
  • Models (volatility, coin ranking, return quantiles) are trained in the lab and served by the engine. They run in shadow before they can affect a trade.
  • Alerts go to Telegram or any webhook, in English or German.

Architecture

Pythia: UI on top, the Rust engine, the research lab and recorder, the markets at the bottom

A lab book only reaches an autopilot together with its evidence. The auto pick ranks books by that evidence and by their forward record, and an experimental book only runs where an autopilot asks for it by name.

Results so far

All numbers come from the lab's result files or the engine's own records. scripts/readme_charts.py draws every chart below and names its sources.

Out-of-sample Sharpe of the tested strategies against BTC, gated BTC and the noise bar

The best book is a Donchian breakout on the ten most liquid coins: Sharpe 1.17 since 2024, against 0.74 for holding BTC. It still does not pass deflation. With 1,836 trials counted, the best of that many pure-noise strategies would show about 2.69.

Two perps long/short studies passed their registered tests (the M4 residual and a funding carry). Neither survives deflation, so both run as experiments only. Most of the momentum books turn out to be BTC's 200-day filter in disguise: on days the filter is off, all of them lose money.

Forward record of the paper autopilots since 15 October 2026 against BTC

The paper autopilots started on 15 October 2026. After six days the main auto pick is up 0.48 % and BTC is up 3.22 %. That is far too short to mean anything; the chart is here so the record is public from day one.

Trial pool growth and the verdict of every study

69 studies so far: 43 failed or were stopped, 7 run on paper as labelled experiments, 2 passed as registered without confirmation, 5 produced a model that beats its baseline. Every verdict is listed in research/lab/README.md.

Sharpe per year for the books that still run

To redraw the charts:

pip install matplotlib
PYTHIA_DATA=/path/to/lab/data python scripts/readme_charts.py

Without PYTHIA_DATA the forward chart is skipped.

Getting started

You need Node.js (current LTS), Rust 1.85 or newer and, for the lab, Python 3.

Desktop app:

npm install
npm run tauri dev
npm run tauri build

Server and web UI:

cp .env.example .env
npm run server
echo "VITE_PYTHIA_SERVER=http://localhost:8787" > .env.local
npm run dev

The server listens on 127.0.0.1:8787 (PYTHIA_BIND changes it). Keys in .env are optional; without them everything stays on paper. Without VITE_PYTHIA_SERVER the web UI runs a small paper engine in the browser.

Research lab:

cd research/lab
python -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
python -m pytest tests

The data comes from the recorder in research/recorder and its history backfill. research/lab/README.md lists every study, research/ops/README.md the scheduled jobs.

Checks:

npm run check
npm run preflight
npm run security:scan

Install the pre-commit hook once per clone, so no secret, address or personal path reaches a commit: git config core.hooksPath scripts/hooks (or npm run hooks:install).

On Windows the npm scripts remove CC and CXX from the environment, because paths with spaces break native Rust builds.

Layout

Path Contents
crates/pythia-core Engine: strategies, risk, autopilots, execution, venues, forecasts, alerts
crates/pythia-ml Model inference (LightGBM, ONNX) with parity tests against the lab
server HTTP and WebSocket server over the engine
cli pythia command line
src-tauri Desktop app
src React UI
research/lab Studies, models, paper books, strategy factory
research/recorder Market data recorder and history backfill
research/ops Job table, health checks, deploy scripts
docs Runbooks for demo trading, live runs, alerts, models, the Claude API and the readiness rule

Safety

  • A fresh install trades nothing real. Autopilots start on paper or on a venue's demo account.
  • Live trading needs your own keys and a typed confirmation per venue. Nothing arms itself.
  • Keys live in the OS keychain or the server's environment and are never logged or sent to the UI.
  • Pythia has no withdrawal, deposit or transfer function. Give API keys trade permission only.
  • Crypto spot is long only, shorts exist only on perps, Polymarket is read only.

SAFETY.md has the full list. Security issues go through SECURITY.md.

License

MIT. Market data from Alpaca, Binance, Kraken, Bybit, OKX, Coinbase, Deribit, DefiLlama, Polymarket and SEC EDGAR; each source's terms apply to its data. If Pythia is useful to you, you can support it on Ko-fi.

About

Paper-first trading cockpit with a research lab that counts every try. Rust engine, desktop app for Windows, macOS and Linux, web UI and CLI.

Topics

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages