Work/Autonomous Agents

Recursive Momentum Trader

Claude agents autonomously research a regime-routed stock model

Typeexperiment
Statusin-progress
Updated2026-06-16
Commits77
SourcePrivate

What it is

A regime-routed momentum system: a frozen weekly state machine over SPY labels every week bear, flat or bull and routes it to that regime's ranking model. A PowerShell controller runs one Claude Code research agent per lane per round, each in its own git worktree, and verifies every candidate on randomized and chronological panels before anything merges.

The problem

Hand-run strategy research is slow and overfits; this automates hypothesis, test and verification under guardrails against lookahead and curve-fitting.

How it works

  1. Frozen regime classifier calibrated on ^GSPC 1927-2026; dispatch facades route each week to a per-lane model package
  2. loop.ps1 launches a Claude agent per lane in separate worktrees, with protected paths (controller, backend facades) the agents cannot edit
  3. Controller-only evaluation: lookahead sentinel, deterministic seeded folds, non-overlapping chronological blocks, and a joint re-test of same-round winners because transition costs couple the lanes
  4. 190+ recorded improvement runs, point-in-time S&P 500 constituents and a market-cap data pipeline
  5. React/KaTeX dashboard with per-lane formulas, FastAPI backend, static Vercel deploy

Stack

PythonpandasNumPyFastAPIReactTypeScriptKaTeXClaude CodePowerShellyfinance

Disciplines

For your business

Autonomous research loops where AI agents propose, test and verify improvements under deterministic guardrails.