@v587d/capital-generation 2.31.3 → 2.31.5

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 (48) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +46 -8
  3. package/automation/package.json +1 -1
  4. package/chart-ui/package.json +1 -1
  5. package/config/package.json +1 -1
  6. package/lib/analysis/registry.js +6 -1
  7. package/lib/collector-runtime.js +8 -0
  8. package/lib/data-collector/catalog-taxonomy.js +11 -0
  9. package/lib/sources/eastmoney-http.js +274 -0
  10. package/lib/sources/sec-http.d.ts +9 -0
  11. package/lib/sources/sec-http.js +643 -0
  12. package/lib/sources/us-official-http.d.ts +4 -0
  13. package/lib/sources/us-official-http.js +654 -0
  14. package/lib/time/tools.js +6 -0
  15. package/lib/web-retriever/local-fetch.d.ts +1 -1
  16. package/lib/web-retriever/local-fetch.js +1 -1
  17. package/lib/web-retriever/wind-client.d.ts +1 -1
  18. package/lib/web-retriever/wind-client.js +1 -1
  19. package/package.json +1 -1
  20. package/plugin-page/README.en.md +7 -0
  21. package/plugin-page/README.zh.md +7 -0
  22. package/preset/capital-generation/skills/capital-analysis-evidence/SKILL.md +47 -37
  23. package/preset/capital-generation/skills/capital-senior-analysis/SKILL.md +4 -2
  24. package/python/analysis/modules/comps_valuation/LICENSE +21 -0
  25. package/python/analysis/modules/comps_valuation/module.json +61 -0
  26. package/python/analysis/modules/comps_valuation/module.py +360 -0
  27. package/python/analysis/modules/earnings_bridge/LICENSE +21 -0
  28. package/python/analysis/modules/earnings_bridge/module.json +58 -0
  29. package/python/analysis/modules/earnings_bridge/module.py +452 -0
  30. package/python/analysis/modules/kline_quality/LICENSE +21 -0
  31. package/python/analysis/modules/kline_quality/module.json +61 -0
  32. package/python/analysis/modules/kline_quality/module.py +538 -0
  33. package/python/analysis/modules/portfolio_stress/LICENSE +21 -0
  34. package/python/analysis/modules/portfolio_stress/module.json +89 -0
  35. package/python/analysis/modules/portfolio_stress/module.py +537 -0
  36. package/python/analysis/modules/simple_backtest/LICENSE +21 -0
  37. package/python/analysis/modules/simple_backtest/module.json +66 -0
  38. package/python/analysis/modules/simple_backtest/module.py +648 -0
  39. package/python/analysis/modules/statement_integrity/LICENSE +21 -0
  40. package/python/analysis/modules/statement_integrity/module.json +62 -0
  41. package/python/analysis/modules/statement_integrity/module.py +621 -0
  42. package/python/analysis/modules/technical_indicators/LICENSE +21 -0
  43. package/python/analysis/modules/technical_indicators/module.json +170 -0
  44. package/python/analysis/modules/technical_indicators/module.py +854 -0
  45. package/python/analysis/modules/valuation_sensitivity/LICENSE +21 -0
  46. package/python/analysis/modules/valuation_sensitivity/module.json +73 -0
  47. package/python/analysis/modules/valuation_sensitivity/module.py +589 -0
  48. package/watchlist/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 v587d
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,73 @@
1
+ {
2
+ "id": "valuation_sensitivity",
3
+ "version": "1.0.0",
4
+ "entrypoint": "module.py",
5
+ "runtime": "python",
6
+ "description": "DCF 模型值与敏感性:按调用方给的显式假设算企业价值、EV→股权桥与每股模型值,输出 WACC×终值增长二维敏感性;不预测、不评级、不是目标价",
7
+ "roles": ["senior_analyst"],
8
+ "capabilities": [],
9
+ "required_fields": [],
10
+ "input_schema": {
11
+ "type": "object",
12
+ "properties": {
13
+ "projections": { "type": "array", "maxItems": 20, "items": { "type": "number" }, "description": "显式预测期自由现金流(原币,按年顺序),至少 1 期;由调用方从数据或研究给出,模块不估计" },
14
+ "wacc": { "type": "number", "minimum": 0, "description": "折现率(小数,0.10 = 10%);给了 wacc 就不再用 CAPM 参数" },
15
+ "terminal_growth": { "type": "number", "minimum": 0, "description": "终值永续增长率(小数);必须小于 wacc,否则无经济含义,直接拒" },
16
+ "net_debt": { "type": "number", "description": "净负债 = 有息负债 − 现金(原币);净现金状态给负数" },
17
+ "shares_outstanding": { "type": "number", "minimum": 0, "description": "稀释后总股本(股);必须 > 0" },
18
+ "minority_interest": { "type": "number", "minimum": 0, "description": "少数股东权益(原币,从 EV 里扣除);省略为 0 并在假设里披露" },
19
+ "mid_year": { "type": "boolean", "description": "是否按年中折现(默认 false = 年末折现)" },
20
+ "wacc_grid": { "type": "array", "maxItems": 9, "items": { "type": "number" }, "description": "敏感性网格的 WACC 列;省略时围绕 wacc 取 ±2 个标准点" },
21
+ "terminal_growth_grid": { "type": "array", "maxItems": 9, "items": { "type": "number" }, "description": "敏感性网格的终值增长行;省略时围绕 terminal_growth 取 ±2 个标准点" },
22
+ "risk_free_rate": { "type": "number", "description": "CAPM 无风险利率(小数);与 beta / equity_risk_premium 一起提供时用来推 WACC" },
23
+ "beta": { "type": "number", "description": "CAPM beta" },
24
+ "equity_risk_premium": { "type": "number", "description": "CAPM 股权风险溢价(小数)" },
25
+ "cost_of_debt": { "type": "number", "minimum": 0, "description": "税前债务成本(小数)" },
26
+ "tax_rate": { "type": "number", "minimum": 0, "description": "边际税率(小数)" },
27
+ "debt_weight": { "type": "number", "minimum": 0, "description": "资本结构中的债务权重(小数,0.3 = 30%);用于 CAPM 推 WACC" },
28
+ "currency": { "type": "string", "maxLength": 8, "description": "金额币种(如 CNY / USD);只用于标注,不做换算" }
29
+ },
30
+ "additionalProperties": false
31
+ },
32
+ "output_schema": {
33
+ "type": "object",
34
+ "properties": {
35
+ "status": { "type": "string", "enum": ["completed", "partial", "blocked", "failed"] },
36
+ "summary": { "type": "string" },
37
+ "metrics": { "type": "object" },
38
+ "claims": { "type": "array" },
39
+ "assumptions": { "type": "array" },
40
+ "methodology_log": { "type": "array" },
41
+ "sensitivity": { "type": "object" },
42
+ "limitations": { "type": "array" },
43
+ "data_gaps": { "type": "array" },
44
+ "outputs": { "type": "array" }
45
+ },
46
+ "required": [
47
+ "status", "summary", "metrics", "claims", "assumptions", "methodology_log",
48
+ "sensitivity", "limitations", "data_gaps", "outputs"
49
+ ],
50
+ "additionalProperties": false
51
+ },
52
+ "assumptions": [
53
+ "预测期自由现金流与全部假设由调用方显式给出:模块只做折现与终值算术,不估计 FCF、增长率、WACC 或市场价格",
54
+ "终值用戈登永续:TV_n = FCF_n × (1 + terminal_growth) / (wacc − terminal_growth),再折现 n 期;wacc ≤ terminal_growth 直接拒绝",
55
+ "企业价值 EV = Σ FCF_t/(1+wacc)^t + TV_n/(1+wacc)^n;mid_year 时每期指数为 t − 0.5,否则为 t",
56
+ "股权价值 = EV − net_debt − minority_interest;每股模型值 = 股权价值 / shares_outstanding",
57
+ "CAPM 路径:Ke = risk_free_rate + beta × equity_risk_premium;WACC = (1 − debt_weight) × Ke + debt_weight × cost_of_debt × (1 − tax_rate);只作为 wacc 的推导口径,不代替市场利率",
58
+ "输出是「给定假设下的模型值」:不是目标价、不是概率,也不代表市场价格应到哪;敏感性网格只是假设区间,不是置信区间"
59
+ ],
60
+ "applicability": [
61
+ "需要明确预测期 FCF、折现率(或 CAPM 输入)、终值增长、净负债与股本;缺任何一项都不估算、不填默认值",
62
+ "适用于现金流可稳定外推的成熟公司;亏损、周期性极强、金融企业或需要多阶段增长模型的场景不适用",
63
+ "金额与股本口径必须与预测 FCF 一致(原币、稀释后股本);跨币种不做换算",
64
+ "不输出评级、目标价、买卖建议或收益承诺"
65
+ ],
66
+ "limits": {
67
+ "timeout_ms": 30000,
68
+ "max_input_rows": 200000,
69
+ "max_output_bytes": 1048576,
70
+ "max_log_bytes": 65536
71
+ },
72
+ "provenance": { "source_type": "original", "license": "MIT" }
73
+ }