How do taxes work for automated trading?
Automated trading is taxed the way manual trading is. A tax authority looks at the trades that happened in the account, and it does not ask whether a person or a program sent the order. In a taxable US account, a position held for under a year produces a short-term gain or loss, and the usual treatment of short-term gains is as ordinary income. Most systematic strategies hold for days or weeks, so most of their gains land in that short-term bucket.
The general mechanics are simple, and the measured results on this site show where the tax question matters. It gives no tax rates, thresholds or filing rules, because none of those are measured here. Tax rules differ by country and change over time, and the right person to ask is a tax professional or the broker that holds the account.
The measured side is simple. The 12 strategy templates on this site were run from 2021-01-04 to 2026-10-02 on 59 ETFs with $10,000 of starting capital. Their median number of round trips ranges from 2 to 166 over that window. A round trip is one buy and the sell that closes it, and each one is a taxable event in a taxable account. The count of round trips is the best single measure of how much tax paperwork a strategy creates, so most of the analysis below is about that count.
How many taxable events each template creates
The strategy table lists the median round trips per template across the 59 ETFs. The spread is wide. The dip buyer has a median of 2 round trips in the whole window. The golden cross has a median of 3. The trend plus trailing stop rule has 4, and the momentum breakout rule has 6. These four are slow rules. Each one waits for a rare condition, and a year can pass with no trade at all.
At the other end, the RSI(2) snapback has a median of 166 round trips, and the weekly 7% target has 106. The monthly cycle has 69. These three trade many times a year by construction. The weekly rule buys at the first open of every week, and the monthly rule buys the first session of every month and sells the last. Every one of those cycles closes in under a year, so every gain from them is short-term in the usual sense of the term.
The middle group is the trend crossovers and the regime filter. The SMA 10/50 trend has 17 round trips, the EMA 12/26 trend has 22, the 200-day regime filter has 18, and the 3-month momentum rule has 12. RSI mean reversion has 15. Over 5.74 years, 17 round trips is about three a year. That is a small number of trades to report, but each one can be a gain or a loss, and the position is held for weeks or months rather than days.
These are medians across 59 funds, so any one fund can sit well away from them. The strategy pages list the count for each ETF.
Holding period decides the category
The holding period is the quantity that sorts a trade into short-term or long-term. A rule that exits in days can never reach the long category. A rule that exits rarely might.
The golden cross is the clearest example in the template set. It holds while the 50-day average sits above the 200-day average and steps aside after the death cross. Its median is 3 round trips over 5.74 years. A position opened after a golden cross can stay open for well over a year, and a trade that lasts that long would fall on the long side of a one-year line. Whether it does depends on the fund and the dates, which the per-ETF trade lists on the golden cross page show.
The trend plus trailing stop rule works the same way. It enters above the 200-day average and exits only when a 15% trailing stop is hit, so the hold can be long when the trend is clean. Its median drawdown is 31.15%, the deepest of the slow rules, which is the price of staying in until the stop triggers.
Buy-and-hold is the limit case. Every buy-and-hold run in the facts has one fill and 0 round trips. SPY from the first open to the last day returned 125.29% in total, and the run has no sale at all until the window ends. In a taxable account that gain stays unrealized for as long as the position is kept. The strategies that sell often convert their gains into realized ones year by year.
The point about timing is separate from the size of any tax bill. A realized gain is reported in the year it happens. An unrealized gain is not reported until the sale. A strategy that sells 166 times in a window has realized something on nearly every one of those sales, while a buy-and-hold run has realized nothing.
Wash sales and strategies that re-enter quickly
A wash sale is a general idea with a specific definition in tax law: a loss on a sale can be adjusted when the same security is bought again within a short window around the sale. The window the short answer on this page gives is 30 days. The exact rules, what counts as the same security, and how the loss carries into the new position are questions for a tax professional or the broker's tax documents.
The strategy type matters here. Mean-reversion rules buy weakness, and weakness often continues for a few days after the first buy. The RSI mean reversion template buys when the 14-day RSI drops below 30 and sells above 70. The RSI(2) snapback buys 2-day RSI readings under 10 and exits when RSI(2) recovers above 70. Both can sell at a loss and buy the same fund again soon after, because the signal fires on the same kind of washout.
The market examples show how common those signals are. SPY had 146 sessions with RSI(2) below 10 in the window, and QQQ had 144. UVXY had 116 sessions with the 14-day RSI below 30. A fund with that many signal days gives a rule many chances to re-enter close to an earlier exit.
Trend rules have the same exposure in a different form. A crossover rule can whipsaw. It sells when the average crosses down, the price rebounds, and the rule buys back within weeks. SPY crossed its 200-day average 30 times in the window and QQQ crossed it 20 times, which is how often a 200-day rule on those funds had a reason to flip. A rule that flips often near the line produces loss sales followed by quick re-entries.
None of this changes the pre-tax results on the strategy pages. It does change how the loss shows up on a tax form, and that is a reason to keep the fill history and read the broker's year-end documents.
Turnover is a pre-tax cost as well
Taxes are one drag that grows with trading. Trading costs are another, and the backtests on this site measure that one. The headline runs have no fees or slippage. The cost runs add 5 and 10 basis points per trade, and the strategy pages show what that does to each template.
The related question on this site, how often should a trading strategy trade, makes the point that turnover is a cost the strategy has to earn back. The same applies after tax. A strategy that trades 166 times in 5.74 years has to cover its trading costs, and in a taxable account it also has to cover the tax on its realized gains.
The results by template show why this matters. The RSI(2) snapback has a median CAGR of 4.74% and beat buy-and-hold on 34 of 59 funds. The weekly 7% target has a median CAGR of 6.61% and also beat buy-and-hold on 34. The monthly cycle has a median CAGR of 5.46% and beat buy-and-hold on 14 of 59. The slow rules are lower. The golden cross has a median of 2.05% and the dip buyer 1.33%. Two of the templates, momentum breakout and 3-month momentum, have a median CAGR of 0%, because on the median fund they spent most of the window out of the market or ended flat.
These are pre-tax figures from one window, with no fees in the headline run. They show where the active strategies earn more before tax, and they say nothing about what remains after tax, because the facts include no tax calculation. Any comparison of after-tax results needs the account type, the person's tax situation and the actual fills.
What buy-and-hold looks like for tax purposes
The buy-and-hold results in the facts give a reference point for the low-turnover end. Each run buys at the first open with 98% of the account and holds to the end, so it has 1 fill and 0 round trips.
SPY grew $10,000 to $21,820 over the window, a CAGR of 14.56% with a maximum drawdown of 23.99%. QQQ ended at $24,265 with a CAGR of 16.7% and a drawdown of 34.23%. IWM ended at $15,145, a CAGR of 7.5%. TQQQ ended at $36,585 with a CAGR of 25.35% and a maximum drawdown of 80.77%. TLT ended at $6,106, a CAGR of -8.23%. UVXY ended at $216.
From a tax angle, these are the cases where nothing is realized until the end. The gain on SPY or QQQ is a large unrealized number, and the reporting of it waits for the sale. The loss on TLT and UVXY is also unrealized. A holder of a losing fund can sell to realize the loss, and what the tax rules then do with that loss, including the wash-sale rule if the fund is bought back, is the question for a professional.
The funds also differ in how often a strategy would trade them. TQQQ has an average intraday range of 4.74% and UVXY of 7.03%, against 1.15% for SPY. A rule with a fixed percentage target or stop on a fund with a wide range hits that level more often, so it makes more round trips on TQQQ and UVXY than on SPY. A taxable-account holder who runs the same rule on a volatile fund gets more taxable events from it.
Account type and where the strategy runs
The short answer on this page lists one common mitigation: run high-turnover strategies inside tax-advantaged accounts where the broker supports it, and keep taxable accounts for low-turnover approaches. That is general information and not advice. Whether a given account type is available, and what trading is allowed in it, is set by the broker and by local rules.
DeployQuant runs strategies in the user's own brokerage account. The product reference lists three brokers: Alpaca with live and paper, Webull live only, and Charles Schwab live only. The account type is whatever the user opened at the broker. The platform does not hold the money, and its broker connections have trade and read permissions only. They cannot withdraw or transfer money.
Several strategies can share one account, each in its own sleeve with its own cash, positions and P&L. For tax records this has a practical consequence. The broker reports fills for the whole account, and the platform tags every order with the strategy that placed it. The platform's books follow the broker's own fill reports. A user who runs a slow strategy and a fast one in the same taxable account gets the combined fill history from the broker and the per-strategy split from the platform.
Paper trading needs no brokerage account, and it creates no taxable events because no real orders are sent. A user can paper trade a high-turnover rule first and count how many round trips it makes before deciding which account, if any, should run it. The round-trip count on a strategy page is a measured quantity, and it is the input a tax professional would want first.
Records worth keeping
The short answer on this page ends with the advice to export the fill history at year end. The glossary entry for a fill defines it as the execution of an order, the moment shares change hands at a specific price and quantity. A strategy's real results are the sum of its fills.
Each fill carries a date, a symbol, a quantity and a price, which are the fields a tax calculation starts from. The platform journals every fill with its price, size and the rule that ordered it, and it reconciles them against broker records. The decision log also records the prices and indicator values the strategy saw at each decision, so a user can read why a trade happened.
One detail from the trade lists matters for anyone comparing numbers. Prices in the backtest trade lists are adjusted for splits and dividends, so they are lower than the quotes printed at the time. They are adjusted prices, and they are not the prices a broker would have reported on a tax form. A tax calculation uses the broker's own records of real fills. The backtest numbers are for judging a strategy, and they are not a tax record.
A practical routine has three parts. Keep the broker's year-end tax documents. Keep the platform's fill history for the strategies that ran. Compare the two when a number looks off. A tax professional who works with active traders can say how the documents should be read, and how losses, short-term gains and re-entries are treated in the user's country.
Limits of this page
No claim is made about any tax rate, threshold or filing rule. Those depend on the country, the account type and the year, and none are in the data behind this page.
The measured parts are limited to one window, 2021-01-04 to 2026-10-02, and to daily-decision rules on US ETFs. The headline runs have no fees or slippage. The round-trip counts are medians across 59 funds, and a single fund can have far more or far fewer trades than the median. The market examples cover SPY, QQQ, TLT, TQQQ, IWM and UVXY, and each one is a single path through one stretch of market history.
The tax discussion is general. It describes how short-term gains, holding periods and wash sales work as ideas. It does not say how much tax any strategy would have owed, because no such calculation was run. For an actual decision, check with a tax professional or the broker that holds the account.
Frequently asked questions
Is automated trading taxed differently from manual trading?
No. The tax treatment depends on what was traded, how long it was held and the type of account, and it does not depend on whether a program sent the order. In a taxable US account, positions held under a year produce short-term gains. Check the details with a tax professional or your broker.
Which strategies create the most taxable events?
The ones with the most round trips. Across the 59 ETFs, the median is 166 for the [RSI(2) snapback](/learn/strategies/rsi2-dip-snapback/), 106 for the [weekly 7% target](/learn/strategies/weekly-profit-target/) and 69 for the [monthly cycle](/learn/strategies/monthly-cycle/). Each round trip is a realized gain or loss in a taxable account.
Which strategies create the fewest?
The [dip buyer](/learn/strategies/dip-buyer-8pct-target/) has a median of 2 round trips over 5.74 years, the [golden cross](/learn/strategies/golden-cross/) has 3 and the [trend plus trailing stop](/learn/strategies/trend-trailing-stop/) rule has 4. Buy-and-hold has 0 round trips and 1 fill. These counts are medians, and single funds differ.
What is a wash sale and does it affect automated strategies?
A wash sale adjustment can apply when a position is bought again within about 30 days of a sale at a loss. Mean-reversion rules such as [RSI mean reversion](/learn/strategies/rsi-mean-reversion/) can trigger it because the same oversold signal can fire again soon after an exit. The exact rules are for a tax professional.
Does DeployQuant calculate my taxes?
The facts for this page do not describe a tax calculation. The platform journals every fill with its price, size and the rule that ordered it, and it reconciles fills against broker records. Those records are the raw material for a tax professional, and the broker's own year-end documents remain the official source.
Does paper trading create a tax bill?
No real orders are sent in paper trading, and it needs no brokerage account. It is a way to count the round trips a rule makes before running it with money. Live trading through [Alpaca](/learn/brokers/alpaca/), [Webull](/learn/brokers/webull/) or [Charles Schwab](/learn/brokers/schwab/) creates real fills.
Are the backtest prices usable for a tax return?
No. The trade lists show prices adjusted for splits and dividends, so they are lower than the quotes printed at the time. A tax return uses the broker's records of real fills.
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.
Terms used here
Related questions
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.