DayTraderScripts
← Back to blog
SetupsSector RotationScanner

Sector rotation: a simple relative-strength scan that beats the index

The two-line ratio that surfaces leading sectors in real time — and the scan we run every morning before the open.

DayTraderScripts Desk·May 9, 2026·3 min read

The S&P 500 doesn't move all at once. On any given day there are 2–3 sectors leading and 2–3 sectors lagging — and the spread between them is where the easiest intraday trades live.

This post is the scan we run every morning to find them.

What relative strength actually measures

For a stock or ETF X versus the index (SPY), the relative strength ratio is just:

RS(X) = price(X) / price(SPY)

When that ratio is rising, X is outperforming the index. Falling — underperforming. Most traders plot RSI and think it's "relative strength." It's not. RSI is a momentum oscillator on a single instrument. The ratio above is what institutional desks call RS.

The scan, in plain English

Every morning before the open, we scan all 11 SPDR sector ETFs (XLK, XLF, XLE, XLY, XLV, XLI, XLB, XLP, XLU, XLRE, XLC) for:

  1. 20-day RS rising: today's RS > the 20-day moving average of RS.
  2. 5-day RS rising faster than 20-day: short-term momentum confirming the longer-term trend.
  3. Volume confirmation: yesterday's volume > 1.2× the 20-day average.

If all three print, the sector is in an active rotation phase. We mark the top three and the bottom three. The top three become long candidates; the bottom three become short candidates (or "don't buy this" lists).

The thinkScript scan

# RS vs SPY rising
def rs       = close / close("SPY");
def rsMA20   = Average(rs, 20);
def rsMA5    = Average(rs, 5);
def rsRising = rs > rsMA20 and rsMA5 > rsMA20;

# volume confirmation
def volOK    = volume[1] > Average(volume, 20)[1] * 1.2;

plot scan = rsRising and volOK;

Save this as a study, then in the ToS Scanner add it as a custom condition. Set the universe to the 11 SPDRs and you have a 5-second morning read.

What to do with the leaders

Once you've got two or three leading sectors, drill down into the top RS components of each:

  • Lead sector XLK? Pull the top RS names — AAPL, MSFT, NVDA, AVGO — and run your normal intraday setups on them.
  • Lead sector XLE? XOM, CVX, SLB, OXY become your long watchlist.

The point is not to trade the sector ETF (though you can). The point is to trade the strongest names inside the strongest sector. The leader of the leader compounds two layers of relative strength.

The lagging sector trick

The mirror image of the long side: take the bottom-three sectors, find the weakest components, and you have your short watchlist for the day.

A short setup in a weak name inside a weak sector is the cleanest mean-reversion failure trade we know. The mean doesn't get reclaimed, the lower-high holds, and the name rolls.

The "everything green" exception

On strong index trend days, all 11 sectors can look green. The scan returns 11 leaders. This is when you switch frames:

  • Run the same scan on 1-week and 1-month windows instead of 20-day.
  • The sectors with rising weekly and monthly RS — usually still only 2 or 3 — are the high-conviction long candidates.

Why this works

Capital is finite. Even on bullish index days, money is rotating within the index. The flows show up first in price, then in volume, then in news. Relative strength catches the flow before the news catches up. That's the lag we trade.

We're shipping a TradingView screener and a ToS watchlist column for this in the next release of Liquidity Sweep Scanner — the same column that ranks names by RS gets repurposed for full-sector rotation reads.

Keep reading