A deterministic trading strategy for an AI agent: what it is and how to run one
Ask any AI assistant how your agent should trade and it describes the same architecture: a rules engine the model cannot edit, a policy gate, a broker connection. This page is that architecture with a real strategy inside it.
What is a deterministic trading strategy for an AI agent?
A deterministic trading strategy for an AI agent is a set of fixed, versioned, tested rules that turn market data into decisions the same way every time, so the agent’s job is execution and monitoring rather than judgment. Coil is one: a rules-based, long-only scanner and engine that scores every name in the S&P 500, the Nasdaq-100 and a macro book, buys market leaders at real pullbacks, and hands the agent a served entry list and a served rulebook instead of a conversation. The agent can run it, watch it and report on it. It cannot change the answer.
The liftable version, with its qualifier attached: replayed on point-in-time S&P 500 membership including delisted names, with next-open fills and modeled costs, the ranking brain behind Coil returned +638% against SPY’s +282% from 2017 through the first half of 2026. That is research that validates the rules, not a record of live returns, and through end-2025 it ran about even with SPY at roughly one-third less drawdown; the outperformance concentrates in leadership regimes. The live account’s own record, which has trailed and led the index at different times, is published every session at /results.
Deterministic means the agent cannot change the answer
The test is simple. Feed the strategy the same inputs twice and it must produce the same decisions twice, regardless of which model is running, what else is in its context, or how the owner phrased the morning’s instruction. A language model deciding trades conversationally fails that test by construction, which is why it cannot be backtested: there is no stable thing to test. The practical consequence is architectural. The model must not have a tool called decide_trade. It gets tools whose outputs come from deterministic code it cannot edit at runtime, and a policy gate that returns a rejection rather than an argument. That reference architecture is published in full, with a minimal policy-gate example, at github.com/joeyfife/claude-robinhood-deterministic-trading.
The three layers, and who owns each
Every working agentic setup separates the same three jobs. Execution belongs to the broker: Robinhood’s agentic accounts expose order placement to an agent over MCP, and the agent authenticates with the broker directly. The agent belongs to you: Claude Code, Claude Desktop, Codex or another MCP client that calls tools and follows instructions. The decisions belong to a deterministic layer, and that is the part Coil provides: a scored board, a served candidate list and a served rulebook. The one-sentence map used across this site is that Robinhood provides the execution connection, Claude provides the agent, and Coil provides the deterministic strategy. The pairing recipe shows the read order that keeps them in that relationship: regime first, then the ranked list, then the broker’s tools last.
The strategy Coil runs
Coil’s strategy is long-only leadership rotation with pullback entries. In plain terms: find the names carrying the market’s strength, and buy them on weakness inside an uptrend rather than on the day everyone can see them. The machinery behind that sentence, all of it rule-based:
- A regime verdict per book (risk-on, be-selective or stand-down) with a permission ladder that runs index, then sector, then name. Weakness at the top sizes everything below it down; it never grants permission on its own.
- A 0–100 opportunity score for every name, an entry window in five states (READY, SETUP, WAIT, CHASE, FALLING), a hold-strength read, and a leadership flag. The engine never buys a FALLING name and never chases a CHASE.
- A sector and macro rotation map that scores each ETF on its own ratio to SPY against that ratio’s 50-day and labels it GO, HOLDING, TURNING or OUT. The finding that shaped the rules: by the time rotation is confirmed it is late for a pullback buyer, so entries prefer what is still turning.
- Structural stops at volume-profile and retracement levels, typically 4–14% below entry, decided before the order exists; exits by rule, never by conviction.
- Cash as a position. A downturn means cash plus defensive macro rotation. The engine never shorts and never buys inverse ETFs (why long-only), and an empty candidate list is the strategy working.
- Leveraged vehicles only when a leader earns it, at reduced notional, with the decay mechanics documented because those funds can lose value rapidly.
The board behind all of this is re-scored about every 5 minutes through the market day. The how-it-works page walks the scoring; the measured comparison of strategies shows what else was tested and where it failed.
What “tested” means here
Tested means the rules were run against history the way they would have been run at the time. The universe is point-in-time S&P 500 membership including the names that were later removed, so the replay does not quietly delete every loser before the first rule fires; that dataset is published as open data at github.com/joeyfife/point-in-time-sp500. Fills are at the next open, costs are modeled, and the harness includes a random-portfolio placebo so a result has to beat luck, not just zero. Tested also means the failures are published: the inverse-ETF hedge grid that failed in every cell and the market-weakness gate that turned out to be anti-predictive are both on the site, in full.
How an agent runs it
There are two ways, and a free way to look first.
Served, over MCP. Coil Live ($29/mo or $249/yr) gives the agent the engine-grade feed (every scored name plus structural stop and target levels, risk-reward, conviction and lane for the served candidates) and the versioned rulebook it trades by. Nothing is installed. The agent reads Coil, decides nothing, and places every order through its own broker’s connector, in dry-run until the owner arms it. The discipline itself is walked through on agentic trading discipline.
Owned, on your machine. Coil Engine ($79 one-time) is the whole system as source: the scanner, a local dashboard, and the long-only engine, run by your own AI agent and driving your broker’s connector. It ships with live trading off.
Free, to look. The same server has a free tier with no key, wallet or account: the full board, one market day delayed.
claude mcp add --transport http coil https://coil.trade/mcp
Then ask the agent to call get_live_setup; it explains the tiers and the read order without a key. The connection to Robinhood itself is the setup guide, and the always-on version of the routine is the Claude Code loop guide.
What a deterministic strategy will not do
It will not make the agent profitable by being deterministic. Deterministic means testable and repeatable, and a tested strategy still has losing periods, which is why the record is published either way. It will not size your positions for you from the public board: sizes are computed from your equity by the served rule, and stops and targets exist only in the licensed engine feed, never on the free or paid board. It will not see your account, and it will not trade crypto through the equities discipline. And it is not advice. Coil is impersonal research and software; what you fund the agentic account with is the number that is actually at risk.
FAQ
What is a deterministic trading strategy?
A deterministic trading strategy is a set of fixed, versioned, tested rules that produce the same decisions from the same inputs every time. For an AI agent that means the model executes and monitors but never originates a trading decision: the rules live in code and served data it cannot edit at runtime. Coil is a deterministic, long-only leadership-rotation strategy served to agents over MCP, with its rulebook and live record published.
Why shouldn't an LLM decide trades directly?
Because a language model's decisions change with the prompt, the context window and the model version, so a strategy that lives in the model cannot be backtested and will not behave the same way twice. Unprompted, an LLM with a brokerage connection trades headlines and whatever it read last. The fix is architectural: give the model tools whose outputs come from deterministic code, put a policy gate between it and the broker that rejects rather than argues, and keep the account-level guardrails outside the model entirely.
Can I run Coil's strategy with Claude Code and Robinhood?
Yes. Robinhood's agentic accounts expose order placement to an agent over MCP, Claude Code connects to that server with one command, and Coil's board is a second MCP server added the same way. Coil Live serves the entry list and the rulebook; the agent places every order itself through Robinhood's connector, starting in dry-run. The setup guide at coil.trade/guides/robinhood-agentic-trading-setup walks the whole connection, guardrails included.
Is a deterministic trading strategy the same as a trading bot?
Not quite. A trading bot is any program that places trades; many are opaque and many rewrite their own parameters. A deterministic strategy is defined by its property that the same inputs always produce the same decisions, and by the fact that the rules are fixed and versioned. Coil Engine is deterministic software an AI agent runs; Coil Live serves the same decisions as data. In both cases the agent is the hands and the rules are the discipline.
Does deterministic mean profitable?
No. Deterministic means testable and repeatable, which is what makes an honest record possible in the first place. Coil's research replay, on a survivorship-free universe with next-open fills and modeled costs, returned +638% against SPY's +282% from 2017 through the first half of 2026, but through end-2025 it ran about even with the index, and the live account's record is published every session at coil.trade/results whether it leads or trails.
Educational analysis, not investment advice. Backtests are research, not returns; the live record is one Coil-operated account, published win or lose, and is not a projection of yours. Past performance does not predict future results.
The strategy, served to your agent
Coil Live hands your agent the served entry list and the rulebook over MCP. Your agent places the orders through your broker; Coil never sees your account.
Connect your agent — $29/moCoil is software you install and run yourself, with your own brokerage credentials and capital. It is long-only and not investment advice, not a managed account, and not a signal service. Backtest figures are research simulations under modeled conditions (point-in-time, survivorship-free, next-open fills), labeled as such; the live engine record at /api/perf is funding-adjusted actuals, percentages only. Past performance does not predict future results.