Command-line research
Everything in the gauntlet and the multi-instrument engines is
available as a command, for scripting and unattended research. Run from backend/ with
uv run python -m <module> …. The registry imports fresh each invocation, so a brand-new strategy file
works without restarting the worker. CLI runs write the same BacktestRun rows the UI does, so
results show up on the Backtests and Research tabs.
The full ladder, one command
Section titled “The full ladder, one command”uv run python -m ats.research --strategy ibs_reversion --symbols SPY,TLT,GLDRuns the whole evidence ladder for a strategy: rule test → split optimize (train window only) → WFO → a final run feeding the deflated Sharpe. For an intraday strategy, point it at the intraday catalog and charge the measured spread:
uv run python -m ats.research --strategy intraday_orb --symbols QQQ,SPY,DIA \ --bar-spec 1-MINUTE-LAST --slippage-bps auto --start 2023-04-01 --end 2026-06-12--slippage-bps auto resolves to each name’s measured half-spread (daily runs default to 0,
byte-identical).
The unattended sweep
Section titled “The unattended sweep”uv run python -m ats.sweepRuns a cheap rule-test screen across the whole basket and both timeframes, then the deep gauntlet on the survivors, and prints a ready-first leaderboard. It publishes progress + ETA to Redis, which the UI shows as a sweep progress bar. This is the “test lots of strategies, walk away” command.
The engines
Section titled “The engines”| Command | What it does | Doc |
|---|---|---|
python -m ats.research |
The full single-instrument ladder | the gauntlet |
python -m ats.sweep |
Adaptive, unattended screen + gauntlet across the basket | above |
python -m ats.cross_sectional |
Cross-sectional rank/hold over a universe | multi-instrument |
python -m ats.intraday_relval |
Session-aware intraday relative value | multi-instrument |
python -m ats.pairs |
A cointegrated pair (with hedge β options) | multi-instrument |
python -m ats.pair_screen |
Discover cointegrated pair candidates | multi-instrument |
python -m ats.portfolio |
Blend validated sleeves | multi-instrument |
python -m ats.portfolio_search |
Search subsets × allocators for held-out Sharpe | multi-instrument |
python -m ats.book |
Faithful shared-account book backtest | multi-instrument |
python -m ats.overnight |
Overnight-effect study | — |
python -m ats.paper / ats.live |
The paper / live trading runners | paper, live |
python -m ats.crypto_paper |
The local crypto paper simulator | paper |
Admin & account CLI (ats.cli)
Section titled “Admin & account CLI (ats.cli)”python -m ats.cli <command> handles account and operational tasks (run from backend/):
| Command | What it does |
|---|---|
create-user --username <you> |
Create the single dashboard account (prompts for a password). |
reset-password --username <you> |
Set a new password (the login screen’s “Forgot password?” points here). |
alert-test |
Send a test Telegram alert using the .env credentials. |
approve-live --strategy <key> --instrument <id> --note "…" |
Record the audited go-live sign-off (the live runner refuses to start without it). See live trading. |
revoke-live --strategy <key> --instrument <id> |
Remove a go-live approval. |
ingest --symbol <sym> … |
Pull daily bars from Tiingo into the catalog (CLI ingest). |
Related
Section titled “Related”- The research ladder — where CLI results surface as readiness scores.
- Writing a strategy — add a strategy, then run the ladder on it.