Skip to main content
ClaudeWave
Skill12k estrellas del repoactualizado today

us-etf-flow

us-etf-flow tracks institutional capital allocation by analyzing ETF creation and redemption flows, sector rotation patterns, and style factor positioning in real time. Use this skill to identify institutional demand shifts, sector rotation breadth, and risk appetite changes faster than traditional 13F filings, which lag by 45 days. Daily ETF flow data reveals whether large capital is moving into or out of broad market positions, rotating between sectors, or shifting between large-cap and small-cap exposure.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/us-etf-flow && cp -r /tmp/us-etf-flow/agent/src/skills/us-etf-flow ~/.claude/skills/us-etf-flow
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# US ETF Flow & Sector Breadth Analysis

## Overview

Track 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.

## Core Concepts

### 1. ETF Flow Mechanics

**Creation / Redemption process:**
- **Inflows (creation)**: Authorized Participants (APs) deliver baskets of underlying securities to the ETF issuer → receive new ETF shares → sell on exchange. This happens when ETF trades at a premium to NAV.
- **Outflows (redemption)**: APs buy ETF shares on exchange → redeem with issuer for underlying securities → sell securities. This happens when ETF trades at a discount to NAV.
- **Signal interpretation**: sustained large inflows = institutional demand; sustained large outflows = institutional liquidation.

**Key distinction:**
- ETF price movement ≠ ETF flow. Price can rise on low volume (momentum). Flows require actual capital commitment.
- Flows are a **quantity** signal (how much money is moving), not a **price** signal.

### 2. Major ETF Flow Categories

#### Broad Market ETFs

| 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:**
```python
# 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)
```

#### Sector ETFs (SPDR Select Sector)

| 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 |

#### Style & Factor ETFs

| 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 |

#### Fixed Income ETFs

| 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 |

### 3. Sector Rotation Signals

**Sector breadth analysis:**
```python
# 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 environment
```

**Cyclical vs Defensive ratio:**
```python
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-off
```

### 4. Thematic ETF Flows

**Growth / 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:**
- Sustained 4-week+ inflows into a theme = institutional conviction, not just hot money
- Sudden large outflows from a theme that was trending = crowded trade unwind risk
- Divergence between thematic ETF flow and underlying asset price = potential inflection

### 5. Flow-Based Trading Signals

**Signal construction:**

```python
def etf_flow_signal(ticker, lookback_days=20):
    """
    Generate trading signal from ETF flow data.
    """
    # Cumulative flow over lookback peri
vibe-tradingSkill

Professional finance research toolkit — backtesting (7 engines + benchmark comparison panel), factor analysis, Alpha Zoo (452 pre-built alphas across qlib158/alpha101/gtja191/academic), options pricing, 77 finance skills, 29 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 7 data sources (tushare, yfinance, okx, akshare, mootdx, ccxt, futu).

adr-hshareSkill

ADR/H-share/A-share cross-listing premium analysis — track pricing gaps between US-listed ADRs, HK-listed H-shares, and A-shares for arbitrage signals, dual-listing valuation, and delisting risk assessment.

akshareSkill

AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance.

alpha-zooSkill

Browse and bench the bundled alpha zoos — prebuilt cross-sectional factor libraries (Kakushadze 101, GTJA 191, Qlib 158, Fama-French / Carhart). Use when the user asks "which alphas exist", wants metadata on a named alpha, or wants to run IC/IR on a whole zoo over a universe.

ashare-pre-st-filterSkill

A 股 ST/*ST 风险预测框架 — 基于最新中报/三季报或业绩预告/快报,预测下一财年是否会因营收、利润、净资产、分红不达标而被风险警示,并将新浪监管处罚记录作为独立证据面纳入风险等级。仅适用于 A 股,不预测财务造假。

asset-allocationSkill

Asset allocation theory and optimizer usage — MPT / Black-Litterman / risk budgeting / all-weather strategy, including guides for 4 optimizers and rebalancing rules.

backtest-diagnoseSkill

Diagnose failed or underperforming backtests, locate the root cause, and fix the issue

behavioral-financeSkill

Behavioral finance applications: theories of overreaction and underreaction, behavioral explanations for momentum and reversal, investor sentiment cycles, cognitive-bias checklists, and debiasing quantitative strategies.