Learn › Glossary › Trading Bot

Trading Bot

Software that watches markets and places orders automatically according to its rules. The term covers everything from hobby scripts to platform-managed strategies. The failure modes are rarely the signal: they're execution bugs, unhandled edge cases, and missing guardrails — which is why managed platforms with order-level safety checks exist.

A trading bot is software that watches the market and sends orders to a broker by itself, following rules written in advance. The rules can be one line long, such as "buy when the 14-day RSI is below 30", or they can run to hundreds of lines. The bot does not have an opinion. It runs the same rules at the same times every session, and it will run a bad rule as faithfully as a good one.

The word covers a wide range. A hobby script that polls a price every minute is a bot. A strategy that lives on a managed platform, where the platform checks each order before it goes to the broker. The strategies on this site are small bots of the second kind: each is a short set of rules, run by DeployQuant's engine on minute data, with every order and every fill recorded. Their results, plus market data for six well-known funds, show what a bot is made of and what measured behavior looks like.

All figures are backtests from 2021-01-04 to 2026-10-02, a window of 5.74 years, with $10,000 per run and no fees or slippage in the headline run. They are hypothetical and describe the past.

What a trading bot is made of

Every bot, however it was written, has the same five parts.

The rule is the part people think about, and it is usually the smallest source of trouble. The definition above says the failure modes are rarely the signal. They sit in the other four parts: a feed that is late, an order the broker rejects, a position the bot believes it holds and does not, a missing limit when something unexpected happens.

The two related terms are worth reading next to this one. Algorithmic trading is the broader practice of executing trades by predefined rules, from a two-line moving-average system to institutional market-making. No-code trading is building those rules with visual blocks or plain-language descriptions instead of code. A trading bot is the running thing both of them produce.

Kinds of trading bot

There are three practical ways to get a bot, and they differ in who owns which part of the list above.

A script you write yourself. You own every part: the feed, the rule, the order handling, the accounting and the controls. You also own every bug. The answer on whether to use a platform or write your own bot goes through that trade.

A bot on a managed platform. The platform supplies the feed, the order handling, the accounting and the controls, and you supply the rule. DeployQuant works this way. A strategy can be written in plain English, assembled from blocks that read as sentences, or written in Python in the industry-standard algorithm format. Every strategy has two views, Blocks and Code, and the AI converts between them and compares the fills of both versions before saving, so a conversion that changes the trades is caught.

A bot sold as a finished product. The rule is someone else's and often is not shown. Nothing on this page assesses such products. What can be checked, on any bot, is whether its rules are readable, whether its backtest is reproducible, and which controls stand between it and your account.

What bots did on real data

The library on this site runs 12 rule sets across 59 ETFs. Each one is a bot in the sense of this page. Their median CAGR across the 59 funds, in the same window, shows how modest typical results are.

The highest median is 6.61%. For comparison, buy-and-hold on SPY returned 14.56% a year in the same window, and on QQQ 16.7%. Most templates did not beat holding the fund on most funds. The best count, 34 of 59, belongs to two templates. The worst, 14, belongs to the monthly cycle. A bot that trades is a bet that the rules add something to the fund it trades, and on these funds in these years that was true for a minority of combinations in most templates.

That result is a point about what bots are, and the mechanics are simple. A rule that sits out of the market half the time gives up the rising stretches in exchange for avoiding some falling ones, and the 5.74-year window was weighted toward rising stretches for the US equity funds. The details depend on the fund, which the next section covers.

The same bot on different funds

A rule is a bot only when it meets a market, and the market changes its meaning. The six funds below were measured over the same window, and each shows a different environment.

SPY is the plain case. It returned 125.29% in total, a CAGR of 15.2%, with annualized volatility of 16.41% and a maximum drawdown of 24.51% from 2022-01-03 to 2022-10-12. It closed above its 200-day average on 77.99% of sessions and crossed it 30 times. A trend bot on SPY spent most of the window invested and traded around 30 crossings.

QQQ rose more and fell more: a CAGR of 17.39% and a maximum drawdown of 35%. It crossed its 200-day average 20 times.

IWM returned 8.03% a year with a maximum drawdown of 31.92% that took until 2024-11-06 to recover. It crossed its 200-day average 34 times and spent 63.29% of sessions above it.

TLT fell. Its CAGR was -8.64%, its drawdown was 44.06% and it had not recovered by 2026-10-02. It was above the 200-day average on 35.18% of sessions and crossed it 95 times. A trend bot on that fund would have switched between holding and cash far more often than on SPY.

TQQQ returned 26.86% a year with annualized volatility of 67.11% and a maximum drawdown of 81.68%. UVXY lost 99.94% of its value over the window, with volatility of 103.95%.

A bot written for one of these funds is not the same bot on another. The 14-day RSI fell below 30 on 18 SPY sessions, 33 IWM sessions, 61 TLT sessions and 116 UVXY sessions. The median 20-day forward return after those signals was 2.86% on SPY and 0.22% on IWM, -1.63% on TLT and -5.82% on UVXY. An oversold-buying bot meets four different markets with one rule.

Where trading bots fail

The definition says the signal is rarely the failure. Three groups of failure account for most of what goes wrong.

Execution bugs. A limit price with the wrong decimal, a resubmitted order, a symbol that has stopped trading. These are bugs in the plumbing and the rule can be perfect. The price band control refuses orders priced too far from the market, and a companion check refuses limit orders that would fill instantly by accident.

Unhandled edge cases. A holiday, a half day, a gap at the open, a partial fill, a broker rejecting a short order. The average overnight gap was 0.44% on SPY and 2.53% on UVXY, and a rule written against a price will meet the next open at a different one. The weekly 7% target template is an example of an order that has to be maintained: DeployQuant keeps the 7% profit target as a managed limit order that rests at the broker the whole time the trade is open.

Missing guardrails. Every automated setup needs a way to stop. The kill switch entry says the first move when behavior surprises you is stopping new orders. On DeployQuant, one switch pauses a single strategy and another pauses every strategy on a broker connection. Per-order and per-position dollar caps never block an order that reduces exposure, and dry-run mode runs the whole order flow without sending anything to the broker.

A fourth group belongs to the owner and not the software. The position sizing of a bot decides how much one bad stretch can cost. The buy-and-hold drawdown on TQQQ was 80.77% and on SPY 23.99%, and a bot that holds either with the whole account carries that figure. The related answer on the biggest risks of automated trading lists the five that cost the most.

What a bot can and cannot do with your account

A bot connects to a brokerage account through the broker's API. What it can do depends on the permissions in that connection. DeployQuant's broker connections can trade and read, and they cannot withdraw or transfer money. They can be disconnected at any time. Cash and shares stay in your own brokerage account, in your name.

Real money moves only after the user types an explicit confirmation on a live deployment. Paper trading, which needs no broker, runs the same strategy on the live data feed with simulated fills. Alpaca has a paper environment of its own, while Webull and Schwab connections are live-money only. The Alpaca, Webull and Schwab pages list the order types and times in force each one accepts, which matters because a bot whose rule needs a trailing stop does not work on a broker that lacks it. Alpaca lists trailing stop orders and Webull does not.

Several bots can share one account. On DeployQuant each strategy runs in its own sleeve with its own cash, positions and P&L. Orders are tagged with the strategy that placed them and checked against that sleeve's cash, so one bot cannot spend another's money. A strategy that sells everything sells only its own positions. Cash that is not allocated to a sleeve is never traded, and positions you trade by hand stay yours.

A bot has no way to promise a return, and it cannot see anything outside its data. It cannot tell that a fund has changed its objective, that a broker has changed a rule, or that the reason for the strategy has stopped applying. Those need an owner who looks at it from time to time. The decision log helps with that: each decision is logged with the prices and indicator values the strategy saw, so a reviewer can read why each trade happened.

Limits of the measurements

The strategy results come from one window of 5.74 years, with one bear market, 2022. The headline run charges no fees or slippage, and the strategy pages add runs at 5 and 10 basis points. The rules use daily decisions, and fills happen on minute bars. Medians across 59 funds mix funds that behave very differently, and they say little about any single fund. Nothing here says a bot will make money, and the figures should be read as a record of how simple rule sets behaved in a particular stretch of market.

Frequently asked questions

What is a trading bot?

A trading bot is software that watches market data and places orders with a broker automatically, following rules set in advance. The rules can be as short as one indicator condition. The bot runs them at the same times every session without discretion.

Do trading bots make money?

It depends on the rules and the fund. In this library the highest median CAGR across 59 funds was 6.61%, for the weekly 7% target, while buy-and-hold on SPY returned 14.56% a year in the same window. The best template beat buy-and-hold on 34 of 59 funds, so results varied widely by fund.

What is the difference between a trading bot and algorithmic trading?

Algorithmic trading is the practice of executing trades by predefined rules. A trading bot is the software that carries it out, from a hobby script to a managed platform strategy. The two terms often describe the same thing from different sides.

Is a trading bot safe to connect to my brokerage account?

It depends on the permissions and the controls. DeployQuant's broker connections can trade and read but cannot withdraw or transfer money, and real money moves only after a typed confirmation. Price bands, dollar caps, dry-run mode and pause switches limit what a faulty strategy can do.

Do I need to know how to code to run a trading bot?

No. On DeployQuant a strategy can be described in plain English, built from blocks that read as sentences, or written in Python. Every strategy has a Blocks view and a Code view, and you can switch between them.

Why do trading bots fail?

The failure is rarely the signal. It is usually an execution bug, an unhandled edge case or a missing guardrail, and it can also be a position size too large for the fund. Buy-and-hold on TQQQ fell 80.77% peak to trough in this window, which shows how much size alone can cost.

How many trades does a trading bot make?

It depends on the rule. The median fund had 166 round trips under RSI(2) snapback and 106 under the weekly 7% target over 5.74 years. The golden cross had 3 and the dip buyer had 2, so a bot can be quiet for months by design.

Run a strategy that uses this yourself, free →

Build it from blocks (or type it in English), backtest it on 5.7 years of minute data in seconds, tweak any parameter, then paper trade it on live data. No card, no broker needed to start.

Related terms

Algorithmic TradingExecuting trades by predefined rules rather than discretionary judgmen…No-Code TradingBuilding and deploying automated strategies through visual blocks or p…

Backtests are hypothetical, computed by DeployQuant's engine on minute-resolution consolidated US market data (2021-01-04 to 2026-10-02, $10,000 starting capital, no margin, no fees or slippage in the headline run; buy-and-hold puts 98% of the account in at the first open, as the templates do) and do not guarantee future results. Nothing on this page is investment advice. Live trading involves risk of loss.