SuperAPI AI Directory

sector-rotation

Data & analytics

View repository

Updated 10-15 22:13

About this skill

Industry Rotation Analysis

Overview

Based on the A-share Shenwan industry classification system, industry rotation analysis is conducted through four dimensions: prosperity scoring, momentum ranking, valuation comparison, and capital flow, outputting industry overweight/underweight recommendations.

Shenwan Industry Classification System

Level 1 Industries (31)

Major Category Industry Code Example
Upstream Cyclicals Coal, Non-ferrous Metals, Petroleum & Petrochemicals, Steel, Basic Chemicals Coal ETF: 515220
Midstream Manufacturing Power Equipment, Machinery, National Defense & Military, Automobiles New Energy ETF: 516160
Downstream Consumption Food & Beverage, Home Appliances, Pharmaceuticals & Biotechnology, Beauty & Personal Care Consumer ETF: 510150
TMT Electronics, Computer, Communications, Media Technology ETF: 515000
Financials & Real Estate Banks, Non-bank Financials, Real Estate Financial ETF: 510230
Utilities Utilities, Transportation, Environmental Protection Dividend ETF: 510880

Industry Cyclical Attributes

Type Industry Characteristics Driving Factors
Strong Cyclicals Coal/Non-ferrous Metals/Steel/Chemicals Large profit fluctuations, closely tied to the macroeconomy PPI, PMI, Commodity Prices
Weak Cyclicals Food & Beverage/Pharmaceuticals/Utilities Stable profits, defensive attributes CPI, Consumption Data
Growth Electronics/Computer/Power Equipment High PE, high growth rate, policy-sensitive Industrial Policy, Penetration Rate
Financials Banks/Non-bank Financials/Insurance Interest spread-driven, positively correlated with interest rates Interest Rates, Social Financing, Credit

Prosperity Scoring Framework

Scoring Dimensions (100 points maximum)

Dimension Weight Indicator Scoring Rules
Profit Growth 30% YoY growth rate of net profit >30%=30 points, 15-30%=22 points, 0-15%=15 points, <0%=5 points
Profit Trend 20% Accelerating for N consecutive quarters Accelerating for 3+ quarters=20 points, 2 quarters=14 points, decelerating=-5 points
Prosperity Indicators 20% PMI/Capacity Utilization Rate/Price High level + rising=20 points, high level falling=12 points, low level=5 points
Policy Support 15% Strength of industrial policy Clearly positive=15 points, neutral=8 points, negative=2 points
Valuation Safety 15% PE historical percentile <30th percentile=15 points, 30-50%=10 points, >70%=3 points

Prosperity Change Signals

景气度上行信号(超配):
1. 行业PMI连续2个月>50且环比改善
2. 龙头公司订单/收入同比加速
3. 产品价格上行(涨价周期)
4. 产能利用率>80%且在提升
5. 政策催化(补贴/准入/国产替代)

景气度下行信号(低配):
1. 行业PMI连续2个月<50
2. 存货周转天数上升(库存积压)
3. 产品价格下行
4. 产能过剩(利用率<60%)
5. 政策收紧(环保/反垄断/集采)

Industry Momentum Ranking Method

Price Momentum

def sector_momentum(sector_returns: pd.DataFrame, lookback: int = 60, skip: int = 5) -> pd.Series:
    """
    Args:
        sector_returns: 行业日收益率,columns=行业名
        lookback: 回看窗口(交易日)
        skip: 跳过最近N天(避免短期反转)
    Returns:
        行业动量得分排名
    """
    cum_return = (1 + sector_returns).rolling(lookback).apply(lambda x: x[:-skip].prod() - 1)
    return cum_return.iloc[-1].rank(ascending=False)

Earnings Momentum

盈利动量 = 当季ROE同比变化 - 上季ROE同比变化
正值 = 盈利加速(超配信号)
负值 = 盈利减速(减配信号)

Composite Momentum Ranking

综合得分 = 0.4 × 价格动量排名 + 0.3 × 盈利动量排名 + 0.3 × 资金流排名
取 Top 5 行业超配,Bottom 5 行业低配

Upstream and Downstream Transmission in the Supply Chain

Typical Transmission Chains

上游(原材料)→ 中游(制造加工)→ 下游(消费/应用)

示例1: 锂电产业链
  碳酸锂(上游)→ 正极材料(中游)→ 电池(中游)→ 新能源车(下游)
  传导:锂价↑ → 正极成本↑ → 电池价格↑ → 车企毛利率↓

示例2: 半导体产业链
  设备/材料(上游)→ 晶圆制造(中游)→ 封测(中游)→ 消费电子(下游)
  传导:手机需求↑ → 封测订单↑ → 晶圆产能紧 → 设备资本开支↑

示例3: 地产产业链
  土地/融资(上游)→ 开发建设(中游)→ 销售/物业(下游)
  传导:政策宽松 → 销售回暖(下游先) → 新开工↑(中游) → 拿地↑(上游)

Transmission Patterns

Pattern Description Investment Implication
Demand-driven bottom-up Downstream demand → Midstream orders → Upstream raw materials For demand inflection points, watch downstream first
Cost transmission top-down Upstream price increases → Midstream costs → Downstream price increases Upstream price increases benefit upstream, hurt midstream
Inventory cycle transmission Active restocking → Passive restocking → Active destocking → Passive destocking Passive destocking is a buying point
Lead-lag Upstream leads midstream by 1-2 quarters, midstream leads downstream by 1-2 quarters Position early in the next link

Industry Comparison Framework

Valuation Comparison

Metric Use Caveats
PE(TTM) Earnings valuation PE distortion for cyclical stocks (low PE may be a top)
PB Asset valuation PB is more reasonable for banks/real estate/cyclical stocks
PE historical percentile Valuation position Look at 5-year percentile
PEG Growth valuation <1 is undervalued, >2 is overvalued
Dividend yield Return High dividend = defensive allocation

Profitability Comparison

Metric Meaning
ROE Profitability
ROE change Profit trend
Gross margin Competitive landscape
Net profit growth Growth
Cash flow/Net profit Earnings quality

Capital Flow Comparison

Metric Data Source Signal
Northbound capital net inflow Shanghai-Hong Kong Stock Connect Foreign preference, leads by 1-3 months
Margin balance change Margin trading Leveraged capital direction
ETF net subscription Fund data Institutional allocation direction
Block trades Exchange Institutional repositioning signal

Output Format

## 行业轮动分析

### 景气度排名 Top 10
| 排名 | 行业 | 景气度 | 变化 | 核心逻辑 |
|------|------|--------|------|---------|
| 1 | 电子 | 85 | ↑+8 | AI算力需求爆发 |
| 2 | 汽车 | 80 | ↑+5 | 出口+新能源双轮驱动 |
| ... | ... | ... | ... | ... |

### 行业配置建议
| 配置 | 行业 | 权重建议 | 核心逻辑 |
|------|------|---------|---------|
| 超配 | 电子、汽车、通信 | 各10-15% | 景气上行+政策催化 |
| 标配 | 食品饮料、医药 | 各5-8% | 防御属性,估值合理 |
| 低配 | 地产、建材 | 各0-3% | 景气下行,政策效果待观察 |

### 产业链机会
- **AI产业链**: 算力(上游)→模型(中游)→应用(下游),当前上游最确定
- **新能源车**: 碳酸锂价格见底,电池环节盈利修复预期

### 风险提示
- ...

Caveats

  1. Cyclical stock valuation trap: Low PE may be an earnings peak (e.g., coal PE only 5x in 2021 but it was the top); PB is safer
  2. Policy variables carry heavy weight: A-share industry rotation is clearly policy-driven (centralized procurement, carbon neutrality, AI), policy inflection > fundamental inflection
  3. Thematic investment interference: Short-term thematic speculation (e.g., AI concept) distorts industry momentum signals; be careful to distinguish theme vs fundamentals
  4. Data lag: Financial report data lags by 1-2 months; high-frequency data (PMI/operating rate/prices) is more timely
  5. Industry ETF substitution: It is recommended to use industry ETF codes rather than individual stocks to implement industry allocation, reducing individual stock risk
  6. Rotation frequency: Industry rotation should not be too frequent; monthly/quarterly rebalancing is appropriate