← Coil home
GUIDE

How to automate SOXL/SOXS trading with an AI agent

A practical, honest walkthrough of what it actually takes to run a hands-off semiconductor-ETF strategy through your own AI agent and broker.

Guide · 9 min read · updated June 2026

Automating a SOXL/SOXS strategy with an AI agent is genuinely possible — and most naive attempts lose money. The difference between the two outcomes is almost never the model. It's whether you've done the unglamorous work: a narrow instrument set, entries and exits written as explicit rules, hard risk circuit-breakers, and a backtest harness that proves the logic cold before a single real dollar is at stake. This guide walks through that work conceptually, names the components, and is candid about the parts that are real labor. Coil is offered at the end as the pre-built option that bakes all of it in — but you can build your own from these same pieces.

Nothing here is investment advice or a recommendation to buy or sell anything. SOXL and SOXS are 3x leveraged ETFs: a ~10% move in the semis index is roughly ~30% in the ETF before gaps and slippage. They decay on multi-day holds and can lose rapidly, including total loss of the capital you commit. No agent, rule, or stop removes that — the best they can do is try to reduce single-day damage.

The components you need

A hands-off agentic strategy is not one program; it's a small stack of cooperating parts. Skip any of them and the whole thing gets fragile fast.

  • An AI agent on a schedule. A model like Claude, run as a scheduled session, not an always-on chat. At set times it wakes, gathers data, evaluates rules, and either acts or stands down. The agent operates the strategy; it should not improvise it.
  • A broker connector. A tool interface — commonly an MCP — that lets the agent read positions and place orders through your brokerage. Robinhood works via a broker MCP, and any equivalent broker MCP fits the same slot.
  • A market-data key. Prices and history to decide on, and to backtest against. A free Alpaca data key covers both.
  • A defined rules engine. The actual strategy — entries, exits, sizing — written as deterministic logic the model executes, not as a vibe in a prompt.
  • Risk circuit-breakers. Account-level guardrails that cut size or halt trading when losses mount, independent of whatever the strategy “wants” to do.
  • A backtest harness. A way to replay the rules across past market regimes — honestly, in a fresh process each time — so you can see the logic's behavior before risking money.

The steps, conceptually

1. Pick a narrow instrument set

Resist the urge to trade everything. A tight universe means you can actually understand the behavior, backtest it deeply, and tune it without overfitting noise across dozens of tickers. Coil trades exactly one pair — SOXL (3x long semis) and SOXS (3x inverse) — and nothing else. If you're choosing between the long and inverse side, the mechanics in SOXL vs SOXS are worth reading first; the leverage-decay primer explains why these are short-hold instruments, not buy-and-hold.

2. Define entries and exits as explicit rules

This is where most agent-trading quietly fails. “Buy when it looks strong” is not a rule a model can execute consistently — it's a prompt that drifts. You want thresholds. As a concrete shape: Coil's entry is a “compression-to-ignition” leg-rider — a sustained 2%+ intraday move treated as a short-timeframe reversal inside the prevailing 1-hour trend. Its exits are equally explicit: a 0.8% counter-move soft trail (about 2.4% on the 3x ETF), a 5% hard stop, and a rule that the inverse ETF is never held overnight. The point isn't to copy those exact numbers; it's that every decision the agent makes maps to a written rule you can read and test.

3. Validate cold, across regimes

A backtest that only looks good in one market is a coin that landed heads once. You want to replay the rules separately through a bull, a chop, and a bear — each in a fresh process so cross-run cache warmth can't quietly flatter the numbers. “Cold” validation is the honesty layer. It's also where look-ahead bugs hide: Coil's own harness, running 20 integrity guards, once caught three of its own backtest bugs — a look-ahead, a next-day leak, and a sign-inverted short book. If your harness has never embarrassed you, be suspicious of it.

4. Connect the broker — credentials stay local

Wire the broker MCP with your own credentials, on your own machine. The non-negotiable rule: your keys never leave your computer and your capital stays in your own account. No pooled money, no custody transfer, no platform server holding trade-enabled keys. For the practical mechanics of pairing a scheduled agent to a brokerage, the Claude + Robinhood agentic trading guide walks through the setup end to end, and can Claude trade stocks? covers what the model can and cannot do on its own.

5. Run on a schedule, with a kill switch

Schedule the sessions yourself and start small while you learn the behavior. Critically, keep a way to stop it instantly — you can pause, change, or kill the schedule anytime. And remember that standing down is a position: on no-setup days the rules can simply hold cash, where any uncommitted balance earns whatever your broker's variable sweep pays (for example, Robinhood Gold quoted ~3.35% APY as of early 2026 — that's the broker's yield, variable, not paid by Coil, and not risk-free). A human watching overnight is always the strongest safety layer; deterministic per-session exits and circuit-breakers are a backstop, not a substitute.

Why DIY is real work — and why most naive loops lose

The components above are simple to list and hard to get right together. The common failure modes are predictable: an over-broad universe you can't backtest; entries that are prompts, not rules; a backtest with look-ahead that promises returns it can't deliver; no circuit-breaker, so one bad open on a 3x ETF undoes months; or an agent given enough latitude to improvise in exactly the moments discipline matters most. A self-tuning engine that re-fits within hard whitelisted bounds and auto-rolls-back losing changes is far more robust than a static script — the trade-offs are laid out in self-tuning vs static trading bots. Budget one to two hours just for first setup, and considerably more to build, validate, and harden your own engine from scratch.

Build vs. buy

If you want to assemble your own, the table maps what each path actually asks of you. Neither path can promise a profit — the leveraged-ETF risk is yours in both.

What it takesBuild it yourselfUse Coil
Instrument selectionYou research and narrow it downSOXL/SOXS pair, pre-chosen
Entry / exit rulesYou design, code, and tune themLeg-rider entry + soft trail, 5% hard stop, no inverse overnight — included
Risk circuit-breakersYou build the ladder and test itHigh-water-mark ladder + 65% single-symbol cap, built in
Backtest harnessYou write it — and debug its own bugsCold A/B harness + 20 integrity guards ship with it
Broker + data wiringYou integrate the MCP and data keyBuilt for Claude + Robinhood; free Alpaca key; macOS, Python 3.9+
Who holds keys / capital / riskYouYou — credentials never leave your machine

What the validation actually shows

These are backtested or forward-tested figures under modeled execution — not typical, not a prediction, and not client or live returns. Treat each as a hypothesis to test yourself.

  • Best trailing 250-session window (to 2026-06-13): +78.3%, profit factor 3.87, max drawdown 6.4%. This is the single strongest window in the test — do not anchor on it.
  • 2024 chop: +11.4% (PF 1.51). 2023 quiet bull: +3.1% (PF 1.19), with idle cash earning the broker's variable sweep on no-setup days.
  • 2022 bear: −1.4% — the honest weak spot. It was −3.6% before a rule to stand down to cash on confirmed bear days.

So three of four backtested regimes are profitable and the bear is the loser still being improved. The sample is thin: roughly 115 trades a year on one ETF pair, under ~500 trades total. Small samples can flatter or fool — live and forward results matter more than any backtest, and that's just as true of anything you build yourself.

Coil — the pre-built option

If the steps above sound like more than you want to maintain, Coil packages them: a rules-based, self-tuning engine for SOXL/SOXS only, built for a scheduled Claude agent and a Robinhood-style broker MCP, with the cold harness, the integrity guards, and the circuit-breaker ladder included. It's $9.99 once to own the full engine, yours forever; optional Pro at $25/mo or $249/yr adds Coil Sync, which delivers each new cold-validated version automatically. Checkout runs through Lemon Squeezy as merchant of record (Stripe-backed, handling tax and refunds). See exactly how the engine is put together in how it works before you decide.

Skip the assembly — or use it as your blueprint

Coil bakes the narrow instrument set, explicit rules, cold harness, and circuit-breakers into one engine you run on your own machine. You hold the keys, the capital, and the risk.

See pricing — from $9.99

Coil is software you install and run yourself, with your own brokerage credentials and capital. It is not investment advice, not a managed account, and not a signal service. Leveraged ETFs such as SOXL and SOXS can lose value rapidly, including total loss. All performance figures are backtested or forward-tested under modeled conditions — not client returns; past performance does not predict future results.