Stock trading bot: rules for US stocks and ETFs
A stock trading bot is a program that buys and sells stocks or funds for you by following set rules. On Tactfolio you build those rules in a visual builder, or start from a published strategy. You test them on decades of real prices, then run them on paper or in your own Alpaca account.
Key points#
- Tactfolio stock bots trade US-listed stocks and ETFs, once a day, long only.
- Every rule is visible as a tree of blocks you can read and change.
- You see the backtest, with its worst drawdown and trading costs, before you run it.
- Bots trade through your own Alpaca account, paper or live, or a Tactfolio paper account.
- A bot follows its rules. It cannot know what the market will do next.
What is a stock trading bot?#
A stock trading bot is software that places stock trades automatically when its rules say so. Some bots trade many times a minute. Others, like Tactfolio’s, check once a day and change holdings only when a rule calls for it.
Daily, rules-based bots suit investors who want a plan they can follow without watching the screen. They are not built to catch small moves within the day.
What can a Tactfolio stock trading bot do?#
A Tactfolio bot is built from four kinds of blocks. You can combine them to express most allocation ideas.
| Block | What it does | Example |
|---|---|---|
| Ticker | Holds one US-listed stock or ETF | Hold SPY |
| Weight | Splits money between blocks | 60% SPY, 40% IEF |
| If / Else | Checks a condition and picks a branch | Hold SPY if it is above its 10-month average, else BIL |
| Rank | Scores a list and keeps the best few | Hold the 3 funds with the highest 6-month return |
Conditions can use prices, moving averages, momentum and US economic data from the Federal Reserve Bank of St. Louis. The builder guide lists every block and indicator. A stock bot cannot sell short, borrow on margin, or trade options.
Stock trading bot templates#
These bots are built from published strategies, each with its own rules and backtest:
- Trend following bot: holds the S&P 500 above its 10-month moving average, Treasury bills below it.
- Dual momentum bot: holds US stocks, foreign stocks or bonds, by 12-month returns.
- Rebalancing bot: keeps a fixed mix such as 60/40 on a schedule.
- AI trading bot: describe a rule to an AI assistant and it builds the bot for you.
You can also start from any of the classic strategies or a community strategy in Discover.
How to set up a stock trading bot on Tactfolio#
Five steps take you from an idea to a running bot.
- Start from a template or a blank strategy. Open a template above, a classic, or a new strategy in the builder.
- Write or change the rules. Add tickers, weights, conditions and rankings. The backtest reruns as you edit.
- Check the backtest. Look at the worst drawdown first, then the return and the costs. A drawdown is how far a portfolio falls from its last high point. How to read a backtest walks through it.
- Run it on paper. In Trade, a paper account runs the bot with pretend money at real market prices and emails you a summary after each close.
- Connect Alpaca when you are ready. Use your own Alpaca account, paper or live, with your own API keys. The bot trades only the starting balance you give it, and never touches anything else you hold there.
To see every way to put a portfolio on autopilot, read automated trading on Tactfolio.
What are the risks of a stock trading bot?#
- Rules that fit the past by luck. Testing many variations and keeping the best one often finds noise. See why past results mislead.
- Fast markets. A daily bot reacts once a day, not during the day.
- Leveraged ETFs. A bot can hold them like any other fund. These funds reset daily. Held for longer, their returns can differ a lot from the multiple in their name.
Common questions#
What is the best stock trading bot?#
No bot is best for everyone. Look for rules you can read, a backtest that includes costs, and a worst drawdown you could live through. Every Tactfolio bot shows all three.
Is there a free stock trading bot?#
Yes. Everything on Tactfolio is free while we build, including the builder, backtests, paper trading and running a bot in your own Alpaca account.
Can a stock trading bot day trade?#
Not on Tactfolio. Bots run on daily prices, so they suit plans that check once a day, once a month or once a year.
Which brokers work with Tactfolio bots?#
Alpaca only, with your own API keys, in a paper or live account. Tactfolio is not a broker, and your money stays with Alpaca.
Do I need to know how to code?#
No. You build a bot from blocks in a visual builder. You can also ask an AI assistant to build it for you.
Sources
- Paper Trading, Alpaca, accessed October 16, 2026
- Customer Advisory: AI Won’t Turn Trading Bots into Money Machines, U.S. Commodity Futures Trading Commission, accessed October 16, 2026