Playbooks

AI Stock Trend Rotation: Top 5 Momentum Leaders, +220% Backtest

Published

Own the five strongest AI stocks, but only while their uptrends hold. This AlphaPilot user tested that idea on twelve stocks tied to the AI build-out. The rules are short. Every Monday the strategy ranks the stocks that are trending up and buys the leaders. Every other day it sells anything whose trend breaks. If nothing qualifies, it holds cash.

How it works

The universe is twelve stock perpetuals, traded long-only with no leverage on daily bars. Each stock is scored with three numbers, all computed from daily closes:

  • 60-day momentum: how far the price has moved over the last 60 bars.
  • 50-day average: the medium-term trend.
  • 200-day average: the long-term trend.
mom60=PtPt−60−1\text{mom}_{60} = \frac{P_t}{P_{t-60}} - 1

A stock is eligible only when all three trend measures line up:

Pt>MA50>MA200andmom60>0P_t > \text{MA}_{50} > \text{MA}_{200} \quad\text{and}\quad \text{mom}_{60} > 0
12 AI-linked stock perps NVDA · AMD · MSFT · GOOGL · META · TSLA PLTR · AMZN · ORCL · MU · TSM · AVGO Trend filter: must pass all three 1. Close above its 50-day average 2. 50-day average above 200-day average 3. 60-day return above zero Every Monday: rank by 60-day return only stocks that passed the filter Buy the top 5 at 20% each Fewer than 5 pass? Unused slots stay in cash Tuesday to Friday: daily check Sell any holding that fails the filter. No new buys.
The full rule set. Entries happen only on Mondays. Exits can happen on any day.

Each position gets one fifth of the account, so the portfolio is fully invested only when at least five stocks pass the filter. In a weak market only a few stocks pass, or none, and the rest of the money stays in cash. The strategy never sizes up its remaining holdings to fill the gap.

Eligible Out → cash close < 50-day avg Price 50-day avg 200-day avg
A stock becomes eligible once the 50-day average is above the 200-day and the price is above both. It stays eligible until a daily close falls below the 50-day average (red dot). The averages lag, so a sharp drop can cost money before the exit triggers.

Backtest results

The test ran from January 1, 2022 to October 23, 2026 on daily bars. It started with $10,000 and charged 0.03% friction per trade.

+220.38%

Annual return

+27.36%

1.10

Max drawdown

23.26%

Ending value≈ $32,000 (+220.4%)
Benchmark return+310.1%
Average exposure58% long, never short
Trades601
Fees paid4.5% of starting capital
Months up / down / flat31 / 20 / 7
Best month+26.9% (May 2026)
Worst month−10.3% (Aug 2023)
JFMAMJJASOND Year 20222023202420252026 Jan 2022: −9.1% Feb 2022: −0.6% Mar 2022: +0.0% Apr 2022: −4.3% May 2022: 0% (cash) Jun 2022: 0% (cash) Jul 2022: 0% (cash) Aug 2022: 0% (cash) Sep 2022: 0% (cash) Oct 2022: 0% (cash) Nov 2022: 0% (cash) Dec 2022: +0.1% −13.3% Jan 2023: +2.2% Feb 2023: +2.4% Mar 2023: +9.1% Apr 2023: −0.3% May 2023: +22.9% Jun 2023: +5.0% Jul 2023: +9.5% Aug 2023: −10.3% Sep 2023: −8.6% Oct 2023: −6.1% Nov 2023: +7.5% Dec 2023: +3.9% +38.4% Jan 2024: +7.2% Feb 2024: +15.3% Mar 2024: +0.4% Apr 2024: −6.6% May 2024: +5.3% Jun 2024: +10.5% Jul 2024: −4.9% Aug 2024: −7.0% Sep 2024: +4.3% Oct 2024: −0.6% Nov 2024: +23.8% Dec 2024: +3.7% +59.0% Jan 2025: +1.8% Feb 2025: −2.3% Mar 2025: −2.2% Apr 2025: +0.7% May 2025: +1.6% Jun 2025: +5.3% Jul 2025: +9.2% Aug 2025: −3.9% Sep 2025: +8.6% Oct 2025: +15.2% Nov 2025: −3.7% Dec 2025: +0.1% +32.6% Jan 2026: +9.5% Feb 2026: +0.7% Mar 2026: −4.2% Apr 2026: +18.8% May 2026: +26.9% Jun 2026: +2.3% Jul 2026: −10.1% Aug 2026: −6.0% Sep 2026: −0.7% Oct 2026: −7.3% (to Oct 23) +26.7% Loss Gain Flat (all cash) darker = larger
Monthly returns. Each year is compounded in the right column, and 2026 runs to October 23. Seven grey months in 2022 show the strategy sitting entirely in cash.

What the numbers say. The strategy compounded at 27.4% a year with a Sharpe ratio of 1.10. Its worst peak-to-trough loss was 23.3%. It did not beat the benchmark, which returned 310.1% against 220.4%. It also had only 58% of its capital at work on average. Most of the gap comes from the time it spent partly or fully in cash.

That cash came from the trend filter, and it paid off in 2022. That year the Nasdaq-100 fell by about a third. The strategy lost 13.3%, almost all of it from January to April. From May through November it held nothing, because no stock passed the filter. It came back in when trends rebuilt in 2023.

The weak spots show on the heatmap. From August to October 2023, the account fell about 23% from peak to trough at month-end. From July to October 2026 it fell about 22%, and that drawdown was still open when the test ended.

Why it works

1. Leaders tend to keep leading. Prices often take weeks or months to absorb good news, such as earnings upgrades, guidance raises and capex announcements. Investors under-react at first, then pile in. Ranking by 60-day return catches stocks in the middle of that process. In a universe built around one theme, AI spending, the same forces push several names at once. That gives the strategy plenty of strong trends to rotate through.

2. The filter decides when to play, not just what to buy. A stock must sit above two rising averages and also have positive momentum. In a broad selloff, few stocks pass that test, so the portfolio shrinks on its own. Nobody has to call the top. The 58% average exposure is that filter at work. It gives up some upside in strong markets and keeps the account out of the worst of the bad ones.

3. Losers get cut fast and winners get to run. A holding is checked every day and sold as soon as its trend breaks. A winner is never sold for being "up too much". Over the test, that produced a lopsided payoff. The average up month gained +7.5% and the average down month lost −4.9%. Seven months gained more than 10%. No month lost more than 10.3%.

Below −5% −5% to 0% 0% (in cash) 0% to +5% +5% to +10% +10% to +20% Above +20% 9 11 7 15 9 4 3
Number of months in each return bucket, out of 58. The gains stretch out to the right, past +20%. The losses stop at about −10%.

Where it struggles. Moving averages lag. When a crowded trade reverses hard, the strategy gives back gains before the 50-day line catches up. It may then rotate into another stock that falls with the rest of the group. Both big drawdowns, in late 2023 and late 2026, followed exactly this pattern. All twelve stocks ride the same theme, so they tend to fall together.

The universe also has a built-in bias. These twelve names were picked by someone who knows how the AI trade has gone, so the results flatter the idea. A fair test would run the same rules on a broader or differently themed list.

Ideas to push it further

1. Rank by risk-adjusted momentum and size by volatility

Right now the most volatile stock gets the same 20% as the steadiest one. Both drawdowns came when high-flyers reversed together. Ranking by return per unit of volatility, and giving calmer trends more weight, could cut those late-cycle losses. Check whether the max drawdown drops below 23.3% while the Sharpe ratio stays above 1.10.

2. Put idle cash to work when only a few stocks qualify

The strategy was only 58% invested on average, and it trailed the benchmark by about 90 percentage points. When three or four stocks pass the filter, 20–40% of the account sits idle even in a clear uptrend. Letting each holding grow to a third of the account, but no more, keeps a floor on diversification and puts more money in the trend. Check whether total return rises faster than the drawdown does.

The basic design is a trend filter, a momentum rank and a fixed number of slots, and it works on any universe. You could try it on another theme, add a sector, or change the 60-day lookback. AlphaPilot can backtest your version in minutes.

Built by an AlphaPilot user. Historical backtest results do not predict future returns. Not investment advice.