본문으로 건너뛰기
cccskills
무료GitHub에 공개

us-etf-flow

Compare money moving into and out of US exchange-traded funds to assess sector rotation and appetite for risk. Produce a structured view of broad market, growth versus value, bond, and thematic fund flows.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

연동 도구Yahoo Finance
설치 방법 보기

이럴 때 유용합니다

  • Review broad US equity ETF inflows and outflows
  • Identify sectors attracting or losing capital
  • Compare growth and value fund flows
  • Track bond and thematic ETF allocation trends

포함된 파일(1)

  • SKILL.md10.0 KB

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

ETFTracking IndexAUMFlow Signal
SPYS&P 500~$500BBroadest equity risk appetite
IVVS&P 500~$400BLong-term institutional allocation
VOOS&P 500~$400BRetail + advisor allocation
QQQNasdaq 100~$250BTech / growth appetite
IWMRussell 2000~$60BSmall-cap risk appetite
DIADow Jones 30~$30BValue / 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)

Sector ETFs (SPDR Select Sector)

ETFSectorEconomic SensitivityCycle Phase
XLKTechnologyGrowth / late cycleExpansion
XLFFinancialsRate sensitiveEarly recovery
XLEEnergyCommodity linkedLate cycle / inflation
XLVHealthcareDefensiveRecession
XLYConsumer DiscretionaryCyclicalRecovery
XLPConsumer StaplesDefensiveRecession
XLIIndustrialsCyclicalEarly expansion
XLUUtilitiesDefensive / rate sensitiveLate cycle / recession
XLBMaterialsCommodity linkedEarly cycle
XLREReal EstateRate sensitiveRate-cut cycle
XLCCommunication ServicesGrowth (META, GOOGL)Expansion

Style & Factor ETFs

ETFFactorSignal
IVW / SPYGS&P 500 GrowthGrowth appetite
IVE / SPYVS&P 500 ValueValue rotation
MTUMMSCI USA MomentumTrend following
QUALMSCI USA QualityQuality flight
USMV / SPLVMin VolatilityDefensive positioning
SIZEMSCI USA SizeSmall-cap factor

Fixed Income ETFs

ETFSegmentSignal
TLT20+ Year TreasuryDuration / rate expectations
IEF7-10 Year TreasuryIntermediate rate view
SHY1-3 Year TreasuryCash proxy / safe haven
LQDInvestment Grade CorpCredit appetite
HYG / JNKHigh Yield CorpRisk appetite / credit cycle
TIPTIPSInflation expectations
EMBEM Sovereign DebtEM risk appetite

3. Sector Rotation Signals

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 environment

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

4. Thematic ETF Flows

Growth / innovation themes:

ThemeKey ETFsWhat It Tracks
AI / SemiconductorsSMH, SOXX, BOTZAI capex cycle
Clean EnergyICLN, TAN, QCLNEnergy transition spend
BiotechXBI, IBBPharma pipeline / M&A cycle
CybersecurityCIBR, HACKSecurity spending cycle
China InternetKWEB, FXIChina tech sentiment
IndiaINDA, SMINIndia growth allocation
Emerging MarketsEEM, VWOEM risk appetite
Gold MinersGDX, GDXJGold price leverage play
BitcoinIBIT, FBTCCrypto 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:

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:

  • Momentum (follow the flow): works best for broad market ETFs (SPY, QQQ) during trending markets
  • Contrarian (fade extreme flows): works best for sector/thematic ETFs at extreme levels
  • Rule of thumb: 3-standard-deviation flow events in sector ETFs tend to mean-revert within 2-4 weeks

Data Access

Via yfinance

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

Flow Data Sources

SourceAccessCoverageLatency
ETF.comFree (web)US ETFsT+1
Bloomberg TerminalPaidGlobal ETFsReal-time
ICI (Investment Company Institute)Free (weekly)US mutual fund + ETF aggregateT+7
ETF Database (etfdb.com)Free (web)US ETFsT+1
VettaFiFree (web)US ETFsT+1

Output Format

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

Notes

  • ETF flows are a proxy for institutional behavior, not a standalone signal; combine with price action and fundamentals
  • Large single-day flows can be rebalancing-driven (quarter-end, index reconstitution) rather than directional
  • Options-related ETF activity (hedging via SPY puts) can distort flow signals
  • International ETF flows (EEM, FXI, INDA) are useful for global macro positioning
  • This framework is for research purposes only and does not constitute investment advice

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Compare a Chinese company's US depositary receipts, Hong Kong shares, and mainland shares after adjusting for exchange rates and share ratios. Analyze pricing gaps, valuation differences, and delisting risks to support research into its different listings.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Compare A-share and H-share pricing gaps
  • Measure ADR premiums against Hong Kong shares
  • Review US delisting risks and Hong Kong listing alternatives
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

akshare

무료

Retrieve stock prices, futures quotes, exchange rates, and economic indicators with the free Python library AKShare. The skill explains market-specific functions, symbol formats, and data preparation for analysis and testing strategies against historical data.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Retrieve historical prices for Chinese, US, and Hong Kong stocks
  • Collect Chinese GDP and consumer price data
  • Check futures quotes and foreign exchange rates
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

alpha-zoo

무료

Explore bundled libraries of investment factors, signals used to compare securities, and inspect individual formulas and metadata. Evaluate a factor or an entire library across a chosen universe and period, producing aggregate performance statistics and an HTML report.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Find bundled momentum or reversal factors
  • Inspect a named factor's formula and metadata
  • Compare a factor library across a chosen universe and period
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

Assess whether a Chinese A-share company may receive ST or *ST risk warnings next financial year. Review financial forecasts, dividends, audit opinions, and regulatory penalties, then report risk severity separately from confidence in the prediction.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing a Chinese A-share company's future ST risk
  • Assessing escalation risk for an existing ST or *ST stock
  • Checking revenue, equity, and dividend warning signs
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

Plan portfolio allocations across assets using risk, correlations, return forecasts, and trading costs. Compare five optimization methods, produce settings for config.json, and define rebalancing rules that adjust holdings back toward their target weights.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Comparing allocations across stocks, bonds, and gold
  • Choosing an optimizer based on return forecasts and correlations
  • Preparing portfolio settings for config.json
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

Diagnose failed or abnormal backtests, which test trading strategies on historical data. Inspect result files, strategy code, and configuration to identify bugs, make targeted repairs, rerun tests, and verify the updated metrics.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Investigating backtest execution errors
  • Finding why a strategy produces no trades
  • Checking delayed trades or low capital usage
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

HKUDS의 스킬 모두 보기

이 스킬의 문제 신고