Trader — Hybrid Swing-Trading Bot

Quant strategies propose, Claude reviews and writes the why, I approve from my phone — with hard risk limits nobody can override.

PythonFastAPIAPSchedulerSQLitealpaca-pyClaudeDocker
Trader overview dashboard — equity vs SPY, holdings, and stats (values obscured)Day-trader experiment dashboard — equity vs control and per-trade P/L (values obscured)

I'm building two trading systems. The split is simple: the code handles the discipline, I handle the judgment, and the risk checks apply to both of us.

Trader proposal and approval flow

The swing trader

A Python monolith (FastAPI + APScheduler + SQLite + alpaca-py) that trades liquid US large caps and ETFs at swing pace — holds of days to weeks, so a few decisions a day instead of a thousand.

  • Strategies propose. Classic, backtestable quant rules — an ETF momentum rotation and a mega-cap mean-reversion strategy — generate the trade candidates. No LLM dreams up trades.
  • Hard risk limits. Position sizing, exposure caps, and drawdown limits are enforced in code. The strategy can't bypass them, the LLM can't, and neither can I.
  • Claude is the reviewer, not the signal. Every candidate passes through an LLM sanity layer that checks the context rules can't see (earnings this week? strange news?) and writes a plain-English rationale that's stored with the trade. Every position has a "why" on record.
  • I approve from my phone. A self-hosted push server sends each proposal over the VPN with Approve / Reject buttons. Individual strategies can be promoted to full-auto once they've earned trust.
  • Backtest parity. Instead of a backtesting framework with its own separate code path, a ~250-line simulator runs the exact same strategy classes as live trading, on consolidated-tape historical data with split and dividend adjustment. Whatever backtested is the code that actually trades. Walk-forward evaluation included.

It runs paper-first against Alpaca; the live account (at half-size positions for the first month) waits behind an explicit go-live gate. The dashboard benchmarks everything against just holding SPY, which keeps me honest about whether any of this is worth doing.

The day-trading sandbox

A second, separate intraday engine — its own session manager, bar store, and reporting — for experimenting at a faster timescale under the same philosophy. It's an experiment, and it stays on paper for now.