跳到正文
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(原文)

安装前可以查看交给 AI 代理的指令内容。

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 / 1000 字

此表单受 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月22日 更新

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月22日 更新

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月22日 更新

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月22日 更新

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月22日 更新

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月22日 更新

查看 HKUDS 的全部技能

报告此技能的问题