| name | ashare-sop-l2-theme-engine |
| description | L2 dynamic theme structure & sentiment engine for the A-share SOP. Use to identify main themes, classify theme lifecycle stage, assess quantitative health indicators, and produce layered stock pools with 5-factor scoring. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["a-share","sop","theme-structure","sentiment","l2","sector-rotation"],"related_skills":["a-share-theme-structure-sop","ashare-sop-l1-macro-filter","ashare-sop-l3-stock-resonance"]}} |
A-Share SOP L2 — Dynamic Theme Structure & Sentiment Engine
Overview
This is the L2 tier of the A-share theme structure SOP engine (v1.7+). It identifies the current market mainline, classifies theme lifecycle stages, assesses quantitative health indicators, and produces layered stock pools with verification scorecards.
Precondition: L1 must NOT be 系统性风险. If L1=震荡市, downstream filters require stricter resonance.
Load this skill when you need theme identification, stage classification, or stock pool construction — with or without L1/L3 loaded.
Engine Position
L1 (宏观环境) → gates → L2 (本模块: 题材识别/阶段/健康度/池) → gates → L3 (个股共振)
Theme Stage Classification (v1.7 4-Stage System)
| Stage | Trigger Conditions | Meaning |
|---|
| 启动/发酵期 (Emergence) | Meets dynamic identification rules; or is the market's only strong theme | New theme emerging, capital starting to flow; observation window for medium-term positioning |
| 高潮/主升期 (Momentum) | (1) Theme index up on expanding volume for 3+ days; (2) Core leader reaches 4+ consecutive boards; (3) Broad follower limit-ups | Most profitable phase, but risk accumulating; watch for divergence |
| 分歧/分化期 (Divergence) | (1) Theme index gain narrows or turns negative with still-high volume; (2) Leader shows "放量分歧" or opens but re-seals; (3) Late followers start dropping off | Capital divergence; critical period for 去弱留强; highest risk phase |
| 退潮期 (Retreat) | (1) Leader breaks board and cannot re-seal — "标杆股效应" collapses; (2) Multiple stocks hit跌停 or big drops; (3) Loss effect spreads from front-line to mid/back-line | Theme officially ends; clear positions, stop participation |
Note: v1.6 used a 6-stage system (启动/确认/主升/分歧/修复/退潮). v1.7 consolidates: "确认" → absorbed into 启动/发酵期; "修复" → folded into transition between 分歧/分化期 and 高潮/主升期.
Dynamic Theme Identification (replaces fixed anchors)
Data Sources
- 申万二级/三级行业 index
- 同花顺概念板块 index
- Sector OHLCV via
westock-data board
- Concept board rankings for cross-validation
npx -y westock-data-skillhub@1.0.3 board
npx -y westock-data-skillhub@1.0.3 hot board --limit 30
Entry Rules (入选 活跃题材观察池)
A theme enters the active observation pool when:
- Board index change > 3%
- Board内涨停个股数 ≥ 3
- At least one limit-up stock has 连板 (2+ consecutive boards)
Consecutive requirement: meet above for 2 consecutive days → enter pool.
Exit Rules (退出)
Fail to meet entry conditions for 3 consecutive days → remove from pool.
Cross-Validation
At least 3 aligned concept boards (e.g. 半导体 industry strong + CPU概念 + MLCC + 芯片概念 all ranking high) strengthens the mainline thesis.
Quantitative Health Indicators
For each active theme, compute these 4 indicators:
- 龙头承接 (Leader Acceptance): Core stock price above MA5, intraday change in [-2.5%, +1.5%]
- 中低位扩散 (Branch Diffusion): Branch/laggard stocks ≥ 0% on the day, with expanding turnover
- 放量回落 (Volume Retreat): % of pool stocks falling on heavy volume (higher = worse)
- 补涨失败 (Laggard Failure): % of laggard stocks falling on shrinking volume (higher = worse)
These supplement the 5-factor scorecard below.
Stock Pool Hierarchy
Layer candidates into 4 pools:
| Pool | Description | Selection Criteria |
|---|
| 核心高位强势池 (Core) | High-position main-line leaders/anchors | Top 3 by turnover, highest consecutive boards, or market-recognized leader |
| 分支轮动/补涨池 (Branch/Laggard) | Branch stocks with theme linkage | Medium turnover; shows "回踩趋势" or "密集区突破" pattern |
| 相对低位修复池 (Low-Position Repair) | Lower-position capacity names repairing | Lower in 250D range; starting to show improving structure |
| 风险风向标 (Risk Anchor) | High-volatility correlated names | High turnover leaders whose weakness could spread to the theme |
Five-Factor Scorecard
Each factor scored 0/1 per candidate:
- 板块宽度 (Board Width): Same theme continues expanding
- 个股承接 (Individual Acceptance): No uncontrolled long red candle, failed spike, or breakdown
- 量能健康 (Volume Health): Volume expansion with price acceptance, not chaotic turnover
- 席位/资金 (Seats/Fund Flow): 龙虎榜, main flow, or financing supports structure
- 风险扣分 (Risk Penalty): High-position negative feedback, broken-board spread, holiday profit-taking, catalyst exhaustion
Classification
| Score | Conclusion |
|---|
| 4-5 | Structure strengthening; strong observation |
| 3 | Neutral; wait for close confirmation |
| 1-2 | Weak; keep only as wind vane |
| 0 or risk-anchor trigger | Short-term structure weakening; reduce confidence |
Automated scoring: The LLM cannot compute numeric 0/1 scores directly. Use factor_scorer.py v1.2 for data-driven scoring from KDJ/WR/BOLL, ATR, MainNetFlow, 龙虎榜 seats, 北向资金, and 250D position. Cron job b2988fb281ad runs at 15:10 Beijing daily.
Theme → L3 Gate Table
L2 state determines L3 stock filtering strictness:
| L2 State | Core Pool | Branch/Laggard Pool |
|---|
| 退潮期 | 清空候选,强制风控 | Same |
| 分歧/分化期 | buy_score ≥ 3 (stricter) | Normal rules |
| 启动/发酵期 or 高潮/主升期 | Normal rules | Normal rules |
Microstructure Validation (游资-Style)
Use Eastmoney pools for real microstructure:
https://push2ex.eastmoney.com/getTopicZTPool?ut=7eea3edcaed734bea9cbfc24409ed989&dpt=wz.ztzt&Pageindex=0&pagesize=300&sort=fbt:asc&date=YYYYMMDD
https://push2ex.eastmoney.com/getTopicZBPool?ut=7eea3edcaed734bea9cbfc24409ed989&dpt=wz.ztzt&Pageindex=0&pagesize=300&sort=fbt:asc&date=YYYYMMDD
Key fields: c (code), n (name), hybk (industry), zdp (% change), amount (turnover), fund (seal fund), zbc (open count), fbt/lbt (first/last seal time), lbc (consecutive boards).
Interpretation:
- 有效扩散 (Effective expansion): Limit-up width expands, ladder healthy
- 良性分歧 (Constructive divergence): High-position leaders open/break, low-position branches接力
- 强分歧 (Strong divergence): High-position leaders fail AND low-position补涨 fails
- 退潮预警 (Retreat warning): Limit-up pool shrinks, broken-board pool expands, ladder promotion worsens
龙虎榜 / Seats Validation
- Positive 龙虎榜 net buy → add confidence
- Institution, stock-connect, or strong tagged hot-money participation → add confidence
- Large 3-day net sell in high-position leader → raise risk
- No 龙虎榜 data → do not infer weakness; mark as "无席位确认"
For batch seat data: TDX MCP query "{date_cn}龙虎榜营业部席位买卖金额" → ~1746 rows. Wrap in try/except for graceful degradation.
Standard Output Template
## L2 题材阶段
- 主线处于:启动/发酵期 / 高潮/主升期 / 分歧/分化期 / 退潮期
- 判断依据:板块宽度、连板梯队、核心承接、资金流
- 题材健康度:龙头承接 / 中低位扩散 / 放量回落 / 补涨失败
## L2 分层观察池
- 主线承接锚(核心股池):
- 容量风向标:
- 分支接力锚(分支/补涨股池):
- 低位修复锚:
- 风险锚(风险风向标):
## 验证规则
- 强势延续:
- 良性分歧:
- 强分歧:
- 退潮预警:
## 5-Factor 打分表
| 标的 | 角色 | 板块宽度 | 个股承接 | 量能健康 | 席位/资金 | 风险扣分 | 总分 | 结论 |
|---|---|---|---|---:|---:|---:|---:|---:|---:|---|
Common Pitfalls
- Jumping to stock names before classifying theme stage: Always classify theme stage first.
- Ranking by 涨幅 only: High涨幅 + net outflow or broken-board = risk, not strength.
- Treating hot-board as microstructure: Hot boards are secondary; real 涨停池/炸板池/连板梯队 are primary.
- Confusing 年度主线 with 盘中热点: Use YTD returns + 20D persistence + range position, not same-day hot board rank.
- Board K-line returns empty: Fall back to individual lead stock K-lines.
- Board fund flow vs lead stock divergence: Always cross-check board-level mainNetInflow against lead stock asfund.
- Using old 6-stage classification: v1.7 uses 4 stages only.