Before trusting AI-written rules: out-of-sample, random-entry and buy-and-hold test
Have your agent lock away recent data, test any rule it (or another AI) wrote on that unseen data, then check whether random entries at the same frequency would have done just as well.
What they did
StatOasis (Ali Casey) asked an AI for 5 SPY trading rules, coded them exactly as written, built nothing on the last 10 years of data, then tested them there once. Each rule was also compared with 1,000 random-entry runs that traded as often, and with simply holding SPY. Separately, Boo-X tested three iFVG futures entries against random entries on 16 years of NQ.
How it went
The posters' claims: all 5 AI rules made money out of sample, but only 2 beat at least 95% of random-entry runs (percentiles 96.7 and 95.5). For Rule 2, random entries matched or beat it 56.2% of the time, and none of the 5 beat buy-and-hold SPY out of sample (frictionless test, single split, daily SPY 1993–2026). Boo-X says none of the three iFVG versions beat random entries by more than luck; the basic one made −0.06R per trade over 908 trades.
Sources:
Worth knowing
- 'It made money on unseen data' is not enough. Ask whether random timing would have made the same money.
- Decide the pass bar (for example the 95th percentile) before you run the test, not after.
- StatOasis' test had no commissions or slippage. Add your own costs; thin edges often vanish.
- Analysis only. The prompt never places trades.
The prompt
You are my strategy skeptic. Do NOT place any trades.
Input: a rule set written by [me / an AI model: name it] for [SPY / my instrument], [daily / X-minute] bars, data from [start] to [today].
1. Lock the data first: in-sample = the first [70]%, out-of-sample = the last [30]%. Don't look at the out-of-sample window until the rules are final. Read signals on a bar's close and fill at the next bar's open.
2. Out-of-sample: run the final rules once. Report net profit after costs of [$0.01/share or 0.05% per side], number of trades, win rate, average win vs average loss, max drawdown and CAR/MaxDD.
3. Random-entry test: run [1,000] simulations that enter on random bars in the out-of-sample window, with the same number of trades, the same direction and the same holding rule. Report the rule's percentile (the share of random runs it beat). My pass bar: [95th percentile].
4. Benchmarks: compare with buy-and-hold of [the traded asset] and a plain textbook rule [e.g. RSI(2) < 10, exit on a close above the 5-day average] over the same window.
5. Verdict: 'beats random and the benchmark', 'beats random only' or 'indistinguishable from random', with the 3 numbers that decided it.
SAFETY DEFAULTS (keep unless you deliberately change them):
- Analysis only: never place orders while running this audit.
- Before every order, show me: symbol, side, size, order type, limit price, stop, and the rule that triggered it. Then WAIT for my "approve".
- Hard limits: max [$500] per trade, max [3] open positions, stop all trading for the day after a loss of [$300].
- Log every signal, decision and fill to [a running log / spreadsheet] with timestamps.To go fully autonomous: (1) run on paper for at least [4–8 weeks] or [30+ trades]; (2) delete the 'WAIT for my approve' line and keep the hard limits; (3) switch to live keys or account. On Robinhood, turn off trade approvals in your agent settings, but note that some orders can still require in-app approval or acknowledging a pre-trade alert, so unattended execution isn't guaranteed for every order. On IBKR, standard AI Integration asks for approval on every order. Its new Autonomous Trading mode (eligible individual non-margin accounts, after 10 approved trades) lets the AI trade a funded AI Partition without per-order approval. Never remove the daily loss limit.