TL;DR: The correlation trade is a trap. This repo shows why — and what to do instead.
Based on the analysis published at Math and Markets.
The "tech schism" narrative goes like this: semiconductors (SMH), software (IGV), and mega-cap tech (MAGS) used to move together. They no longer do. The SMH/IGV 3-month rolling correlation has collapsed to near zero, sitting at a z-score of −2.69 vs its long-term average. That's a rare breakdown — and rare breakdowns mean-revert. So go long SMH, short IGV, vol-equalized.
This repo runs the numbers on that thesis. The conclusion is that the trade is built on three flawed assumptions, each of which fails under scrutiny.
| File | Description |
|---|---|
tech_schism.py |
Downloads MAGS, IGV, SMH daily adjusted closes via yfinance; computes log returns, 1M/3M rolling correlations, long-term baselines, z-scores, and 21-day realized vol |
three_tests.py |
Three stress tests against the pair trade thesis (see below) |
plot_correlations.py |
Rolling correlation chart for MAGS/IGV, SMH/IGV, MAGS/SMH with z-score panels |
plot_correlations_mu.py |
Same chart with MU (Micron) as a single-stock semiconductor proxy |
tech_schism_timeseries.csv |
Full rolling correlation + log return + vol time series (807 obs) |
tech_schism_summary.csv |
Current 1M/3M corr, long-term avg, delta, and z-scores per pair |
test1_zscore_history.csv |
Full expanding-window z-score history for all three pairs |
test2_trades.csv |
Individual pair trade instances and forward returns |
test3_SMH_IGV_vol_ratio.csv |
SMH/IGV vol ratio time series |
test3_SMH_MAGS_vol_ratio.csv |
SMH/MAGS vol ratio time series |
rolling_correlations.png |
Chart: MAGS/IGV, SMH/IGV, MAGS/SMH |
rolling_correlations_mu.png |
Chart: MAGS/IGV, MU/IGV, MAGS/MU |
summary.txt |
Plain-language summary of all findings |
No.
The SMH/IGV 3-month correlation z-score of −2.69 sits at the 13th percentile of its own history. This pair has been at or below z = −2.0 on 24% of all trading days since MAGS launched. The 5th percentile threshold is −3.17. The all-time low is −3.48.
This isn't a tail event. It's closer to a default state. The "schism" framing treats a routine reading as exceptional.
| Pair | Current z | Percentile | Days ≤ −2.0 | % of history |
|---|---|---|---|---|
| MAGS/IGV | −2.09 | 14.8th | 113/682 | 16.6% |
| SMH/IGV | −2.69 | 13.0th | 166/682 | 24.3% |
| MAGS/SMH | −1.84 | 5.6th | 25/682 | 3.7% |
Not reliably.
15 independent entry signals (≥21-day separation) since April 2024. Forward returns by horizon:
| Horizon | Mean return | Win rate | n | p-value |
|---|---|---|---|---|
| 1 month | +4.98% | 9/13 (69%) | 13 | 0.061 |
| 3 months | +9.10% | 6/10 (60%) | 10 | 0.171 |
| 6 months | +6.74% | 4/8 (50%) | 8 | 0.718 |
The 6-month win rate is a coin flip (p = 0.718). The positive mean is driven almost entirely by three 2025 entries that happened to catch a large SMH outperformance regime driven by AI capex tailwinds — not by the correlation signal itself. The 2024 cluster of entries was largely negative at 3M and 6M horizons, with the worst single outcome reaching −43%.
The signal is not the edge. The AI capex cycle was the edge.
Faster than a monthly rebalance can fix.
The SMH/IGV vol ratio drifts an average of 19.8% (median) within 21 trading days. At the 75th percentile, drift reaches 33%. At the 95th percentile: 73%.
| Window | Mean abs drift | Median | 75th pct | 95th pct |
|---|---|---|---|---|
| 21-day | 25.7% | 19.8% | 33.3% | 73.1% |
| 63-day | 30.8% | 25.9% | 37.1% | 72.1% |
A hedge ratio set today and left untouched for a month will be roughly 20% wrong — before any price move. Vol-neutral is aspirational, not operational, on a static monthly rebalance schedule. With MU (Micron) as the semiconductor leg, the problem compounds: MU is currently running at 126% annualized realized vol, requiring near-continuous resizing to maintain any meaningful vol equivalence.
Amber shading in correlation panels = 3M corr below long-term average. Amber shading in z-score panels = z ≤ −2.0.
The correlation breakdown between SMH and IGV isn't statistical noise — it's real. But it's a symptom, not a signal. The underlying mechanism is the AI infrastructure capex cycle:
- Microsoft is deploying $15–20B/year in datacenter capex, showing up as 150–200 bps of operating margin compression
- That capex flows directly to NVIDIA as revenue and gross profit
- Software multiples compress as AI substitution risk reprices the sector
The trade that captures this is long NVDA / short MSFT, sized by capex intensity — not a vol-equalized ETF pair built on correlation mean-reversion. One trade bets on a financial mechanism that shows up in quarterly earnings reports. The other bets on a statistical pattern returning to its mean, in a pair that spends a quarter of its history at these levels.
- Source: Yahoo Finance via
yfinance - Tickers: MAGS, IGV, SMH, MU
- Range: 2023-04-12 → 2026-06-30 (807 observations, aligned on MAGS ETF inception date)
- Returns: daily log returns on adjusted close prices
- No interpolation of missing data — gaps flagged explicitly
pip install yfinance pandas numpy scipy statsmodels matplotlib
# Pull data and compute correlations
python tech_schism.py
# Run the three stress tests
python three_tests.py
# Generate charts (SMH version)
python plot_correlations.py
# Generate charts (MU/Micron version)
python plot_correlations_mu.pyCopyright K. Iyer 2026 // mathandmarkets.com
Provided as-is, without any warranties, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement. Nothing here constitutes financial advice. Use at your own risk.

