Learn
Building a trading bot with Claude (for a prop firm)
Claude is a strong tool for building a futures trading bot, especially the long, multi-file kind, the refactors, and the backtest harness. What it cannot do is hand you an edge or know the prop firm's rulebook. This is the overview: where Claude is genuinely useful, where it falls down, and the firm rules your bot has to respect to survive a funded account.
I run an automated futures bot myself, built and backtested with AI and streamed live, so this covers the part most tutorials skip: passing the firm, not just the backtest.
What Claude builds well
Describe a strategy in precise rules and Claude will write the order logic, connect a futures API like Tradovate or Rithmic or a bridge, structure the data feed, and scaffold the backtest. It holds a large codebase in context, which helps when the bot grows past a single file and you are refactoring the risk layer or the execution engine.
Used in an agentic coding setup it can run the test suite, read the failures, and fix its own code, which is closer to how a real build goes than copying snippets out of a chat window. The discipline is the same as any model: small, readable pieces you actually check.
Where it falls down
Like any model, it will write an optimistic backtest if you let it: lookahead bias, no slippage, sizing that ignores the drawdown. It does not know your firm's rules unless you tell it, and it will build a strategy that quietly breaks the trailing drawdown or the consistency rule. The edge is yours. The model only implements what you specify, bugs included.
Treat every backtest number as optimistic until you have checked it by hand for the usual traps.
The part that decides it: the firm rules
A bot that passes a backtest still has to pass a funded account. Your bot has to respect the firm's drawdown type, end-of-day or intraday, the consistency rule on payout, the flat-by time, and whether the firm allows bots at all. Most futures firms ban or restrict fully automated trading on the funded account.
Encode the firm's rules as hard constraints in the bot before you go live, or the firm's risk engine will enforce them by closing the account. Our automation rules page lists which firms allow bots, which only on the eval, and which ban it outright.
Backtest the way the firm scores you
Backtest against the firm's constraints, not just profit. Cap the equity curve at the firm's drawdown number, model the payout gates and the flat-by time, and count the resets you would have bought. A strategy that is net profitable but breaches the drawdown once a month still fails a prop account.
That gap, between a bot that backtests well and a bot that survives a funded account, is where the prop firm part actually lives. ChatGPT works for this too, so use the model you have access to. The constraints you encode matter more than the model.
FAQ
Can Claude build a trading bot?
Yes. Claude is good at writing the order logic, the API wiring, and the backtest, and it handles long, multi-file codebases well. It cannot invent a profitable strategy or know your prop firm's rules unless you encode them, so the edge and the firm constraints are on you.
Can you run a Claude-built bot on a prop firm?
Only where the firm allows automation, and only if the bot respects the firm's rules. Many futures firms ban fully automated trading on the funded account, so check the automation rules per firm before you build.
What is Claude Code good for in trading?
An agentic setup where Claude writes the bot, runs the backtest, reads the failures, and fixes its own code is closer to a real build than pasting snippets. It is still on you to bring the edge and to encode the prop firm's drawdown, payout, and automation rules.