A trading bot built from your own rules
You set the rules. Claude helps build and test them. The bot follows the rules and nothing else: AI does not guess, and every order can be traced back to a rule.
Slides (PDF)Watch the videoSee the validationLive demo-account result
The problem
Many people have trading rules in their heads (when to buy, when to sell, where to cut a loss) but run into three problems:
- They cannot code, so they trade by hand and lose discipline when the market swings.
- They do not know if the rules work, because they never tested them on history; they find out with real money.
- Off-the-shelf bots are black boxes, and bots that let an AI decide are unpredictable because answers differ each time.
Our solution
Split the roles clearly:
- Human — sets the rules and the risk limits
- Claude — writes the code, runs backtests, reports results (build and test phase only)
- Bot — follows the rules exactly, the same way every time, and logs every order
Claude does not make live trading decisions, so the bot is deterministic and auditable.
How it works: 6 steps
- 1Write the rules in plain language: entry, exit, stop-loss, position size, daily loss limit
- 2Claude turns the rules into code and summarises them back so you can check it understood correctly
- 3Claude runs a backtest on historical data and reports return, deepest drawdown, trade count and the periods the rules struggle in
- 4You adjust the rules and Claude re-runs until you are happy
- 5Claude builds the system with safety nets: stop-loss on every trade, exposure cap, kill switch
- 6The system logs every order and which rule caused it
A real prompt (shortened)
The instruction we gave Claude to build and run the v3.9 bot on two broker demo accounts:
Checking that the code matches the rules
- 4 test sets match the research trade-for-trade: 813, 895, 1,755 and 905 trades
- Gold Swing: 113 of 113 trades match
- Python entry points match TradingView 99.7% (USDJPY) and 99.8% (EURJPY)
- Bot simulation tests: 48 of 48 passed
Rule of the team: if results do not match, we do not move on.
Backtest results, 20 years (Mar 2006 – Oct 2026)
| Version | Per year | PF | Max DD | Win rate | Losing years | Longest underwater (days) |
|---|---|---|---|---|---|---|
| v3.7 | 30.3% | 1.98 | 9.1% | 54.9% | 0 | 367 |
| v3.8 | 41.4% | 2.31 | 9.1% | 58.1% | 0 | 243 |
| v3.9 | 49.3% | 2.40 | 8.5% | 63.2% | 0 | 243 |
Hypothetical backtest with position size scaled to about 9% max drawdown for every version. Source: Ichimoku MTF
Validation in layers
- TradingView Bar Replay, 12 windows × 2 years, 4-pair portfolio: PF 1.97, DD 4.12%
- Split in half (v3.7): 29.8%/yr in 2006–2015 vs 30.4%/yr in 2016–2026
- Unseen markets with unchanged rules: XAGUSD PF 1.61, AUDJPY 1.35, CHFJPY 1.25 passed; USD majors and S&P 500 did not
- Extra cost of 0.06R per trade still returns 22.9%/yr; Monte Carlo of 150 paths had no losing path
Running for real (demo account)
The bot has been running on a broker demo account since October 2026, with the result pulled directly from the broker through Myfxbook. It is still very short and not enough to draw conclusions.
Safety nets
- Broker-side stop-loss on every trade
- Exposure cap: total open risk may not exceed 30%
- The bot refuses to start on a real-money or wrongly-typed account
- Health checks with self-repair; one command returns the bot to shadow mode
- Every order logged with a daily hash so history cannot be quietly rewritten
Responsible AI
- Human decides. Claude does not trade live; rules and risk limits belong to the user.
- Explainable. Every order has a log line naming its rule; skipped trades state the reason.
- AI-written code is tested. Unit tests and trade-for-trade comparison before use.
- Demo first. No real money; set a maximum loss you can accept.
- No promises. Limits and failed tests are shown openly; we never manage anyone's money.
- 49.3%/yr is the result after scaling position size to about 9% max drawdown; it is not a natural result.
- The base strategies were chosen after seeing the full history; drawdown that could not be foreseen may be 1.06–1.32× deeper than the target.
- The live demo record is short (since Oct 2026). Real costs and slippage still have to be measured.
- Not suited to USD major pairs; rules that worked can stop working when the market changes; small accounts cannot open some parts because of minimum lot size.
Roadmap
Short term
Keep the demo run going, compare live results with the backtest, measure real costs and slippage.
Mid term
Support more strategies and assets, with automatic summary reports and a page where users set their own rules.
Long term
Connect to regulated broker systems with auditable risk controls.
Judging criteria and where we answer them
| Criterion | Our answer |
|---|---|
| Innovation | Rules in plain language → AI builds and tests → a deterministic bot. AI never trades live. |
| Business value | Own a trading bot without coding; avoid losses from untested rules; verifiable discipline for investors. |
| Technical feasibility | Already built: 20-year backtests, engine matching research trade-for-trade, bot running on a broker demo account. |
| Problem clarity | People have rules but cannot code them, cannot test them, and distrust black-box bots. |
| Responsible AI | Human decides, every order is logged with its rule, AI-written code is tested, demo first, limits stated openly. |
Key dates: submissions close 10 Nov 2026 23:59 (Thailand); shortlist announced 20 Nov; Boostcamp 25 Nov and 17 Dec; Pitching Day 23 Dec 2026.