US ETF fund flow analysis, sector rotation breadth, and style factor flows — track institutional capital movement via ETF creation/redemption, sector breadth signals, and thematic momentum.
57
66%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./agent/src/skills/us-etf-flow/SKILL.mdTrack capital flows through US ETFs to identify institutional positioning, sector rotation trends, and risk appetite shifts. ETF flows are a real-time proxy for institutional capital allocation — unlike 13F filings (45-day lag), ETF creation/redemption data is available daily.
Creation / Redemption process:
Key distinction:
| ETF | Tracking Index | AUM | Flow Signal |
|---|---|---|---|
| SPY | S&P 500 | ~$500B | Broadest equity risk appetite |
| IVV | S&P 500 | ~$400B | Long-term institutional allocation |
| VOO | S&P 500 | ~$400B | Retail + advisor allocation |
| QQQ | Nasdaq 100 | ~$250B | Tech / growth appetite |
| IWM | Russell 2000 | ~$60B | Small-cap risk appetite |
| DIA | Dow Jones 30 | ~$30B | Value / blue-chip sentiment |
Interpretation rules:
# Broad market flow signals
if spy_flow > 0 and iwm_flow > 0:
signal = "risk_on" # Both large and small cap getting inflows
elif spy_flow > 0 and iwm_flow < 0:
signal = "quality_flight" # Money rotating to large-cap safety
elif spy_flow < 0 and iwm_flow < 0:
signal = "risk_off" # Broad equity outflows
elif spy_flow < 0 and iwm_flow > 0:
signal = "risk_seeking" # Rotation from large to small (rare, usually early cycle)| ETF | Sector | Economic Sensitivity | Cycle Phase |
|---|---|---|---|
| XLK | Technology | Growth / late cycle | Expansion |
| XLF | Financials | Rate sensitive | Early recovery |
| XLE | Energy | Commodity linked | Late cycle / inflation |
| XLV | Healthcare | Defensive | Recession |
| XLY | Consumer Discretionary | Cyclical | Recovery |
| XLP | Consumer Staples | Defensive | Recession |
| XLI | Industrials | Cyclical | Early expansion |
| XLU | Utilities | Defensive / rate sensitive | Late cycle / recession |
| XLB | Materials | Commodity linked | Early cycle |
| XLRE | Real Estate | Rate sensitive | Rate-cut cycle |
| XLC | Communication Services | Growth (META, GOOGL) | Expansion |
| ETF | Factor | Signal |
|---|---|---|
| IVW / SPYG | S&P 500 Growth | Growth appetite |
| IVE / SPYV | S&P 500 Value | Value rotation |
| MTUM | MSCI USA Momentum | Trend following |
| QUAL | MSCI USA Quality | Quality flight |
| USMV / SPLV | Min Volatility | Defensive positioning |
| SIZE | MSCI USA Size | Small-cap factor |
| ETF | Segment | Signal |
|---|---|---|
| TLT | 20+ Year Treasury | Duration / rate expectations |
| IEF | 7-10 Year Treasury | Intermediate rate view |
| SHY | 1-3 Year Treasury | Cash proxy / safe haven |
| LQD | Investment Grade Corp | Credit appetite |
| HYG / JNK | High Yield Corp | Risk appetite / credit cycle |
| TIP | TIPS | Inflation expectations |
| EMB | EM Sovereign Debt | EM risk appetite |
Sector breadth analysis:
# Sector breadth = number of sectors with positive flows / total sectors
sector_flows = {
"XLK": +500, # $500M inflow
"XLF": +200,
"XLE": -100,
"XLV": +50,
"XLY": -300,
"XLP": +100,
"XLI": +150,
"XLU": -50,
"XLB": +80,
"XLRE": -200,
"XLC": +300,
}
positive_sectors = sum(1 for v in sector_flows.values() if v > 0)
breadth = positive_sectors / len(sector_flows)
# Interpretation
# breadth > 0.7: broad-based inflows → healthy bull market
# breadth 0.4-0.7: selective rotation → stock/sector picker's market
# breadth < 0.4: broad outflows → risk-off environmentCyclical vs Defensive ratio:
cyclical = ["XLK", "XLY", "XLI", "XLF", "XLB"]
defensive = ["XLV", "XLP", "XLU", "XLRE"]
cyclical_flow = sum(sector_flows[s] for s in cyclical)
defensive_flow = sum(sector_flows[s] for s in defensive)
ratio = cyclical_flow / (cyclical_flow + defensive_flow + 1e-10)
# ratio > 0.65: strong risk-on, cyclical leadership
# ratio 0.4-0.65: balanced
# ratio < 0.4: defensive rotation, risk-offGrowth / innovation themes:
| Theme | Key ETFs | What It Tracks |
|---|---|---|
| AI / Semiconductors | SMH, SOXX, BOTZ | AI capex cycle |
| Clean Energy | ICLN, TAN, QCLN | Energy transition spend |
| Biotech | XBI, IBB | Pharma pipeline / M&A cycle |
| Cybersecurity | CIBR, HACK | Security spending cycle |
| China Internet | KWEB, FXI | China tech sentiment |
| India | INDA, SMIN | India growth allocation |
| Emerging Markets | EEM, VWO | EM risk appetite |
| Gold Miners | GDX, GDXJ | Gold price leverage play |
| Bitcoin | IBIT, FBTC | Crypto institutional adoption |
Thematic flow interpretation:
Signal construction:
def etf_flow_signal(ticker, lookback_days=20):
"""
Generate trading signal from ETF flow data.
"""
# Cumulative flow over lookback period
cum_flow = sum(daily_flows[ticker][-lookback_days:])
# Flow as % of AUM (normalized)
flow_pct = cum_flow / aum[ticker]
# Flow momentum: recent 5-day vs prior 15-day
recent = sum(daily_flows[ticker][-5:])
prior = sum(daily_flows[ticker][-20:-5])
momentum = recent - prior
# Signal
if flow_pct > 0.02 and momentum > 0:
return "strong_inflow" # Sustained and accelerating
elif flow_pct > 0.01:
return "mild_inflow" # Positive but not accelerating
elif flow_pct < -0.02 and momentum < 0:
return "strong_outflow" # Sustained and accelerating outflows
elif flow_pct < -0.01:
return "mild_outflow"
else:
return "neutral"Contrarian vs momentum flow signals:
import yfinance as yf
# ETF price and volume data
etf = yf.download("SPY", start="2025-01-01", end="2026-03-30", progress=False)
# ETF info (AUM, expense ratio, holdings)
spy = yf.Ticker("SPY")
info = spy.info
print(f"AUM: {info.get('totalAssets')}")
print(f"Expense ratio: {info.get('annualReportExpenseRatio')}")
# Sector weights (for sector ETFs)
# Not directly available via yfinance; use web scraping or manual input| Source | Access | Coverage | Latency |
|---|---|---|---|
| ETF.com | Free (web) | US ETFs | T+1 |
| Bloomberg Terminal | Paid | Global ETFs | Real-time |
| ICI (Investment Company Institute) | Free (weekly) | US mutual fund + ETF aggregate | T+7 |
| ETF Database (etfdb.com) | Free (web) | US ETFs | T+1 |
| VettaFi | Free (web) | US ETFs | T+1 |
## ETF Flow Analysis — [Date Range]
### Broad Market Flows
- **SPY**: [+/- $X.XB over N days] — [risk-on / risk-off signal]
- **QQQ**: [+/- $X.XB] — [tech appetite]
- **IWM**: [+/- $X.XB] — [small-cap sentiment]
- **Overall**: [risk-on / selective / risk-off]
### Sector Rotation
- **Inflow leaders**: [sector1 +$XM, sector2 +$XM]
- **Outflow leaders**: [sector1 -$XM, sector2 -$XM]
- **Breadth**: X/11 sectors with positive flows
- **Cyclical/Defensive ratio**: X.XX [risk-on / balanced / defensive]
### Style Factor Flows
- **Growth vs Value**: [growth leading / value leading / balanced]
- **Momentum**: [inflow / outflow]
- **Quality/MinVol**: [inflow = defensive, outflow = risk-on]
### Fixed Income Flows
- **Duration signal**: TLT [inflow/outflow] → [rate cut expectations / rate concern]
- **Credit signal**: HYG [inflow/outflow] → [credit cycle expansion / contraction]
- **Inflation signal**: TIP [inflow/outflow] → [rising / falling inflation expectations]
### Thematic Highlights
- [Theme1 ETF]: [flow trend and implication]
- [Theme2 ETF]: [flow trend and implication]
### Composite Signal
| Dimension | Signal | Basis |
|-----------|--------|-------|
| Risk appetite | [on/off] | SPY+QQQ flows, C/D ratio |
| Sector rotation | [early/mid/late cycle] | Sector flow pattern |
| Rate expectations | [cuts/hold/hikes] | TLT + TIP flows |
### Investment Implication
- **Positioning**: [overweight equities / neutral / underweight]
- **Sector tilts**: [overweight X, underweight Y]
- **Risk level**: [high / moderate / low]8643fcd
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.