AI & Automation
Guarded Trading Agent
An AI research agent that was never trusted to trade
An experiment in whether an AI research agent could match the market if it was never allowed to execute. The AI proposed trades as validated JSON; deterministic code enforced risk limits and traded a paper account. It missed the bar I set, so I shut it down.
- Status
- Retired August 2026
- Period
- May – August 2026
- Role
- Sole designer and developer
- Built with
- Python · OpenAI Codex · Alpaca API (paper) · SQLite · PowerShell
The problem
Could an AI research agent match or beat the S&P 500 on a risk-adjusted basis at a tolerable drawdown, if it was never trusted to place a trade itself? I set that as the success criterion on day one, with an explicit instruction to shut it off if it failed.
How it works
- 01Research
An AI agent studies the market and writes a proposal.
- 02Validate
Proposals must parse against a strict JSON schema or they are dropped.
- 03Risk gate
A deterministic runner enforces position, drawdown, and churn limits.
- 04Paper account
Approved orders execute against a simulated brokerage account only.
- 05Evaluate
An audit ledger and benchmark comparison against SPY and QQQ.
Design decisions
Separate thinking from doing
The model never held execution rights. Everything it produced was a proposal that trusted code could reject.
Deployment gates over enthusiasm
A strategy had to pass walk-forward replay gates before it received any allocation.
A watchdog for the automation
A scheduler watchdog detected stale runs and restarted them, and was the first thing disabled at shutdown so it could not revive the rest.
Where it stands
Across its whole life, the strategy sleeve passed 0 of 194 deployment-gate evaluations. The governed period returned +0.92% with a 2.62% maximum drawdown; over an aligned 30-day window the whole book returned −3.07% against SPY’s +3.41%.
Research was also using a disproportionate share of my model budget. I retired it on August 7, 2026, a month before its scheduled evaluation. Code, data, and logs are preserved.
What I learned
- Write the kill criterion before you start. It made shutting this down a decision instead of a debate.
- The gate working is a result. Zero of 194 means an unproven strategy never touched even simulated capital.
- Model cost is a performance metric, not overhead.