# How to automate an ETF rotation strategy: 7 steps

> How to automate an ETF rotation strategy: pick a classic rotation, read its rules and backtest, paper trade it, then run it in your own Alpaca account.

Written by [Tactfolio research team](https://tactfolio.com/about/editorial-policy.md), published 2026-10-16, updated 2026-10-16, data as of 2026-09-25.

To automate an ETF rotation strategy, you write its rules down and test them on past prices. Then software checks the rules and places the trades for you. On Tactfolio, that means copying or building a rotation, reading its backtest, running it on paper, and then connecting your own Alpaca account. For US stocks and ETFs, Tactfolio works with daily prices, holds long positions only, and trades through Alpaca.

## Key points

- An ETF rotation holds the strongest of a few funds and switches on a set schedule, often once a month.
- Automating it means a program checks the rules and places the orders, so you do not have to.
- Test the rules on past prices first, and read the worst drops before the returns.
- Run it with pretend money before you run it with real money.
- A backtest is hypothetical. It shows how rules would have done, not how they will do.

> **Risk note.** An automated strategy trades real money whether or not you are watching. Rules that did well in the past can lose money in the future, and you can lose the money you put in.

## What is an ETF rotation strategy?

An ETF rotation strategy is a set of rules that moves your money between a few exchange-traded funds. An **ETF** is a fund that trades on the stock market like a share. The rules rank the funds by recent strength, hold the leaders, and check again on a schedule.

The idea comes from momentum. **Momentum** is the habit of assets that have risen lately to keep rising for a while. Our guide to [momentum stocks](https://tactfolio.com/learn/momentum-stocks.md) explains the research behind it. Rotation is one form of [tactical asset allocation](https://tactfolio.com/learn/tactical-asset-allocation.md), where rules change your mix as markets change.

Here are two well-known examples:

- **Dual momentum.** Each month, Gary Antonacci's [dual momentum](https://tactfolio.com/strategies/dual-momentum.md) model holds US stocks or foreign stocks, whichever rose more over 12 months. If US stocks did not beat Treasury bills, it holds bonds instead.
- **Faber sector rotation.** Each month, Mebane Faber's [sector rotation](https://tactfolio.com/strategies/faber-sector-rotation.md) holds the three strongest of nine US sector funds. When the S&P 500 is below its 10-month average, it moves to Treasury bills.

## Why automate a rotation?

Automation runs the rules on the right day, even when you are busy. A rotation only works if you follow it each month, including the months when the switch feels wrong.

By hand, people miss dates or skip a switch after a bad month. A program follows the rules the same way each time. That is the core idea of [algorithmic trading](https://tactfolio.com/learn/algorithmic-trading.md): a computer applies written rules and places the orders.

## How to automate an ETF rotation strategy, step by step

Here are the steps in short.

1. Pick a rotation to start from.
2. Copy it to your account and open it in the builder.
3. Read every rule and the schedule.
4. Backtest it and read the drawdowns.
5. Run it on paper first.
6. Connect your own Alpaca account and set the amount it can trade.
7. Check in on a regular schedule.

### 1. Pick a rotation to start from

Start from a rotation with a known source instead of a blank page. Tactfolio's [classic strategies](https://tactfolio.com/strategies/classics.md) include dual momentum, Faber's sector rotation and other rotations, each with its source, rules and backtest. Each one also has a live version you can copy.

You can also describe the idea in words. An AI assistant connected through [Tactfolio's MCP server](https://tactfolio.com/docs/mcp.md) can build, backtest and save a strategy in your account. It cannot trade or publish for you. You still check the rules and make each choice yourself.

### 2. Copy it and open it in the builder

Copy the live version to your account. You need a free account for this. The copy is a private draft that only you can see. You open and edit it in the [strategy builder](https://tactfolio.com/builder).

The builder shows your strategy as a tree of blocks. You can change any block in your copy without touching the original.

### 3. Read every rule and the schedule

In a rotation, the key piece is a **Rank** block. It scores each fund, such as by its 12-month return, and keeps the top few. Many rotations also put an **If / Else** block in front, which acts as a safety switch to move into bonds or bills.

Then check the strategy settings at the top. **Runs** sets how often it checks its signals, such as daily, weekly or monthly. A monthly strategy acts on the last trading day of each month. **Rebalance** sets when holdings go back to their target weights. The [builder guide](https://tactfolio.com/docs/builder.md) explains every block and setting.

### 4. Backtest it and read the drawdowns

A backtest replays the rules on past prices, as if you had followed them. Tactfolio uses daily prices with dividends reinvested and charges a 0.05% cost on every trade. Our guide to [backtesting](https://tactfolio.com/learn/backtesting-explained.md) covers what a test can and cannot tell you.

Read the **drawdown** first. A drawdown is how far the strategy fell from its last high point. Take dual momentum's hypothetical backtest (figures as of September 25, 2026). It lost about a third in early 2020 and took until early 2021 to recover. Ask yourself whether you would have kept going through that.

Then look at the reality checks under the chart. One line shows the same rules trading at the next day's open price instead of the close. Others repeat the test at higher trading costs. If the results fall apart there, the rules depend on perfect timing or cheap trades. [Reading a backtest](https://tactfolio.com/docs/concepts/reading-a-backtest.md) walks through each number.

When you change a setting, test it on several windows, such as 5, 10 and 20 years. A setting that only wins on one stretch of history is often luck.

### 5. Run it on paper first

Paper trading means running the strategy with pretend money at real market prices. In Tactfolio, a paper account in Trade runs one of your strategies and emails you a summary after each close.

You see real switches, on real dates, without risking money. Alpaca also offers its own [paper trading](https://docs.alpaca.markets/docs/paper-trading) account, free to all Alpaca users.

### 6. Connect your own Alpaca account

When you are ready, connect your own [Alpaca](https://alpaca.markets/) account, paper or live, with your own API keys. An **API key** is a password that lets one program act on your account. Your money stays at Alpaca. Tactfolio is not a broker.

You give each strategy a starting balance. It trades only that part of the account and never touches anything else you hold there. So $5,000 set aside for a rotation stays separate from the rest of your account.

For US stocks and ETFs, Tactfolio works on a daily schedule with daily prices. A monthly rotation still trades only when its rules say so, on the last trading day of the month. Live orders can fill at slightly different prices than the backtest assumed.

Know the limits before you start. Strategies hold long positions only, with no short selling or borrowing. An ETF rotation trades US-listed stocks and ETFs, never options or forex, and Alpaca is the broker for those trades.

### 7. Check in on a regular schedule

Check that each trade matches what the rules called for. Compare the live results with the backtest over the same months.

Keep in mind that rotations can trail the market, sometimes by a lot. Faber's sector rotation, in its hypothetical backtest, gained under 4% in 2023 while the S&P 500 gained 26% (as of September 25, 2026). Decide ahead of time what would make you stop, and write it down.

## Common mistakes when automating a rotation

- **Tuning until the backtest looks perfect.** The more settings you try, the more likely the winner is luck.
- **Turning it off after one bad month.** If you stop a rotation in a slump, you lock in the loss and miss any rebound.
- **Forgetting costs and taxes.** Each switch is a sale. In a taxable account, a sale can mean a tax bill that the backtest does not show.
- **Putting in money you need soon.** In their hypothetical ETF-era backtests, the two rotations above fell about 22% and about 33% at their worst.

## Other ways to automate an ETF rotation

You can also automate a rotation without a platform like Tactfolio.

- **Write your own code.** You can write a script, often in Python, that pulls prices, ranks the funds and works out the trades. You then run it on a schedule. You must handle market holidays, missing data and errors yourself.
- **Use a broker's API.** Many brokers let programs place orders through an API. Your script sends the orders on the right day. You are responsible for testing every part, since a bug can place real trades.
- **Do it by hand with reminders.** A spreadsheet and a monthly calendar alert is a half step. You still place the orders, but the rules decide what to buy.

Whichever path you take, be wary of anyone selling a bot with huge or sure returns. The CFTC, a US markets regulator, [warns](https://www.cftc.gov/LearnAndProtect/AdvisoriesAndArticles/AITradingBots.html) that AI cannot predict the future or sudden market changes.

## Try it on Tactfolio

Open [dual momentum](https://tactfolio.com/strategies/dual-momentum.md) or another classic, copy it, and read its rules and backtest in the builder. Run it in a [paper account](https://tactfolio.com/paper-trading.md) before you connect your own [Alpaca account](https://tactfolio.com/alpaca-trading.md). A rotation running in Trade is a [rules-based trading bot](https://tactfolio.com/bots/dual-momentum-bot.md) that [trades your account on a daily schedule](https://tactfolio.com/automated-trading.md). It works on daily prices, long only, in US stocks and ETFs, through Alpaca. Everything is free while we build. Pricing comes with live trading.

## Common questions

### Can you automate an ETF rotation strategy?

Yes. You write the rules down, test them on past prices, and let software check them and place the orders. On Tactfolio, a rotation can run in a paper account or in your own Alpaca account, on daily prices, long only.

### How often should an ETF rotation strategy trade?

It depends on the rules. Many classic rotations check once a month, at the month's last close, and switch only a few times a year. Checking more often reacts faster but trades more, and each trade costs something.

### Do I need to know how to code?

No, not on Tactfolio. You build or copy the rules in a visual builder, or describe them to an AI assistant connected to your account. Coding is one option if you want to run everything yourself.

### Is ETF rotation better than buy and hold?

Not always. In their ETF-era backtests (as of September 25, 2026), dual momentum and Faber's sector rotation both grew less than the S&P 500. Both had smaller worst drops. Rotation trades some return for a chance at smaller losses, and that trade does not always pay.

### Is it safe to let a bot trade my money?

Any automated strategy can lose money, and a bug or bad rule can make costly trades. Start on paper, give a strategy only a set part of your account, and check its trades. A backtest is hypothetical and does not show how the rules will do.

## Put it into practice

- [Trend following bot](https://tactfolio.com/bots/trend-following-bot.md): A trend following bot that holds SPY above its 10-month moving average and Treasury bills below.
- [Backtest a portfolio](https://tactfolio.com/trading-tools/backtest-portfolio.md): Backtest a portfolio of US stocks and ETFs. Enter tickers and shares, pick when to rebalance, and get the results with a link to share.
- [Backtesting](https://tactfolio.com/backtesting.md): Free backtesting software for stocks, ETFs, and crypto perps.

## Sources

- [Dual Momentum: Antonacci's Global Equities Momentum](https://tactfolio.com/strategies/dual-momentum), Tactfolio, figures as of September 25, 2026, accessed 2026-10-16
- [Faber sector rotation](https://tactfolio.com/strategies/faber-sector-rotation), Tactfolio, figures as of September 25, 2026, accessed 2026-10-16
- [Relative Strength Strategies for Investing](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1585517), Mebane Faber, SSRN, 2010, accessed 2026-10-16
- [Risk Premia Harvesting Through Dual Momentum](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2042750), Gary Antonacci, SSRN, 2012, accessed 2026-10-16
- [Customer Advisory: AI Won't Turn Trading Bots into Money Machines](https://www.cftc.gov/LearnAndProtect/AdvisoriesAndArticles/AITradingBots.html), CFTC, accessed 2026-10-16
- [Paper trading](https://docs.alpaca.markets/docs/paper-trading), Alpaca, accessed 2026-10-16
- [Frequently asked questions](https://tactfolio.com/docs/faq), Tactfolio, accessed 2026-10-16
- [Strategy builder guide](https://tactfolio.com/docs/builder), Tactfolio, accessed 2026-10-16
