The market is down 2.5%. Oil is surging. Defense stocks are ripping. And in the middle of the carnage, something interesting is happening: software stocks are green. Not just holding flat — actually ticking higher while the S&P 500 bleeds red. If you understand what this signal means, and you have the tools to systematically identify it, you're looking at one of the most reliable setups in equity markets.
The concept is simple. The execution — without AI tools — is nearly impossible at the speed required. Here's the complete playbook.
Why Relative Strength Works: 50 Years of Evidence
Relative strength — the tendency for stocks outperforming the market to continue outperforming — is one of the most robust anomalies in finance. It's been documented across 50+ years of data, multiple countries, and different market regimes. Here's the academic evidence:
Jegadeesh & Titman (1993): The landmark study that launched modern momentum research. Stocks in the top performance decile over the prior 3-12 months outperformed bottom-decile stocks by approximately 12% per year on average. The effect persisted across different time periods, market conditions, and stock characteristics.
O'Shaughnessy (What Works on Wall Street, multiple editions): Tested relative strength across 80+ years of U.S. market data. Stocks with the highest 6-month relative strength, combined with value metrics, produced the highest risk-adjusted returns of any quantitative strategy tested. The compound annual return advantage was 4-6% over the market — which compounds to life-changing differences over a career.
Dorsey Wright & Associates: Built an entire asset management firm ($5B+ AUM) around relative strength strategies. Their research shows that relative strength works at the stock, sector, and asset class level — and that it works better during periods of high dispersion (exactly what happens during geopolitical selloffs, when some sectors rally while others crash).
The intuition behind relative strength is institutional behavior. When a stock holds up during a selloff, it means someone is buying while everyone else sells. That "someone" is almost always institutional money — mutual funds, pension funds, hedge funds — making deliberate allocation decisions based on fundamental analysis. They're using the broad market weakness as a buying opportunity in their highest-conviction positions. When selling pressure eventually lifts, these stocks rally fastest because there's a floor of institutional demand underneath them.
The 'Green on Red' Pattern: Why It's Strongest During Geopolitical Events
Not all relative strength signals are equal. Relative strength measured during geopolitical selloffs is significantly more predictive than relative strength during normal market volatility. Here's why:
During a normal pullback, stocks hold up for many reasons — short squeezes, retail meme activity, pending earnings, technical support levels. These signals are noisy. But during a geopolitical selloff, almost all non-fundamental buying dries up. Retail traders freeze or panic sell. Short sellers cover their least-convicting positions. Meme stocks collapse. The only buying activity comes from institutional investors with genuine fundamental conviction.
This natural filtering effect means that "green on red" stocks during a geopolitical event represent the purest signal of institutional conviction in the market. It's like a stress test for your stock picks — the ones that survive are the strongest.
The current Iran-driven selloff has surfaced a clear sector pattern:
- Cybersecurity (CRWD, PANW, FTNT, ZS): Direct beneficiaries of Iranian cyber threats. Every CISA alert drives enterprise security spending higher. CrowdStrike's Falcon platform is deployed across many U.S. banks that are bolstering defenses.
- Cloud infrastructure (MSFT Azure, AMZN AWS, GOOG Cloud): Zero supply chain exposure. Revenue is recurring, sticky, and growing at 20%+ annually. These are the ultimate "hide in quality" plays.
- Enterprise SaaS (CRM, NOW, SNOW, DDOG): Subscription-based revenue, 90%+ gross margins, no physical inputs. When oil doubles, Microsoft's cost structure doesn't change.
- AI/automation (NVDA, AMD, PLTR): The AI infrastructure buildout continues regardless of Persian Gulf politics. NVIDIA's data center revenue isn't affected by tanker routes.
AI Tools That Automate Relative Strength Scanning
Manually checking hundreds of stocks for relative strength during a selloff is impossibly slow. By the time you've reviewed 50 charts, the best opportunities have moved. AI-powered scanners solve this by screening the entire market in seconds. Here are the best tools for the job:
TrendSpider: Offers automated multi-timeframe relative strength scoring with built-in alerts. You can set up a scanner that filters for stocks with RS > 1.0 (outperforming the benchmark) across daily, weekly, and monthly timeframes simultaneously. TrendSpider's AI also detects trendline breaks, support/resistance levels, and pattern formations — combining relative strength with technical confirmation.
ThinkorSwim (TD Ameritrade): The custom study and scanner capabilities are unmatched for free platforms. You can build custom Relative Strength columns that compare any stock to SPY, its sector ETF, or a custom benchmark in real-time. ThinkScript allows you to create complex conditional scans: "Show me stocks up > 0.5% today where SPY is down > 1.5% AND the stock is above its 21-day EMA AND has a Mansfield RS rank > 80." This kind of multi-factor scan would take hours manually; ThinkorSwim runs it in seconds.
Trade Ideas: AI-powered scanning with Holly, an artificial intelligence that generates daily trade ideas based on backtested strategies. Trade Ideas' real-time scanner can filter by relative strength, unusual volume, options flow, and dozens of other criteria simultaneously. During a selloff, the "Top Gainers in Down Market" scan immediately surfaces the relative strength leaders.
Finviz Elite: Heat maps and screening tools that visualize sector rotation in real-time. During a selloff, Finviz's S&P 500 heat map immediately shows which sectors are red, which are green, and the intensity of the move. It's the fastest way to get a macro overview before drilling into individual names.
Building Your Relative Strength Watchlist: Step by Step
Here's the systematic process for using AI tools to build a relative strength watchlist during a geopolitical selloff:
Step 1: Identify the down day. SPY is down > 1.5% on geopolitical news (not earnings, not Fed — those create different patterns). Confirm with VIX spike > 20% intraday.
Step 2: Run the scan. Using your AI scanner (TrendSpider, ThinkorSwim, Trade Ideas), filter for stocks that are: (a) up on the day or down less than -0.25%, (b) above their 21-day EMA, (c) above their 50-day SMA, (d) with volume at or above the 20-day average (confirming the buying is real, not just light volume float).
Step 3: Sector filter. Group results by sector. You want to identify sector-level themes, not just individual stock anomalies. If 8 out of 10 cybersecurity stocks are green while the market is down 2%, that's a sector theme worth trading. If one random biotech is green, it's probably stock-specific news, not relative strength.
Step 4: Confirm with weekly chart. Check each candidate's weekly chart. You want stocks in established uptrends (higher highs and higher lows on the weekly) that are simply holding their trend during the selloff. Avoid stocks that are green because they were already oversold and bouncing — that's mean reversion, not relative strength.
Step 5: Size and enter. Don't buy everything at once. Use the initial scan day as your watchlist creation date. Enter positions over the next 2-3 sessions as the broad market stabilizes (Phase 2 of the selloff anatomy). Size positions at 3-5% of portfolio per name, maximum 25-30% total exposure to the theme.
The beauty of this system is that it's repeatable and unemotional. When everyone else is watching CNBC with their heart rate elevated, you're running a scan, building a list, and waiting for confirmation. AI tools don't feel fear. They don't hear cable news anchor panic. They just process data. In a market driven by missiles and rhetoric, that's exactly the edge you need.
