AI trading bot: build one by asking an AI assistant
An AI trading bot is a program that uses artificial intelligence to help decide what to buy and sell. On Tactfolio, the AI has a smaller job that you can check. An AI assistant writes and backtests the rules. The bot then follows those fixed rules every day.
Key points#
- You describe a trading rule to an AI assistant in plain words.
- The assistant builds the strategy in Tactfolio and runs the backtest.
- You read the rules and the results yourself before anything trades.
- Trade runs the saved strategy on paper or in your own Alpaca account.
- The AI cannot trade, and nothing here can promise a profit.
What is an AI trading bot?#
An AI trading bot is software that uses AI to make or help make trading decisions. The term covers two very different things.
- Bots where the AI decides on its own. A model reads data and places trades, often without showing why. You have to trust what you cannot see.
- Bots where the AI helps you write the rules. The AI turns your idea into exact rules and tests them. The bot then follows those rules, and you can read every one.
Tactfolio is the second kind. US regulators warn about the first kind when it comes with big promises. The CFTC says that AI “can’t predict the future or sudden market changes.” FINRA, the SEC and NASAA tell investors to be wary of claims that AI can guarantee returns.
What the AI does on Tactfolio, and what it does not#
The assistant connects to your account through MCP (Model Context Protocol), a standard way for AI assistants to use outside tools. Our guide to backtesting with ChatGPT or Claude compares this with asking a plain chat.
| The AI assistant can | The AI assistant cannot |
|---|---|
| Build a strategy from the same blocks as the builder | Place trades or move money |
| Run backtests and compare up to 12 variations | Publish a strategy for others |
| Save drafts and new revisions in your account | Change your account settings |
| Explain where a rule did worst | Choose investments for you on its own |
A bot on Tactfolio is a saved strategy that Trade runs for you. Stock and ETF bots use daily prices and trade through Alpaca. Every bot is long only, which means it buys and holds and never sells short or borrows.
How to build an AI trading bot on Tactfolio#
Five steps take you from one sentence to a bot running on paper.
- Connect your assistant. Follow the setup steps in Use Tactfolio from your AI assistant. Claude, Cursor and VS Code have one-click buttons. There is no API key to copy.
- Describe your rule in one sentence. Say what to hold, when to switch, and how often to check. Name your tickers and your dates.
- Check the rules and the backtest. Open the saved strategy in the builder. Read the tree, the worst drawdown and the costs. A drawdown is how far a portfolio falls from its last high point.
- Run it on paper first. In Trade, a paper account runs the strategy with pretend money at real market prices. It emails you a summary after each close.
- Connect Alpaca when you are ready. Add your own Alpaca account, paper or live, with your own API keys. The bot trades only the starting balance you give it.
For a tour of the AI tools themselves, see AI trading on Tactfolio.
An example: one sentence to a tested bot#
Here is a sentence from our AI assistant guide that you can paste as it is:
I read about a rule that holds SPY when it is above its 10-month moving average and otherwise holds IEF, checked monthly. Build it in Tactfolio, backtest it from 2005, and tell me where it did worst.
The assistant builds a tree with one If block. A moving average is the average price over a set time, here 10 months. If SPY is above it at a month end, the bot holds SPY. If not, it holds IEF, a fund of US Treasury bonds. This is close to Faber’s 10-month moving average timing model, one of our classic strategies, which uses Treasury bills instead of IEF.
You then read the backtest and decide. Nothing trades until you save the strategy and start it in Trade yourself.
What can go wrong with an AI trading bot?#
The biggest risk is a rule that fits the past by luck. An assistant can try fifty variations in the time it takes you to try one. The best of fifty past results is often just the luckiest.
- Say why the idea should work, not only the rule. “Find the best moving average” invites the AI to fit noise.
- Test on dates it has not seen. Tune on older years and check the winner once on recent years.
- Ask for the uncomfortable numbers: higher trading costs and the worst drawdown.
Why past results mislead explains these traps in more detail. Every backtest is hypothetical. It shows how rules would have done on past prices, not how they will do.
Common questions#
Do AI trading bots work?#
Some rules have done well on past prices and some have not. No AI can predict sudden market changes, as the CFTC warns. What an AI assistant does well is build and test many ideas fast, so you can see the risks before you trade.
Is there a free AI trading bot?#
Tactfolio is free while we build, including the AI assistant connection, backtests and paper trading. You need your own AI assistant that supports MCP, and an Alpaca account if you want to trade with real money.
Can the AI trade for me?#
No. The assistant can build, test and save strategies, but it cannot place trades, publish or change your settings. You start a saved strategy in Trade yourself.
Which AI assistants work with Tactfolio?#
Any assistant that supports remote MCP servers with sign-in works. The setup guide has steps for nine assistants, including Claude, ChatGPT, Cursor and VS Code. We tested setup in Claude Code, Codex and OpenCode. For Claude, ChatGPT, Cursor, VS Code and Gemini CLI, we checked that sign-in reaches Tactfolio.
Can an AI trading bot trade crypto or options here?#
Options, no. Most bots hold US-listed stocks and ETFs. A strategy can also hold Hyperliquid perpetual futures, such as the BTC perp. Those run only on paper or the Hyperliquid testnet for now, because real money on Hyperliquid is off.
Can I use a ready-made strategy instead?#
Yes. Every classic strategy is live, with its rules and backtest. Copy one to your account, ask your assistant to change it, and run your copy in Trade.
Sources
- Customer Advisory: AI Won’t Turn Trading Bots into Money Machines, U.S. Commodity Futures Trading Commission, accessed October 16, 2026
- Artificial Intelligence (AI) and Investment Fraud, FINRA, the SEC Office of Investor Education and Advocacy, and NASAA, accessed October 16, 2026
- Paper Trading, Alpaca, accessed October 16, 2026