What is trading?
- Home
- Alpari Academy
- Strategy sparring: stress-testing your trading rules with AI
CROSS-CUTTING: COURSE 1 | LESSON 5
Strategy sparring: stress-testing your trading rules with AI
Learning objectives
Write your trading rules precisely enough that an AI (or anyone) can find the holes in them.
Run an adversarial "sparring" session: edge-case hunting, scenario walk-throughs and rule-conflict detection.
Keep a hard boundary between stress-testing rules (legitimate) and asking AI to design or validate an edge (not legitimate).
Every strategy sounds great in your own head
Traders' strategies usually live as comfortable fog: "I trade pullbacks in trends, with sensible stops, when conditions are right." Fog can't be tested, can't be journaled against, and — conveniently — can't be wrong, because after any trade you can reinterpret it to mean whatever just happened. The strategies that survive are the ones written so precisely that they can be embarrassed.
Here's where an LLM earns its keep, in a role it's genuinely suited for: a tireless, unimpressed sparring partner that reads your rules literally and asks what happens at every edge. Not because it knows whether your strategy is profitable — it has no idea, and neither do backtests it never ran — but because finding ambiguities, contradictions and unhandled cases in a written specification is a language task. That's home turf.
Step 1 — get the rules out of your head
Write your strategy as numbered rules covering, at minimum: market and timeframe; the setup conditions; the exact entry trigger; initial stop placement; position size; exit rules (target, trail, time); and the filters (news, sessions, spread) that keep you out. Example:
1. Instrument: EURUSD only. Timeframe: 1H entries, 4H trend filter.
2. Trend filter: 4H price above 50-period MA = longs only; below = shorts only.
3. Setup: pullback touching the 1H 20-period MA while rule 2 holds.
4. Entry: next 1H close back in the trend direction after the touch.
5. Stop: below the pullback swing low (longs), risk = 1% of account.
6. Target: 2R fixed. No trailing.
7. Filters: no entries within 30 min of high-impact news on EUR or USD.
8. Max 2 trades/day; stop for the day after 2 losses.
If writing this feels hard, that's the finding — the fog was the problem. Many traders get their first real payoff from this lesson before the AI is even involved.
Step 2 — the sparring prompt
Now brief the assistant as an adversary, with the boundaries stated up front:
Example prompt: "You are a skeptical risk reviewer stress-testing the internal consistency of my trading rules. You do not know whether this strategy is profitable and must not claim to. Do not suggest new indicators or entry ideas, and give no buy/sell views. Below are my rules. Tasks: (1) list every ambiguity — places where two readings of a rule are possible; (2) list edge cases the rules don't handle; (3) walk through three hostile scenarios step by step, citing rule numbers, and show where the rules go silent or conflict; (4) end with the five hardest questions you'd ask me before letting me trade this. If you need information I haven't given, ask — don't assume."
Condensed example response: "Ambiguities: Rule 3 — does 'touching' mean the candle wick or a close at the MA? Rule 5 — 'the pullback swing low' is undefined when the pullback makes two lows. Rule 8 — do the 2 losses include break-even stops? Unhandled cases: Price gaps through your entry level over a weekend — rules 4–5 assume a fill near the trigger. The 4H MA flips direction while a trade is open — rule 2 governs entries but says nothing about open positions. News (rule 7) hits while you're already in a trade. Scenario walk-through 1: Friday 20:00 — setup forms (rule 3 ✓), entry closes (rule 4 ✓)… Sunday opens 40 pips through your stop. Rule 5 sized risk at 1% assuming stop execution at the level; your actual loss is ~1.8%. No rule addresses gap risk. Hardest questions: How many trades did you use to choose the 2R target — and were they all in a trending year? What does 'stop for the day' (rule 8) mean at 23:30 server time? …"
Read what happened: the model never opined on profitability, never touched market direction — it did specification review. Every finding cites a rule number (verifiable against your own text), and each one is a hole you can close with a sentence. Fix the rules, paste the revised set, and go another round. Two or three rounds typically converge on a rulebook dramatically tighter than the fog you started with.
Useful follow-ups: "Which single rule, if I broke it, would do the most damage?" — a good lens for what your journal's followed_plan column should watch (Lesson X1.3). And "Rewrite my rules as an unambiguous checklist I can read before each trade" — turning the sparring output into a daily artefact.
Step 3 — respect the boundary
Sparring has a bright line, and crossing it turns the best exercise in this course into the worst:
- Legitimate: "Find contradictions in my rules." / "What scenarios don't my rules cover?" / "Question my assumptions."
- Not legitimate: "Is this strategy profitable?" / "What win rate should I expect?" / "Improve my entries." / "Would this work on gold?"
Why so strict? Because an LLM answering "is this profitable?" has nothing to compute with — no price history it can run your rules over, no statistics of your execution. It will still answer, warmly and plausibly ("this appears to be a solid trend-following approach…"), and that warm plausibility is exactly the false confidence that funds bad strategies. Profitability questions have real answers, and they come from backtesting on historical data and forward-testing on a demo account (covered in Practitioner course P3) — from evidence, not eloquence.
The same logic bans "suggest a better entry": the model would generate a plausible-sounding pattern from trading folklore, untested and unowned. Your edge has to come from your testing. The AI's job is making your rules precise enough to test.
One more habit: when a sparring finding leads you to change a rule, note it in your journal with the date. Rulebooks that mutate silently are how strategies rot — every change should have a reason, in writing, that next month's review (X1.3) can hold you to.
The packaged version of this session is the Strategy Stress-Tester skill (skills/strategy-stress-tester.md); its sibling, the Trading-Plan Builder (skills/trading-plan-builder.md), runs the interview that produces the written rules in the first place.
Key takeaways
A strategy that exists as fog can't be tested or embarrassed — write it as numbered, literal rules first.
LLMs excel at specification review: ambiguities, contradictions, unhandled edge cases and hostile scenario walk-throughs, each citing your rule numbers.
Iterate: fix the holes, re-paste, spar again — two or three rounds converge on a genuinely tight rulebook.
Never ask AI whether the strategy is profitable or how to improve the edge — it has nothing to compute with, and its plausible warmth is false confidence.
Profitability answers come from backtests and demo forward-tests; AI's role ends at making your rules precise enough to test.