
An autonomous agent that trades single-leg long 0DTE options on SPY, QQQ and IWM through Alpaca - and turned a fresh $100,000 paper account into $179,087 in three trading sessions. Every risk control in this agent earned its place against a year of real Alpaca OPRA option bars: 264 sessions, 4,544 alerts. What didn't survive that test isn't in the code. Max loss is capped by construction. A single-leg long option can only lose the premium paid - a ceiling set by the instrument, not by code that has to remember. Above it sits a deterministic gate stack: one open lot per symbol and direction, a 30-minute entry-anchored dedup, a per-scan entry cap, sizing that trims to the account's real options buying power so an expensive contract sizes down instead of rejecting, and a hard 15:50 ET flatten so a 0DTE never reaches expiry. Exits ladder in both directions: scale out half at +40% and trail the runner by 40% of its peak gain; sell half at -20% and the rest at -40%. A 30-minute stop closes anything still under water. 175 network-free tests cover the scorer, gates, sizing and execution. Orders go through the Alpaca CLI rather than the SDK, so the agent books the real broker fill instead of a quote. Before placing anything it verifies `alpaca doctor` resolves the paper endpoint, and reconciles ambiguous submits by client order ID before resubmitting, so a stalled order is never duplicated or orphaned. Market data comes from the Alpaca Market Data API. It runs unattended as an isolated Docker container, one session per weekday, no human in the loop. It also ships a Claude reasoning layer scoped as a veto: it argues bull and bear over the scored facts and can remove a trade, never add one - an AI structurally incapable of increasing risk. Every scan writes one JSONL record with the full reasoning: score, each signal, band state, gate verdict, risk verdict, order. Most agents show you the trades they took. This one shows you the trades it refused, and why.
4 Sep 2026