@openfinclaw/findoo-datahub-plugin 2026.3.2 → 2026.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/DESIGN.md +492 -151
  2. package/_vendor/claude-skills-finance/SKILL.md +192 -0
  3. package/_vendor/claude-skills-finance/assets/dcf_analysis_template.md +184 -0
  4. package/_vendor/claude-skills-finance/assets/expected_output.json +161 -0
  5. package/_vendor/claude-skills-finance/assets/forecast_report_template.md +177 -0
  6. package/_vendor/claude-skills-finance/assets/sample_financial_data.json +219 -0
  7. package/_vendor/claude-skills-finance/assets/variance_report_template.md +122 -0
  8. package/_vendor/claude-skills-finance/references/financial-ratios-guide.md +396 -0
  9. package/_vendor/claude-skills-finance/references/forecasting-best-practices.md +294 -0
  10. package/_vendor/claude-skills-finance/references/valuation-methodology.md +255 -0
  11. package/_vendor/claude-skills-finance/scripts/budget_variance_analyzer.py +406 -0
  12. package/_vendor/claude-skills-finance/scripts/dcf_valuation.py +449 -0
  13. package/_vendor/claude-skills-finance/scripts/forecast_builder.py +494 -0
  14. package/_vendor/claude-skills-finance/scripts/ratio_calculator.py +432 -0
  15. package/index.ts +332 -14
  16. package/openclaw.plugin.json +2 -2
  17. package/package.json +1 -1
  18. package/references/cn-market-specifics.md +165 -0
  19. package/references/crypto-analysis.md +635 -0
  20. package/references/financial-ratios-cn.md +452 -0
  21. package/references/hk-market-specifics.md +166 -0
  22. package/references/macro-cycle-cn.md +409 -0
  23. package/references/valuation-cn.md +427 -0
  24. package/skills/README.md +294 -0
  25. package/skills/a-concept-cycle/skill.md +200 -0
  26. package/skills/a-convertible-arb/skill.md +294 -0
  27. package/skills/a-dividend-king/skill.md +187 -0
  28. package/skills/a-earnings-season/skill.md +221 -0
  29. package/skills/a-index-timer/skill.md +192 -0
  30. package/skills/a-ipo-new/skill.md +297 -0
  31. package/skills/a-northbound-decoder/skill.md +185 -0
  32. package/skills/a-quant-board/skill.md +286 -0
  33. package/skills/a-share/skill.md +347 -0
  34. package/skills/a-share-radar/skill.md +185 -0
  35. package/skills/cross-asset/skill.md +202 -0
  36. package/skills/crypto/skill.md +269 -0
  37. package/skills/crypto-altseason/skill.md +208 -0
  38. package/skills/crypto-btc-cycle/skill.md +231 -0
  39. package/skills/crypto-defi-yield/skill.md +181 -0
  40. package/skills/crypto-funding-arb/skill.md +158 -0
  41. package/skills/crypto-stablecoin-flow/skill.md +149 -0
  42. package/skills/data-query/skill.md +124 -30
  43. package/skills/derivatives/skill.md +188 -35
  44. package/skills/etf-fund/skill.md +216 -0
  45. package/skills/factor-screen/skill.md +186 -0
  46. package/skills/hk-china-internet/skill.md +190 -0
  47. package/skills/hk-dividend-harvest/skill.md +192 -0
  48. package/skills/hk-hsi-pulse/skill.md +154 -0
  49. package/skills/hk-southbound-alpha/skill.md +163 -0
  50. package/skills/hk-stock/skill.md +295 -0
  51. package/skills/macro/skill.md +244 -53
  52. package/skills/risk-monitor/skill.md +171 -0
  53. package/skills/us-dividend/skill.md +162 -0
  54. package/skills/us-earnings/skill.md +149 -0
  55. package/skills/us-equity/skill.md +235 -0
  56. package/skills/us-etf/skill.md +261 -0
  57. package/skills/us-sector-rotation/skill.md +223 -0
  58. package/src/config.ts +4 -5
  59. package/src/datahub-client.test.ts +4 -7
  60. package/src/datahub-client.ts +6 -1
  61. package/src/register-tools.ts +720 -0
  62. package/src/tool-helpers.ts +89 -0
  63. package/test/e2e/l3-gateway-bootstrap.live.test.ts +339 -0
  64. package/test/e2e/l4-skill-tool-chain.live.test.ts +465 -0
  65. package/skills/crypto-defi/skill.md +0 -69
  66. package/skills/equity/skill.md +0 -64
  67. package/skills/market-radar/skill.md +0 -47
@@ -0,0 +1,286 @@
1
+ ---
2
+ name: fin-a-quant-board
3
+ description: "A-share limit-up board quantitative analysis -- board ladder (consecutive limit-up tiers), theme main-line detection, sentiment cycle positioning, leader progression forecast, dragon-tiger institutional analysis, sector rotation rhythm. Use when: user asks about limit-up counts, consecutive boards, market sentiment cycle, theme main lines, leader stocks, dragon-tiger list analysis, or sector capital flow rotation. NOT for: individual stock fundamentals (use fin-a-share), concept lifecycle stage (use fin-a-concept-cycle), northbound flow (use fin-a-northbound-decoder), factor screening (use fin-factor-screen), macro data (use fin-macro)."
4
+ metadata:
5
+ {
6
+ "openclaw":
7
+ { "emoji": "\ud83d\udd25", "requires": { "extensions": ["findoo-datahub-plugin"] } },
8
+ }
9
+ ---
10
+
11
+ # A-Share Limit-Up Board Quant & Theme Tracker
12
+
13
+ Use **fin_market**, **fin_index**, and **fin_stock** to quantify A-share limit-up board ecosystem: board ladder tiers, theme main-line identification, sentiment cycle positioning, leader progression forecast, and dragon-tiger institutional analysis. This skill covers the uniquely Chinese short-term trading culture built around daily price limits.
14
+
15
+ ## When to Use
16
+
17
+ - "今天有几个连板" / "how many consecutive limit-ups today"
18
+ - "当前主线题材是什么" / "what is the main theme line"
19
+ - "现在情绪周期在哪个阶段" / "where are we in the sentiment cycle"
20
+ - "最高板是几板" / "what is the highest board count"
21
+ - "龙虎榜有哪些机构在买" / "which institutions are on the dragon-tiger list"
22
+ - "明天哪些股可能晋级" / "which stocks might advance tomorrow"
23
+ - "涨停数是多少" / "how many limit-ups today"
24
+ - "晋级率怎么样" / "what is the promotion rate"
25
+ - "板块资金在往哪流" / "where is sector capital flowing"
26
+ - "今天炸板多不多" / "were there many broken boards today"
27
+ - "赚钱效应怎么样" / "how is the profit-making effect"
28
+ - "现在是冰点还是高潮" / "is the market at freezing point or climax"
29
+
30
+ ## When NOT to Use
31
+
32
+ - 个股基本面/PE/财务分析 -> use `/fin-a-share`
33
+ - 概念炒作生命周期/题材阶段判断 -> use `/fin-a-concept-cycle`
34
+ - 北向资金流向 -> use `/fin-a-northbound-decoder`
35
+ - 量化多因子选股 -> use `/fin-factor-screen`
36
+ - 宏观经济数据/GDP/CPI -> use `/fin-macro`
37
+ - 高股息/红利策略 -> use `/fin-a-dividend-king`
38
+ - 市场整体雷达/大盘复盘 -> use `/fin-a-share-radar`
39
+ - 美股/港股/加密货币 -> use respective market skills
40
+
41
+ ## Tools & Parameters
42
+
43
+ ### fin_market -- Limit-Up Board & Institutional Data
44
+
45
+ | Parameter | Type | Required | Format | Default | Example |
46
+ | ---------- | ------ | -------- | ---------- | ------- | ----------------- |
47
+ | endpoint | string | Yes | see table | -- | market/limit_list |
48
+ | trade_date | string | Depends | YYYY-MM-DD | -- | 2026-03-07 |
49
+ | date | string | Depends | YYYY-MM-DD | -- | 2026-03-07 |
50
+ | symbol | string | Depends | stock code | -- | 000001.SZ |
51
+
52
+ #### Endpoints
53
+
54
+ | endpoint | Description | Date param | Example |
55
+ | -------------------- | ---------------------------- | ------------ | -------------------------------------------------------------------- |
56
+ | `market/limit_list` | Limit-up/down stock list | `trade_date` | `fin_market(endpoint="market/limit_list", trade_date="2026-03-07")` |
57
+ | `market/top_list` | Dragon-tiger list (daily) | `date` | `fin_market(endpoint="market/top_list", date="2026-03-07")` |
58
+ | `market/top_inst` | Institutional seat details | `date` | `fin_market(endpoint="market/top_inst", date="2026-03-07")` |
59
+ | `market/stock_limit` | Individual stock limit price | `trade_date` | `fin_market(endpoint="market/stock_limit", symbol="000001.SZ")` |
60
+ | `moneyflow/industry` | Sector capital flow | `trade_date` | `fin_market(endpoint="moneyflow/industry", trade_date="2026-03-07")` |
61
+
62
+ ### fin_index -- Concept/Theme Mapping
63
+
64
+ | Parameter | Type | Required | Format | Default | Example |
65
+ | --------- | ------ | -------- | -------------------- | ------- | ------------------ |
66
+ | symbol | string | Depends | THS code `XXXXXX.TI` | -- | 885760.TI |
67
+ | endpoint | string | Yes | see table | -- | thematic/ths_index |
68
+ | limit | number | No | 1-5000 | 200 | 10 |
69
+
70
+ #### Endpoints
71
+
72
+ | endpoint | Description | Example |
73
+ | --------------------- | -------------------------- | ------------------------------------------------------------------------ |
74
+ | `thematic/ths_index` | All THS concept indices | `fin_index(endpoint="thematic/ths_index")` |
75
+ | `thematic/ths_daily` | Concept daily OHLCV | `fin_index(symbol="885760.TI", endpoint="thematic/ths_daily", limit=10)` |
76
+ | `thematic/ths_member` | Concept constituent stocks | `fin_index(symbol="885760.TI", endpoint="thematic/ths_member")` |
77
+
78
+ ### fin_stock -- Individual Stock Validation
79
+
80
+ | Parameter | Type | Required | Format | Default | Example |
81
+ | --------- | ------ | -------- | -------------- | ------- | ---------------- |
82
+ | symbol | string | Yes | `{code}.SH/SZ` | -- | 300024.SZ |
83
+ | endpoint | string | Yes | see table | -- | price/historical |
84
+ | limit | number | No | 1-5000 | 200 | 20 |
85
+
86
+ #### Endpoints
87
+
88
+ | endpoint | Description | Example |
89
+ | ---------------------- | --------------------- | ------------------------------------------------------------------------- |
90
+ | `price/historical` | Stock daily OHLCV | `fin_stock(symbol="300024.SZ", endpoint="price/historical", limit=20)` |
91
+ | `moneyflow/individual` | Individual stock flow | `fin_stock(symbol="300024.SZ", endpoint="moneyflow/individual", limit=5)` |
92
+
93
+ ## A-Share Price Limit Rules
94
+
95
+ | Board | Code prefix | Limit | Notes |
96
+ | -------------------- | ----------- | ------ | ---------------------------------- |
97
+ | Main Board | 600/601/000 | +/-10% | Standard |
98
+ | ST / \*ST | ST prefix | +/-5% | Special treatment |
99
+ | ChiNext (创业板) | 300xxx | +/-20% | Harder to lock, stricter selection |
100
+ | STAR Market (科创板) | 688xxx | +/-20% | Same as ChiNext |
101
+ | BSE (北交所) | 8xxxxx | +/-30% | Widest range |
102
+
103
+ Key limit-up terminology:
104
+
105
+ - **封单量** (seal order volume): pending buy orders holding the limit-up price; seal/float ratio measures lock strength
106
+ - **炸板** (broken board): limit-up opens then falls back -- divergence signal
107
+ - **回封** (re-seal): after breaking, price returns to limit-up -- dispute resolved bullishly
108
+ - **一字板** (one-line board): opens at limit-up and never opens -- extreme consensus, no entry opportunity
109
+ - **T字板** (T-shaped board): opens at limit-up, dips intraday, re-seals at close
110
+ - **天地板** (sky-to-ground board): limit-up to limit-down in same day -- extreme reversal
111
+ - **集合竞价** (call auction): 9:15-9:25 -- the most critical observation window for limit-up boards
112
+
113
+ ## Analysis Patterns
114
+
115
+ ### Pattern 1: Board Ladder Analysis (连板梯队分析)
116
+
117
+ 1. **Fetch limit-up list** `fin_market(endpoint="market/limit_list", trade_date="YYYY-MM-DD")`
118
+ - Get today's full limit-up stock list with consecutive board count
119
+
120
+ 2. **Build the pyramid** -- Layer stocks by consecutive board days:
121
+
122
+ ```
123
+ Tier Count Meaning
124
+ ----- ----- --------
125
+ 1-board N Market activity gauge
126
+ 2-board N Yesterday's 1-board survivors
127
+ 3-board N Momentum confirmation
128
+ 4-board N Theme leadership
129
+ 5-board+ N Clear main-line theme
130
+ Max-board N=1 Market height ceiling
131
+ ```
132
+
133
+ 3. **Interpret the pyramid**:
134
+ - 1-board count: >60 = active market, 20-60 = normal, <20 = freezing point
135
+ - **Promotion rate** = today's 2-board / yesterday's 1-board count
136
+ - > 30% = strong consensus, market risk appetite high
137
+ - 15-30% = normal
138
+ - <15% = weak, market rejecting follow-through
139
+ - Max board = market height; rising height = strengthening sentiment
140
+ - 5-board+ usually corresponds to a clear main-line theme
141
+
142
+ 4. **Compare with yesterday** -- fetch previous day's limit_list to calculate:
143
+ - Promotion rate (2-board today / 1-board yesterday)
144
+ - Height change (max board today vs yesterday)
145
+ - Total limit-up trend (expanding/stable/contracting)
146
+
147
+ ### Pattern 2: Theme Main-Line Detection (题材主线识别)
148
+
149
+ 1. **Classify limit-ups by concept** `fin_market(endpoint="market/limit_list", trade_date="YYYY-MM-DD")`
150
+ - Group today's limit-up stocks by industry/concept/theme
151
+
152
+ 2. **Match THS concept indices** `fin_index(endpoint="thematic/ths_index")`
153
+ - Find matching concept codes for concentrated limit-up clusters
154
+
155
+ 3. **Validate concept trend** `fin_index(endpoint="thematic/ths_daily", symbol="concept_code", limit=10)`
156
+ - Check concept index 10-day price trend for confirmation
157
+
158
+ 4. **Main-line judgment criteria**:
159
+ - Same concept limit-up >5 stocks + consecutive 2 days = **main line confirmed**
160
+ - Single stock isolated limit-up = individual behavior, not a main line
161
+ - New concept first-day >3 limit-ups = **potential new main line**
162
+ - 2+ concepts with >5 limit-ups each = multi-main-line market (stronger sentiment)
163
+
164
+ 5. **Output structure**:
165
+ - Main Line 1: theme name + limit-up count + leader stock + consecutive days
166
+ - Main Line 2: (secondary theme)
167
+ - Main Line 3: (emerging/fading theme)
168
+ - For each: leader stock + follower stocks + late-entry candidates
169
+
170
+ ### Pattern 3: Sentiment Cycle Positioning (情绪周期判断)
171
+
172
+ Combine multiple dimensions to determine current sentiment cycle phase:
173
+
174
+ ```
175
+ Freezing -> Recovery -> Fermentation -> Climax -> Divergence -> Retreat -> Freezing
176
+ (冰点) (修复) (发酵) (高潮) (分歧) (退潮) (冰点)
177
+ ```
178
+
179
+ | Dimension | Freezing | Recovery | Fermentation | Climax | Divergence | Retreat |
180
+ | ----------------- | ---------- | --------- | ------------ | ---------------------- | ---------------- | --------------- |
181
+ | Limit-up count | <20 | 20-40 | 40-60 | 60-100 | 50-70 (falling) | 30-50 (falling) |
182
+ | Max board | <=2 | 3 | 4-5 | 6+ | Max breaks | Cascading drops |
183
+ | Promotion rate | <10% | 15-25% | 25-40% | >40% | 20-30% (falling) | <15% |
184
+ | Limit-down count | >30 | 10-30 | <10 | <5 | 10-20 (rising) | 20-40 (rising) |
185
+ | Action suggestion | Wait/probe | Light pos | Add position | Take profit / no chase | Reduce | Stay empty |
186
+
187
+ Steps:
188
+
189
+ 1. `fin_market(endpoint="market/limit_list")` -- get limit-up count, max board, limit-down count
190
+ 2. Calculate promotion rate from 2-day data
191
+ 3. Score each dimension against the table
192
+ 4. Determine majority phase -- if mixed signals, note "transition zone"
193
+
194
+ ### Pattern 4: Leader Progression Forecast (龙头推演)
195
+
196
+ Based on today's data, project tomorrow's likely limit-up candidates:
197
+
198
+ 1. **Promotion candidates**: yesterday's 1-board stocks that are likely to become 2-board
199
+ - Strong seal order + main-line theme alignment + institutional participation = high probability
200
+ - Weak seal / late-day limit-up / no clear theme = low probability
201
+
202
+ 2. **Continuation candidates**: today's 2-board+ stocks that may advance further
203
+ - Main-line theme + strong seal volume + institutional dragon-tiger buying = high certainty
204
+ - Broken board then re-sealed = divergence resolved bullishly, often gaps up next day
205
+
206
+ 3. **Assessment factors**:
207
+ - Seal order / float market cap ratio: >5% = strong lock
208
+ - Dragon-tiger institutional seats buying = institutional endorsement
209
+ - Theme alignment: stock in today's main-line theme = higher continuation probability
210
+ - Board timing: early-morning limit-up > afternoon limit-up > late-day limit-up
211
+
212
+ 4. **Output**: ranked list of candidates with probability tier (high/medium/low) and reasoning
213
+
214
+ > WARNING: Forecasts are speculative reference only. Always state risk clearly. Past board performance does not guarantee continuation.
215
+
216
+ ### Pattern 5: Dragon-Tiger Deep Analysis (龙虎榜深度分析)
217
+
218
+ 1. **Fetch dragon-tiger list** `fin_market(endpoint="market/top_list", date="YYYY-MM-DD")`
219
+ - Get stocks with unusual price moves triggering exchange disclosure
220
+
221
+ 2. **Fetch institutional details** `fin_market(endpoint="market/top_inst", date="YYYY-MM-DD")`
222
+ - Break down seat-level buy/sell amounts
223
+
224
+ 3. **Analysis dimensions**:
225
+ - **Known hot-money seats**: identify well-known speculator seats by trading patterns and size
226
+ - **Institution vs hot-money ratio**: institutional buying = longer holding period; pure hot-money = quick flip
227
+ - **Same seat multi-day appearance**: same buyer across consecutive days = orchestrated operation
228
+ - **Buy/sell amount ratio**: net buy >> net sell = bullish conviction; balanced = distribution
229
+
230
+ 4. **Cross-reference with board ladder**: dragon-tiger stocks that are also in the main-line theme with high board count = strongest conviction
231
+
232
+ ### Pattern 6: Sector Rotation Rhythm (板块轮动节奏)
233
+
234
+ 1. **Fetch sector capital flow** `fin_market(endpoint="moneyflow/industry", trade_date="YYYY-MM-DD")`
235
+ - Track for 5 consecutive trading days
236
+
237
+ 2. **Rotation signals**:
238
+ - Sector first enters net-inflow Top 5 = **launch signal**
239
+ - 3+ consecutive days of increasing net inflow = **main-line confirmed**
240
+ - Absolute inflow high but decreasing day-over-day = **profit-taking phase**
241
+ - Exits Top 10 = **rotation complete**, capital moving elsewhere
242
+
243
+ 3. **Cross-validate with limit-up data**: sector with rising capital inflow + rising limit-up count = strongest rotation target
244
+
245
+ 4. **Output**: sector rotation table (sector / 5-day cumulative flow / trend direction / stage / related limit-up stocks)
246
+
247
+ ## Data Notes
248
+
249
+ - **Limit-up data**: `market/limit_list` available T+1 after market close (~18:00 CST)
250
+ - **Dragon-tiger list**: only disclosed for stocks with unusual moves (not every stock every day); exchange rules trigger disclosure
251
+ - **Sector flow**: `moneyflow/industry` provides daily aggregated flow data per sector
252
+ - **THS concept indices**: Tonghuashun (iFinD) concept indices, 400+ concepts, updated EOD
253
+ - **Promotion rate**: requires 2-day data; calculate manually from consecutive limit_list calls
254
+ - **Board count**: consecutive limit-up days field available in limit_list data
255
+ - **Intraday data** (seal orders, broken boards): not available via EOD endpoints; analysis based on EOD status flags
256
+ - **Call auction** (9:15-9:25): real-time observation only; not captured in EOD data
257
+
258
+ ## Response Guidelines
259
+
260
+ ### Number Format
261
+
262
+ - Limit-up count: 45 stocks (integer)
263
+ - Consecutive board: 5-board / 5连板 (integer + "board")
264
+ - Promotion rate: 28.5% (1 decimal)
265
+ - Seal order ratio: 6.2% (1 decimal)
266
+ - Capital flow: net inflow 12.3 yi RMB / 净流入 12.3 亿元
267
+ - Max board: 7-board (integer)
268
+ - Limit-down count: 8 stocks (integer)
269
+
270
+ ### Must Include
271
+
272
+ - Board ladder pyramid (1-board through max-board with counts)
273
+ - Promotion rate with interpretation (strong/normal/weak)
274
+ - Current sentiment cycle phase with supporting evidence
275
+ - At least one main-line theme with leader stock identification
276
+ - Limit-up vs limit-down count comparison
277
+ - Clear action suggestion aligned with sentiment cycle phase
278
+
279
+ ### Display Format
280
+
281
+ - **Daily board review**: pyramid + sentiment phase + main lines + leader forecast
282
+ - **Sentiment cycle query**: phase diagram with current position marked + multi-dimensional evidence table
283
+ - **Theme tracking**: main-line table (theme / limit-up count / leader / board count / status)
284
+ - **Dragon-tiger analysis**: seat-level table (seat name / buy amount / sell amount / net / stock / notes)
285
+ - Use directional language: "sentiment warming" / "main line rotating" / "promotion rate collapsing" / "height ceiling rising"
286
+ - Always include the cycle phase arrow: `冰点 -> 修复 -> [当前: 发酵] -> 高潮 -> 分歧 -> 退潮`
@@ -0,0 +1,347 @@
1
+ ---
2
+ name: fin-a-share
3
+ description: "A-share stock deep analysis — CAS fundamentals (income/balance/cash/ratios), chip structure (shareholders/pledge/lock-up/repurchase), policy-driven sector rotation, capital flow cross-validation (institutional+retail+northbound). Covers fin_stock, fin_market, fin_index, fin_ta endpoints for individual A-share research. Use when: user mentions A-share codes (600xxx.SH/000xxx.SZ/300xxx.SZ), Chinese company names, or asks about A-share specific analysis. NOT for: US stocks (use fin-us-equity), HK stocks (use fin-hk-stock), crypto (use fin-crypto), market-wide overview without specific stock (use fin-a-share-radar), ETF/funds (use fin-etf-fund)."
4
+ metadata:
5
+ {
6
+ "openclaw":
7
+ { "emoji": "\U0001F1E8\U0001F1F3", "requires": { "extensions": ["findoo-datahub-plugin"] } },
8
+ }
9
+ ---
10
+
11
+ # A-Share Deep Analysis
12
+
13
+ Use **fin_stock**, **fin_market**, **fin_index**, **fin_ta** for A-share individual stock research. All data via DataHub, provider = tushare (primary).
14
+
15
+ ## Symbol Format
16
+
17
+ | Board | Pattern | Example |
18
+ | ------------- | ----------- | --------------------------- |
19
+ | Shanghai Main | `600xxx.SH` | 600519.SH (Kweichow Moutai) |
20
+ | Shenzhen Main | `000xxx.SZ` | 000001.SZ (Ping An Bank) |
21
+ | ChiNext | `300xxx.SZ` | 300750.SZ (CATL) |
22
+ | STAR Market | `688xxx.SH` | 688981.SH (SMIC) |
23
+ | Beijing SE | `8xxxxx.BJ` | 830799.BJ |
24
+
25
+ ## fin_stock Endpoints (A-share: 20, excludes hk/income, us/income)
26
+
27
+ | endpoint | data | use case |
28
+ | ------------------------------- | ----------------------- | ----------------------------------- |
29
+ | `price/historical` | OHLCV | price trend, technical overlay |
30
+ | `profile` | company overview | sector, listing date, main business |
31
+ | `fundamental/income` | income statement | revenue/profit trend, YoY |
32
+ | `fundamental/balance` | balance sheet | asset quality, leverage, goodwill |
33
+ | `fundamental/cash` | cash flow | OCF vs NI quality check |
34
+ | `fundamental/ratios` | PE/PB/ROE/margins | valuation, DuPont |
35
+ | `fundamental/metrics` | EV/EBITDA/pe_deducted | cross-method valuation |
36
+ | `fundamental/dividends` | dividend history | DDM input, yield |
37
+ | `fundamental/adj_factor` | adjust factor | ex-rights price |
38
+ | `fundamental/earnings_forecast` | analyst consensus | PEG, expectation gap |
39
+ | `ownership/top10_holders` | top 10 shareholders | concentration |
40
+ | `ownership/shareholder_trade` | insider buy/sell | smart money signal |
41
+ | `ownership/repurchase` | buyback records | management confidence |
42
+ | `ownership/share_float` | float structure | lock-up pressure |
43
+ | `ownership/holder_number` | shareholder count | chip concentration |
44
+ | `pledge/stat` | equity pledge | pledge risk tiers |
45
+ | `moneyflow/individual` | capital flow | institutional vs retail |
46
+ | `market/top_list` | dragon-tiger list | unusual activity |
47
+ | `discovery/gainers` | top gainers (no symbol) | market scan |
48
+ | `discovery/losers` | top losers (no symbol) | market scan |
49
+
50
+ **VIP 端点:** `fundamental/balance_vip`、`income_vip`、`cashflow_vip`、`revenue_segment_vip` 提供更细粒度的财务数据(tushare VIP),用于深度财报分析时替代标准版。
51
+
52
+ ## fin_index Endpoints (A-share relevant)
53
+
54
+ | endpoint | data | use case |
55
+ | --------------------- | ------------------- | --------------------------- |
56
+ | `constituents` | index members | sector exposure check |
57
+ | `daily_basic` | index PE/PB | sector valuation percentile |
58
+ | `thematic/ths_index` | THS concept list | policy/sector rotation scan |
59
+ | `thematic/ths_daily` | THS concept daily | concept momentum tracking |
60
+ | `thematic/ths_member` | THS concept members | theme stock list |
61
+
62
+ ## fin_market Endpoints (individual stock relevant)
63
+
64
+ | endpoint | data | use case |
65
+ | ----------------------- | --------------------- | -------------------------- |
66
+ | `moneyflow/individual` | main force net flow | institutional accumulation |
67
+ | `moneyflow/industry` | sector flow | rotation signal |
68
+ | `moneyflow/block_trade` | block trades | large lot detection |
69
+ | `market/top_list` | dragon-tiger list | unusual volume cause |
70
+ | `market/top_inst` | institutional seats | who is trading |
71
+ | `market/limit_list` | limit-up/down stats | sentiment gauge |
72
+ | `flow/hsgt_top10` | northbound top 10 | foreign holdings delta |
73
+ | `flow/hsgt_flow` | northbound daily flow | macro foreign sentiment |
74
+ | `margin/detail` | margin by stock | leveraged positioning |
75
+
76
+ ## Provider Path
77
+
78
+ A-share: **tushare** (primary, most complete). Data updates ~18:00 CST after close.
79
+
80
+ ## Decision Trees
81
+
82
+ ```
83
+ user question about A-share stock
84
+ ├─ valuation / "worth buying?" → Valuation Tree
85
+ ├─ earnings / financial quality → Earnings Quality Tree
86
+ ├─ shareholders / chip structure → Chip Analysis Tree
87
+ ├─ sector / policy / concept → Policy-Driven Analysis Tree
88
+ ├─ capital flow / who is buying → Capital Flow Cross-Validation Tree
89
+ └─ technical / price / volume → Price-Volume Tree
90
+ ```
91
+
92
+ ### Valuation Tree (A-share adapted)
93
+
94
+ ```
95
+ Step 1: fin_stock(fundamental/ratios) → dt_eps (扣非EPS)
96
+ → PE_deducted = price / dt_eps (手动计算,fundamental/metrics 对 A 股返回 204)
97
+ ├─ pe_deducted < sector 50th pctl
98
+ │ ├─ ROE>15% + OCF/NI>0.8 → undervalued candidate
99
+ │ └─ ROE<8% or OCF/NI<0.5 → value trap warning
100
+ ├─ pe_deducted 50th-80th pctl → check growth
101
+ │ └─ fin_stock(fundamental/earnings_forecast) → PEG
102
+ │ ├─ PEG<1 → growth undervalued
103
+ │ └─ PEG>2 → overpriced for growth
104
+ ├─ pe_deducted > 80th pctl → premium validation
105
+ │ ├─ industry leader + moat + growth>30% → justified
106
+ │ └─ no moat → overvalued risk
107
+ └─ Loss-making (PE meaningless) → alt metrics
108
+ ├─ PB<1 + quality assets → net-net
109
+ └─ PS<sector + revenue growth>50% → growth-stage loss
110
+ ```
111
+
112
+ **A-share valuation specifics:**
113
+
114
+ - Shell value: post-registration-reform ~5-15B RMB; deduct from small-cap EV
115
+ - Non-recurring: compare `deducted_net_income` vs `net_income`; gap >20% = flag
116
+ - Subsidies: NEV/chip sectors heavy — value on post-subsidy earnings
117
+ - A-share premium factors: scarcity (10-30%), liquidity (5-15%), policy (variable), northbound repricing
118
+ - CAS vs IFRS: AH dual-listed may diverge (see Chip Analysis section below for A-share specifics)
119
+
120
+ ### Earnings Quality Tree
121
+
122
+ ```
123
+ Step 1: fin_stock(fundamental/income, limit=8) → 8 quarters
124
+ ├─ NI growth >= revenue growth → margin expansion
125
+ │ └─ fin_stock(fundamental/cash)
126
+ │ ├─ OCF/NI > 0.8 → high quality
127
+ │ └─ OCF/NI < 0.5 → accrual-driven, paper profit
128
+ └─ NI growth < revenue growth → margin squeeze
129
+ └─ fin_stock(fundamental/ratios)
130
+ ├─ gross margin down 2Q → cost pressure
131
+ └─ SGA ratio up → efficiency decline
132
+
133
+ Step 2: fin_stock(fundamental/earnings_forecast)
134
+ ├─ actual > consensus → positive surprise cycle
135
+ └─ consecutive miss → downward revision, avoid
136
+ ```
137
+
138
+ ### Chip Analysis Tree (A-share core — 6 steps)
139
+
140
+ ```
141
+ Step 1: fin_stock(ownership/top10_holders) → concentration %
142
+ ├─ top10 > 70% → highly concentrated (watch lock-up)
143
+ └─ top10 < 30% → dispersed (retail-driven, high vol)
144
+
145
+ Step 2: fin_stock(ownership/shareholder_trade) → insider direction
146
+ ├─ net buy (especially exec) → bullish insider confidence
147
+ ├─ net sell + large ratio → distribution warning
148
+ └─ planned buy announcement → short-term positive
149
+
150
+ Step 3: fin_stock(ownership/repurchase) → buyback
151
+ ├─ cancellation buyback → strongest signal (share count reduction)
152
+ ├─ treasury stock buyback → neutral-positive
153
+ └─ no buyback → no signal
154
+
155
+ Step 4: fin_stock(pledge/stat) → pledge risk
156
+ ├─ <20% → normal
157
+ ├─ 20-50% → elevated watch (monitor price vs margin call)
158
+ └─ >50% → high risk, margin call zone if price drops 20-30%
159
+
160
+ Step 5: fin_stock(ownership/holder_number) → trend (quarterly)
161
+ ├─ count declining 2+ quarters → chip concentration (accumulation)
162
+ └─ count rising 2+ quarters → distribution phase
163
+
164
+ Step 6: fin_stock(ownership/share_float) → lock-up schedule
165
+ └─ large unlock within 3 months → selling pressure expected
166
+ ```
167
+
168
+ **Composite signal matrix:**
169
+
170
+ | buy signal | sell signal | result |
171
+ | ----------------------------------------------- | --------------------------------------------------- | ------------------- |
172
+ | insider buy + buyback + count-down + low pledge | — | strong accumulation |
173
+ | — | insider sell + high pledge + count-up + unlock soon | distribution / risk |
174
+ | mixed signals | mixed signals | wait for clarity |
175
+
176
+ ### Policy-Driven Analysis Tree (A-share unique)
177
+
178
+ ```
179
+ Step 1: Sector identification
180
+ fin_index(thematic/ths_index) → list all THS concept indices
181
+ fin_index(thematic/ths_daily, symbol=concept_code) → concept momentum
182
+
183
+ Step 2: Policy sensitivity classification
184
+ ├─ Encouraged sectors (NEV/chip/AI/green energy)
185
+ │ → higher PE tolerance, subsidy tailwind, watch policy continuation
186
+ ├─ Restricted sectors (gaming/education/real estate)
187
+ │ → valuation discount, regulatory overhang
188
+ └─ Neutral sectors (consumer/healthcare)
189
+ → standard valuation framework
190
+
191
+ Step 3: Concept hype cycle detection
192
+ fin_index(thematic/ths_daily, limit=20) → recent momentum
193
+ ├─ Day 1-3: news catalyst, low volume → early stage
194
+ ├─ Day 4-7: volume surge, limit-ups → fermentation
195
+ ├─ Day 8-12: divergence starts → climax
196
+ └─ Day 13+: leaders fall, laggards catch up → decay
197
+ Action: enter early stage or avoid climax+
198
+
199
+ Step 4: Seasonal pattern overlay
200
+ ├─ Jan-Feb: spring rally (small-cap + growth outperform)
201
+ ├─ Apr: annual report season (quality factor dominates)
202
+ ├─ Jul-Aug: interim reports (growth verification)
203
+ └─ Oct-Dec: style switch (value regression, dividend plays)
204
+ ```
205
+
206
+ **Stock-to-concept mapping:**
207
+ `fin_index(thematic/ths_member, symbol=concept_code)` → verify target stock is in the concept basket.
208
+
209
+ ### Capital Flow Cross-Validation Tree (A-share unique)
210
+
211
+ Three-signal resonance model:
212
+
213
+ ```
214
+ Signal 1: fin_stock(moneyflow/individual, symbol=X)
215
+ → main force net inflow/outflow (institutional flow on single stock)
216
+
217
+ Signal 2: fin_market(market/top_list, date=YYYY-MM-DD) + fin_market(market/top_inst)
218
+ → dragon-tiger list: which institutional seats are buying/selling
219
+ → only triggered when stock hits unusual move thresholds
220
+ → ⚠️ 这些端点使用 `date` 参数(非 `trade_date`)
221
+
222
+ Signal 3: fin_market(flow/hsgt_top10, date=YYYY-MM-DD)
223
+ → northbound (foreign) holdings change on target stock
224
+
225
+ Cross-validation matrix:
226
+ ├─ All 3 bullish (main inflow + inst buy + northbound add)
227
+ │ → strong signal, high conviction
228
+ ├─ Main + northbound aligned, no dragon-tiger entry
229
+ │ → medium signal (not volatile enough for top_list)
230
+ ├─ Main inflow but northbound selling
231
+ │ → domestic-only play, watch for style divergence
232
+ ├─ Northbound adding but main outflow
233
+ │ → long-term foreign accumulation vs short-term domestic sell
234
+ │ → usually positive on 3-6 month horizon
235
+ └─ All 3 bearish → avoid
236
+ ```
237
+
238
+ **Supplementary flow checks:**
239
+
240
+ - `fin_market(margin/detail, symbol=X)` → leveraged positioning trend
241
+ - `fin_market(moneyflow/block_trade, symbol=X)` → block trade premium/discount signals
242
+
243
+ ### Price-Volume Tree
244
+
245
+ ```
246
+ Step 1: fin_stock(price/historical, symbol=X, limit=60)
247
+ Step 2: fin_ta(sma, symbol=X, period=20) + fin_ta(sma, period=60)
248
+ fin_ta(rsi, symbol=X) + fin_ta(macd, symbol=X)
249
+ ├─ RSI>70 + MACD histogram declining → overbought
250
+ ├─ RSI<30 + MACD histogram rising → oversold bounce
251
+ └─ SMA20 cross SMA60 → golden/death cross
252
+ Step 3: Cross-validate with capital flow
253
+ fin_stock(moneyflow/individual, symbol=X)
254
+ ├─ RSI oversold + main inflow → bottom signal
255
+ ├─ RSI overbought + main outflow → top signal
256
+ └─ price down + main inflow → possible shakeout (accumulation)
257
+
258
+ Step 4: Composite Signal Synthesis (买卖信号灯)
259
+ 综合 RSI + MACD + 资金流 + 筹码结构 → 输出单一信号灯
260
+
261
+ 输入:
262
+ T = technical score (RSI + MACD + 均线)
263
+ F = flow score (资金流 + 龙虎榜 + 北向)
264
+ C = chip score (股东增减 + 质押 + 回购)
265
+
266
+ 技术面评分 T (-3 to +3):
267
+ RSI<30 = +1 | RSI>70 = -1 | 30-70 = 0
268
+ MACD 金叉 = +1 | 死叉 = -1 | 零轴上方 = +0.5
269
+ 价格>MA20>MA60 = +1 | 价格<MA20<MA60 = -1
270
+
271
+ 资金面评分 F (-3 to +3):
272
+ 主力净流入 >5000万 = +1 | 净流出 >5000万 = -1
273
+ 北向净买入 = +1 | 净卖出 = -1
274
+ 龙虎榜机构净买 = +1 | 净卖 = -1
275
+
276
+ 筹码面评分 C (-3 to +3):
277
+ 股东人数下降 = +1 | 上升 = -1
278
+ 质押率 <20% = +0.5 | >50% = -1
279
+ 回购/增持 = +1 | 减持 = -1
280
+
281
+ 综合信号 = T + F + C (范围 -9 to +9)
282
+ ├─ >= +5 → 买入信号 (强) — 建议关注支撑位加仓
283
+ ├─ +3~+4 → 买入信号 (弱) — 可小仓位试探
284
+ ├─ -2~+2 → 持有/观望 — 等待信号明确
285
+ ├─ -4~-3 → 卖出信号 (弱) — 减仓或收紧止损
286
+ └─ <= -5 → 卖出信号 (强) — 建议止损离场
287
+
288
+ 输出格式:
289
+ 信号灯: 买入(强)/买入(弱)/持有/卖出(弱)/卖出(强)
290
+ 支撑位: MA60 / 近期低点 (取较高者)
291
+ 阻力位: 近期高点 / 布林上轨 (取较低者)
292
+ 建议止损: 支撑位下方 2-3% (主板) 或 3-5% (创业板/科创板)
293
+ 置信度: 三维共振 (T/F/C 同向) = 高 | 二维共振 = 中 | 信号矛盾 = 低
294
+ ```
295
+
296
+ **A22 预计算技术因子:** `fin_stock(fundamental/stock_factor, symbol=X, limit=60)` → 含 MACD/KDJ/RSI/BOLL/CCI 预计算值,可替代 `fin_ta` 逐个计算。适用于快速技术面扫描。
297
+
298
+ ## Quick Patterns (Supplementary)
299
+
300
+ **A13 打板/连板:** `fin_market(market/limit_list, trade_date=D)` → 涨停家数+连板分布; `fin_market(market/top_list)` → 龙虎榜验证资金来源。连板>3天 + 机构席位净买 = 龙头确认; 首板放量+游资对倒 = 短炒警惕。
301
+ 补充: `fin_stock(market/stock_limit, symbol=X)` → 个股涨跌停价(需带 symbol)。
302
+
303
+ **A14 次新股:** `fin_stock(profile)` → listing_date 筛选上市<1年; `fin_stock(price/historical, limit=60)` → 开板后走势。次新 + 流通盘<5亿 + 行业景气 = 高弹性; 破发 + 业绩下滑 = 回避。
304
+
305
+ **A15 同业PK:** 并行调 `fin_stock(fundamental/ratios)` + `fin_stock(fundamental/metrics)` 对比 ROE/毛利率/PE_deducted。深度因子筛选 → see **fin-factor-screen** skill。
306
+
307
+ **A16 高股息:** `fin_stock(fundamental/dividends, limit=5)` → 分红连续性; `fin_stock(fundamental/ratios)` → 股息率。连续5年 + 股息率>4% + 派息率<70% = 可持续; 派息率>90% 或 OCF 不支撑 = 陷阱。
308
+
309
+ **A17 商誉减值:** `fin_stock(fundamental/balance, limit=4)` → goodwill/net_assets 比值。>30% = 高风险; 业绩承诺到期年 = 减值窗口 (Q4年报季重点)。
310
+
311
+ **A18 注册制板块差异:**
312
+
313
+ | 板块 | 涨跌幅 | 退市 | 打新 |
314
+ | ------------ | ------ | ------ | ------------------ |
315
+ | 主板 (60/00) | ±10% | 传统 | 中签率低, 收益稳 |
316
+ | 创业板 (300) | ±20% | 注册制 | 波动大, 首日无涨停 |
317
+ | 科创板 (688) | ±20% | 最严 | 需50万+2年门槛 |
318
+ | 北交所 (8) | ±30% | 直接 | 流动性弱, 精选 |
319
+
320
+ 先用 `fin_stock(profile)` 确认板块, 再适配涨跌幅和风险框架。
321
+
322
+ **A19 国企改革:** `fin_stock(profile)` → 实控人识别央企/地方国企; `fin_stock(ownership/top10_holders)` → 国有股比例。ROE<行业均值 + 混改预期 = 改革催化; `fin_index(thematic/ths_member)` 查国企改革概念成分。
323
+
324
+ **A20 量化资金:** `fin_stock(price/historical, limit=20)` → 成交量突增>3倍均量但价格窄幅(<2%) = 量化特征; `fin_market(market/top_list)` → 量化席位频繁出现。量化主导 = 波动放大, 趋势策略优于均值回归。
325
+
326
+ **A21 两融标的:** `fin_market(margin/detail, symbol=X)` → 有数据=两融标的, 无数据=非两融。融资余额增+股价涨=杠杆多头; 融券激增=做空压力。非两融不可融券, 策略需纯多头。
327
+
328
+ ## Data Boundaries
329
+
330
+ | Data | Update | Notes |
331
+ | -------------------- | ---------------------- | ------------------------------------------------------------------------ |
332
+ | A-share quotes | EOD ~18:00 CST | not real-time intraday |
333
+ | Financial statements | quarterly | AR: Apr, interim: Aug, Q3: Oct |
334
+ | Earnings forecast | analyst consensus | small-cap may lack coverage |
335
+ | Shareholder count | quarterly disclosure | lags real-time |
336
+ | Insider trades | T+1 after announcement | |
337
+ | Pledge data | weekly update | |
338
+ | Northbound holdings | T+1 | daily top 10 only |
339
+ | Dragon-tiger list | T+1 | only unusual-move days |
340
+ | Block trades | EOD same day | |
341
+ | Analyst consensus | yfinance only | A-share codes NOT supported; use `fundamental/earnings_forecast` instead |
342
+
343
+ ## References
344
+
345
+ - Pledge tiers, lock-up rules, CAS vs IFRS differences, registration reform impacts — see Chip Analysis Tree and Policy-Driven Analysis Tree above
346
+ - DCF/DDM/PE Band methodology — see Valuation Tree above; use `fundamental/ratios` (dt_eps 计算 PE_deducted) for inputs
347
+ - DuPont decomposition, industry benchmarks — derive from `fundamental/ratios` (ROE breakdown) + `fin_index(constituents)` for peer comparison