THE DESKRESEARCH
Bot architecture

From research to execution.

Eleven setup modules — one per vetted trader's strategy — wired through a regime classifier, a risk manager, and an execution engine, with a Steenbarger-shaped journal feeding a live dashboard.

The research drives a trading bot. Every strategy module traces back to a vetted trader. The 11 modules live in bot/lib/setups/; each uses a shared precompute() hook so scan() is O(1) per bar — the runner walks ~2,700 bars × 25 symbols × 11 strategies in seconds.

Platform stack

LayerChoiceWhy
Research / backtest / liveQuantConnect (LEAN, Python)Same code runs backtest and live; 20+ years tick data included
Broker — equities / optionsInteractive Brokers ProDMA, sub-penny commissions, full API
Broker — futuresTradovateCheap micro-futures for Raschke / index-futures modules
Options / GEX dataSpotGamma or MenthorQKarsan's dealer-positioning feed
Second-source dataPolygon.ioCorroboration + news timestamping for Episodic Pivot
DashboardVercel + static HTMLHuman-facing cockpit — not the bot itself

Strategy → trader mapping (all 11 implemented)

Setup moduleTraderSideNotes
minervini_sepaMark MinerviniLongTrend Template + VCP pivot break on volume surge
kullamaggie_breakoutKristjan KullamägiLong30–100%+ leader run, 2–8 week tight base, rising 10/20-EMA, volume breakout
kullamaggie_episodic_pivotKristjan KullamägiLong10%+ catalyst-gap proxy, exceptional volume, sideways/neglected prior base
kullamaggie_parabolic_shortKristjan KullamägiShort50–100%+ climax run, 3–5+ up days, topping failure into 10/20-MA target
shannon_avwapBrian Shannon, CMTLongAVWAP reclaim from confirmed swing low + MTF alignment
raschke_holy_grailLinda RaschkeBothADX(14) > 30 + 20-EMA pullback + resumption
raschke_turtle_soupLinda RaschkeBothFailed 20-day Donchian breakout — fade back into range
raschke_80_20Linda RaschkeBothRange-edge close + next-day probe-and-reverse
brandt_classicalPeter L. BrandtBothDouble bottom / double top neckline break (semi-auto in prod)
bruzzese_rsVincent BruzzeseBothSPY-regime gate × cumulative RS vs SPY × prior-extreme break
karsan_gexCem KarsanBothRealized-vol regime proxy → fade or continue large daily moves

Meta-layers

Three traders don't generate signals but shape the infrastructure:

  • Dr. Brett Steenbarger → the journal / report-card framework in lib/journal/ — auto-logged process score, rule violations, and the daily narrative.
  • Lance Breitstein & Tom Hougaard → the risk manager's hard-coded discipline rules (per-trade cap, daily loss cap, drawdown kill-switch) so the bot enforces what a human trader can't reliably enforce mid-session.
  • Vincent Bruzzese's walk-away analysis — MFE / MAE vs actual exit, surfaced per trade.

Deliberately NOT automated

  • Breitstein's A+ capitulation fades. Pure tape-reading; attempting to code it produces the canonical "bot shorts the bottom tick" disaster.
  • Hougaard's discretionary size-ups. His edge is psychological — coding "when I feel conviction, 3x size" cannot work.

System flow

                        ┌─────────────────────────────┐
                        │  DATA LAYER                 │
   broker feeds ──────► │  - price (QC + Polygon)     │
   SpotGamma ─────────► │  - fundamentals             │
   news APIs ─────────► │  - options chain / GEX      │
                        └──────────────┬──────────────┘
                                       ▼
                        ┌─────────────────────────────┐
                        │  UNIVERSE + REGIME          │
                        │  - Minervini Trend Template │
                        │  - Bruzzese RS table        │
                        │  - SPY regime + GEX regime  │
                        └──────────────┬──────────────┘
                                       ▼
             ┌───────────────── SETUP MODULES ────────────────┐
             │  Minervini · Kullamägi · Shannon · Raschke    │
             │  Brandt · Bruzzese · Karsan                   │
             └──────────────┬──────────────────┬──────────────┘
                            ▼                  ▼
                 ┌──────────────────┐  ┌────────────────────┐
                 │ RISK MANAGER     │  │ STRATEGY ALLOCATOR │
                 │ (Hougaard/       │◄►│ (regime-weighted)  │
                 │  Breitstein)     │  └────────────────────┘
                 └─────────┬────────┘
                           ▼
                 ┌──────────────────┐
                 │ EXECUTION ENGINE │   →   IBKR / Tradovate
                 └─────────┬────────┘
                           ▼
                 ┌──────────────────┐  ┌────────────────────┐
                 │ JOURNAL          │─►│ DASHBOARD          │
                 │ (Steenbarger)    │  │ (live cockpit)     │
                 └──────────────────┘  └────────────────────┘

Promotion pipeline

A strategy doesn't reach live capital by decree. Three gates:

  1. Backtest vetting. The per-config YAML (bot/backtests/configs/) defines CAGR / Sharpe / max-drawdown / profit-factor thresholds, tuned to each trader's known characteristics — lower Sharpe for Kullamägi's asymmetric method, higher for Minervini's systematic one. A backtest that fails regime-conditional expectancy (positive in only one of three SPY regimes) is rejected as a single-regime overfit.
  2. Paper trading. Passed strategies run on IBKR paper for 90 days without intervention before live capital.
  3. Live capital. Starts at $10k per strategy. Expands only on evidence.