Project case study

Capital Agent

A small-account, PDT-aware Alpaca paper-trading research platform built around a spec-driven risk and strategy pipeline.

Problem

Small-account equity trading needs guardrails a spreadsheet can't give you: pattern-day-trading limits, a real risk manager, and a hard boundary between an agent that can propose a trade and the one broker-adapter path allowed to submit one. Capital Agent was that research platform — a small-account, PDT-aware Alpaca paper-trading lab built around a spec-driven constitution as its governing source of truth.

Approach

Signals from a watchlist — including copy-trade, congressional, insider, and catalyst intelligence — fed strategy plugins and a strategy selector, then trade-plan validation, a risk manager, order-plan validation, and finally the single Alpaca paper-broker adapter, with a daily review script closing the loop. Everything ran in paper mode only: live trading stayed disabled behind an explicit environment flag, and agents were restricted to proposing trades, never placing, canceling, or flattening them directly. Development was spec-driven, moving through eleven numbered feature branches covering risk controls, indicator work, an evidence loop, a shadow-RL research lab, and a Codex market supervisor.

Outcome

The repo is private. It was last advanced on 2026-06-14, on a branch that never merged to main (main's own last commit was 2026-06-01) — this was the earlier iteration of the small-account Alpaca paper-trading idea; day-to-day iteration since has continued instead in the separate Alpaca Paper-Trading Bots project.