@weaxs/openclaw-stock-analysis 0.1.3

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 (71) hide show
  1. package/README.md +70 -0
  2. package/index.ts +761 -0
  3. package/openclaw.plugin.json +47 -0
  4. package/package.json +46 -0
  5. package/schemas/report_schema.json +131 -0
  6. package/scripts/setup-python.mjs +52 -0
  7. package/skills/bottom-volume/SKILL.md +63 -0
  8. package/skills/bottom-volume/scripts/gather.py +15 -0
  9. package/skills/box-oscillation/SKILL.md +72 -0
  10. package/skills/box-oscillation/scripts/gather.py +15 -0
  11. package/skills/bull-trend/SKILL.md +60 -0
  12. package/skills/bull-trend/scripts/gather.py +15 -0
  13. package/skills/chan-theory/SKILL.md +71 -0
  14. package/skills/chan-theory/scripts/gather.py +15 -0
  15. package/skills/dragon-head/SKILL.md +69 -0
  16. package/skills/dragon-head/scripts/gather.py +15 -0
  17. package/skills/emotion-cycle/SKILL.md +65 -0
  18. package/skills/emotion-cycle/scripts/gather.py +15 -0
  19. package/skills/event-driven/SKILL.md +73 -0
  20. package/skills/event-driven/scripts/gather.py +15 -0
  21. package/skills/expectation-repricing/SKILL.md +72 -0
  22. package/skills/expectation-repricing/scripts/gather.py +15 -0
  23. package/skills/growth-quality/SKILL.md +74 -0
  24. package/skills/growth-quality/scripts/gather.py +15 -0
  25. package/skills/hot-theme/SKILL.md +74 -0
  26. package/skills/hot-theme/scripts/gather.py +15 -0
  27. package/skills/ma-crossover/SKILL.md +63 -0
  28. package/skills/ma-crossover/scripts/gather.py +15 -0
  29. package/skills/market-review/SKILL.md +70 -0
  30. package/skills/market-review/scripts/gather.py +16 -0
  31. package/skills/one-yang-three-yin/SKILL.md +74 -0
  32. package/skills/one-yang-three-yin/scripts/gather.py +15 -0
  33. package/skills/shrink-pullback/SKILL.md +59 -0
  34. package/skills/shrink-pullback/scripts/gather.py +15 -0
  35. package/skills/stock-analysis/SKILL.md +134 -0
  36. package/skills/stock-analysis/scripts/gather.py +15 -0
  37. package/skills/stock-screener/SKILL.md +68 -0
  38. package/skills/stock-screener/scripts/gather.py +15 -0
  39. package/skills/strategy-backtest/SKILL.md +129 -0
  40. package/skills/strategy-backtest/scripts/gather.py +16 -0
  41. package/skills/volume-breakout/SKILL.md +58 -0
  42. package/skills/volume-breakout/scripts/gather.py +15 -0
  43. package/skills/wave-theory/SKILL.md +67 -0
  44. package/skills/wave-theory/scripts/gather.py +15 -0
  45. package/skills/wisburg-research/SKILL.md +119 -0
  46. package/strategies/examples/bottom_volume.yaml +47 -0
  47. package/strategies/examples/box_oscillation.yaml +41 -0
  48. package/strategies/examples/bull_trend.yaml +42 -0
  49. package/strategies/examples/dragon_head.yaml +45 -0
  50. package/strategies/examples/emotion_cycle.yaml +43 -0
  51. package/strategies/examples/ma_crossover.yaml +34 -0
  52. package/strategies/examples/rsi_oversold.yaml +35 -0
  53. package/strategies/examples/shrink_pullback.yaml +45 -0
  54. package/strategies/examples/volume_breakout.yaml +42 -0
  55. package/tools/__init__.py +0 -0
  56. package/tools/anomaly_detect.py +570 -0
  57. package/tools/backtest.py +643 -0
  58. package/tools/gather.py +152 -0
  59. package/tools/market_regime.py +247 -0
  60. package/tools/market_review.py +150 -0
  61. package/tools/name_resolver.py +131 -0
  62. package/tools/pattern.py +509 -0
  63. package/tools/requirements.txt +13 -0
  64. package/tools/risk_screening.py +318 -0
  65. package/tools/screener.py +213 -0
  66. package/tools/search_intel.py +455 -0
  67. package/tools/stock_data.py +1649 -0
  68. package/tools/technical.py +636 -0
  69. package/tools/trading_calendar.py +198 -0
  70. package/tools/volume_analysis.py +172 -0
  71. package/tools/watchlist.py +61 -0
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env python3
2
+ """Gather technical data for wave-theory analysis."""
3
+
4
+ import subprocess
5
+ import sys
6
+ from pathlib import Path
7
+
8
+ tools = Path(__file__).resolve().parents[2] / "tools"
9
+ result = subprocess.run(
10
+ [sys.executable, str(tools / "gather.py"), "technical", sys.argv[1], "--kline-count", "120"],
11
+ capture_output=True,
12
+ text=True,
13
+ )
14
+ sys.stdout.write(result.stdout)
15
+ sys.exit(result.returncode)
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: wisburg-research
3
+ description: 智堡投研数据检索 — 投行研报、个股研究、财报公告、电话会纪要、市场日报、资讯流
4
+ ---
5
+
6
+ # 智堡(Wisburg)投研数据检索
7
+
8
+ 你是一位投研分析助手,通过智堡 MCP 服务获取专业金融研究数据。智堡涵盖海外投行研报、国内券商研究、资管报告、央行/政府文献、电话会纪要、财报公告等。
9
+
10
+ ## 可用工具
11
+
12
+ 智堡 MCP 提供以下工具(通过 `mcp__wisburg-mcp-server__` 前缀调用):
13
+
14
+ ### 研报类
15
+ | 工具 | 用途 |
16
+ |------|------|
17
+ | `list-institutional-reports` | 投行/券商行业研报(高盛、摩根、中信等) |
18
+ | `list-company-reports` | 个股研究报告 |
19
+ | `list-am-reports` | 资管公司投资策略与市场展望 |
20
+ | `list-archive-reports` | 央行报告、政府政策、智库研究 |
21
+ | `get-report-detail` | 获取研报全文(需 id + category) |
22
+
23
+ ### 财报 & 公告
24
+ | 工具 | 用途 |
25
+ |------|------|
26
+ | `list-earning-calls` | 电话会议纪要(业绩交流会) |
27
+ | `list-filings` | 财报公告(支持 cn/hk/us 三市场) |
28
+ | `get-filing-detail` | 财报详情(需 market + id) |
29
+
30
+ ### 资讯 & 文章
31
+ | 工具 | 用途 |
32
+ |------|------|
33
+ | `list-feed` | 投研资讯流(每日更新的研究摘要) |
34
+ | `list-market-daily` | 金融市场日报(股债汇商+宏观政策) |
35
+ | `list-articles` | 深度研究文章(含 Mikko 日报) |
36
+ | `get-article-detail` | 文章全文(需 id) |
37
+
38
+ ### 其他
39
+ | 工具 | 用途 |
40
+ |------|------|
41
+ | `list-images` | 金融数据图表与信息图 |
42
+ | `list-astock-qa` | A股投资者问答(语义搜索) |
43
+
44
+ ## 使用流程
45
+
46
+ ### 场景一:个股深度研究
47
+
48
+ 用户想了解某只股票的机构观点时:
49
+
50
+ 1. **`list-company-reports`** — `query` 填股票名称或代码,获取个股研报列表
51
+ 2. **`get-report-detail`** — 用返回的 `id` + `category: "company"` + `kind` 获取全文
52
+ 3. **`list-earning-calls`** — `query` 搜索该公司电话会纪要
53
+ 4. **`list-filings`** — `market` 填 cn/hk/us,`query` 搜索财报公告
54
+ 5. 综合以上信息输出机构观点汇总
55
+
56
+ ### 场景二:行业/宏观研究
57
+
58
+ 用户想了解某行业或宏观趋势时:
59
+
60
+ 1. **`list-institutional-reports`** — `query` 填行业关键词(如"半导体"、"新能源")
61
+ 2. **`list-am-reports`** — 搜索资管机构的市场展望
62
+ 3. **`list-archive-reports`** — 搜索央行/政府相关政策文件
63
+ 4. **`get-report-detail`** — 获取重点报告全文
64
+ 5. 汇总各方观点,给出行业趋势判断
65
+
66
+ ### 场景三:每日市场速览
67
+
68
+ 用户想了解今日市场动态时:
69
+
70
+ 1. **`list-market-daily`** — `first: 3` 获取最近几天的市场日报
71
+ 2. **`list-feed`** — `first: 10` 获取最新投研资讯
72
+ 3. 提炼关键信息,输出今日要点
73
+
74
+ ### 场景四:A股投资者互动
75
+
76
+ 用户想了解某公司回复投资者的问题时:
77
+
78
+ 1. **`list-astock-qa`** — `query` 填公司名或股票代码,支持语义搜索
79
+
80
+ ## 工具参数说明
81
+
82
+ 所有 list 类工具共享以下参数:
83
+ - `first` — 每页条数(默认 20,最大 100)
84
+ - `after` — 翻页游标(从上一次返回的 cursor 获取)
85
+ - `query` — 搜索关键词(不填则按时间倒序)
86
+ - `startTime` / `endTime` — 时间筛选(ISO 8601 格式)
87
+
88
+ `get-report-detail` 参数:
89
+ - `id` — 报告 ID(从 list 结果获取)
90
+ - `category` — 必须匹配来源:`ib`(投行研报)、`company`(企业研究)、`am`(资管)、`archive`(文献)、`ec`(电话会)
91
+ - `kind` — 仅 ib/company 类别需要,从 list 结果中获取
92
+
93
+ `list-filings` / `get-filing-detail` 参数:
94
+ - `market` — 必填:`cn`(A股)、`hk`(港股)、`us`(美股)
95
+
96
+ ## 输出格式
97
+
98
+ ```
99
+ ## 投研速览:[主题]
100
+
101
+ ### 核心观点
102
+ - [机构名] [日期]:[观点摘要]
103
+ - ...
104
+
105
+ ### 关键数据
106
+ - ...
107
+
108
+ ### 风险提示
109
+ - ...
110
+
111
+ ### 信息来源
112
+ - [报告标题]([机构],[日期])
113
+ ```
114
+
115
+ ## 注意事项
116
+ - 投行研报(category: ib)因版权限制不提供原文链接
117
+ - 搜索不到结果时尝试换关键词(中文/英文/股票代码)
118
+ - 时间筛选有助于获取最新报告,避免过时信息
119
+ - 始终注明信息来源(机构、日期),方便用户验证
@@ -0,0 +1,47 @@
1
+ name: "Bottom Volume Reversal"
2
+ version: "1.0"
3
+ description: "底部放量策略 — 超跌后RSI进入超卖区,突然放量反弹时买入"
4
+
5
+ parameters:
6
+ rsi_period: 14
7
+ rsi_threshold: 35
8
+ volume_threshold: 2.0
9
+ stop_loss: -0.05
10
+ take_profit: 0.15
11
+
12
+ entry:
13
+ conditions:
14
+ - indicator: "rsi"
15
+ period: "{rsi_period}"
16
+ operator: "<"
17
+ value: "{rsi_threshold}"
18
+ - indicator: "volume_ratio"
19
+ period: 5
20
+ operator: ">"
21
+ value: "{volume_threshold}"
22
+ - indicator: "price_change"
23
+ operator: ">"
24
+ value: 1.0
25
+ - indicator: "bollinger_position"
26
+ period: 20
27
+ operator: "<"
28
+ value: 0.25
29
+ logic: "all"
30
+
31
+ exit:
32
+ conditions:
33
+ - indicator: "rsi"
34
+ period: "{rsi_period}"
35
+ operator: ">"
36
+ value: 65
37
+ - indicator: "bollinger_position"
38
+ period: 20
39
+ operator: ">"
40
+ value: 0.8
41
+ logic: "any"
42
+ stop_loss: "{stop_loss}"
43
+ take_profit: "{take_profit}"
44
+
45
+ position:
46
+ size: 0.6
47
+ max_positions: 1
@@ -0,0 +1,41 @@
1
+ name: "Box Oscillation"
2
+ version: "1.0"
3
+ description: "箱体震荡策略 — 股价在布林带下轨附近且RSI超卖时买入,在上轨附近且RSI超买时卖出"
4
+
5
+ parameters:
6
+ boll_buy: 0.15
7
+ boll_sell: 0.85
8
+ rsi_buy: 35
9
+ rsi_sell: 65
10
+ stop_loss: -0.05
11
+ take_profit: 0.12
12
+
13
+ entry:
14
+ conditions:
15
+ - indicator: "bollinger_position"
16
+ period: 20
17
+ operator: "<"
18
+ value: "{boll_buy}"
19
+ - indicator: "rsi"
20
+ period: 14
21
+ operator: "<"
22
+ value: "{rsi_buy}"
23
+ logic: "all"
24
+
25
+ exit:
26
+ conditions:
27
+ - indicator: "bollinger_position"
28
+ period: 20
29
+ operator: ">"
30
+ value: "{boll_sell}"
31
+ - indicator: "rsi"
32
+ period: 14
33
+ operator: ">"
34
+ value: "{rsi_sell}"
35
+ logic: "any"
36
+ stop_loss: "{stop_loss}"
37
+ take_profit: "{take_profit}"
38
+
39
+ position:
40
+ size: 0.8
41
+ max_positions: 1
@@ -0,0 +1,42 @@
1
+ name: "Bull Trend Following"
2
+ version: "1.0"
3
+ description: "趋势追踪策略 — 均线多头排列+MACD零轴上方时入场,趋势转弱时离场"
4
+
5
+ parameters:
6
+ stop_loss: -0.08
7
+ take_profit: 0.30
8
+
9
+ entry:
10
+ conditions:
11
+ - indicator: "ma_diff"
12
+ period: 510
13
+ operator: ">"
14
+ value: 0
15
+ - indicator: "ma_diff"
16
+ period: 1020
17
+ operator: ">"
18
+ value: 0
19
+ - indicator: "macd_dif"
20
+ operator: ">"
21
+ value: 0
22
+ - indicator: "volume_ratio"
23
+ operator: ">"
24
+ value: 0.8
25
+ logic: "all"
26
+
27
+ exit:
28
+ conditions:
29
+ - indicator: "ma_diff"
30
+ period: 510
31
+ operator: "cross_below"
32
+ value: 0
33
+ - indicator: "macd_dif"
34
+ operator: "cross_below"
35
+ value: 0
36
+ logic: "any"
37
+ stop_loss: "{stop_loss}"
38
+ take_profit: "{take_profit}"
39
+
40
+ position:
41
+ size: 1.0
42
+ max_positions: 1
@@ -0,0 +1,45 @@
1
+ name: "Dragon Head Momentum"
2
+ version: "1.0"
3
+ description: "龙头股动量策略 — 涨幅>5%+放量>2.5倍+趋势向上时追击强势股"
4
+
5
+ parameters:
6
+ min_change: 5.0
7
+ volume_threshold: 2.5
8
+ stop_loss: -0.06
9
+ take_profit: 0.25
10
+
11
+ entry:
12
+ conditions:
13
+ - indicator: "price_change"
14
+ operator: ">"
15
+ value: "{min_change}"
16
+ - indicator: "volume_ratio"
17
+ period: 5
18
+ operator: ">"
19
+ value: "{volume_threshold}"
20
+ - indicator: "ma_diff"
21
+ period: 510
22
+ operator: ">"
23
+ value: 0
24
+ logic: "all"
25
+
26
+ exit:
27
+ conditions:
28
+ - indicator: "price_change"
29
+ operator: "<"
30
+ value: -3.0
31
+ - indicator: "volume_ratio"
32
+ period: 5
33
+ operator: ">"
34
+ value: 3.0
35
+ logic: "any"
36
+ stop_loss: "{stop_loss}"
37
+ take_profit: "{take_profit}"
38
+
39
+ simulation:
40
+ slippage: 0.002
41
+ commission: 0.0015
42
+
43
+ position:
44
+ size: 0.5
45
+ max_positions: 1
@@ -0,0 +1,43 @@
1
+ name: "Emotion Cycle Contrarian"
2
+ version: "1.0"
3
+ description: "情绪周期逆向策略 — RSI极度超卖+缩量+布林带底部时逆向买入"
4
+
5
+ parameters:
6
+ rsi_extreme: 25
7
+ rsi_exit: 60
8
+ stop_loss: -0.07
9
+ take_profit: 0.18
10
+
11
+ entry:
12
+ conditions:
13
+ - indicator: "rsi"
14
+ period: 14
15
+ operator: "<"
16
+ value: "{rsi_extreme}"
17
+ - indicator: "volume_ratio"
18
+ period: 5
19
+ operator: "<"
20
+ value: 0.7
21
+ - indicator: "bollinger_position"
22
+ period: 20
23
+ operator: "<"
24
+ value: 0.1
25
+ logic: "all"
26
+
27
+ exit:
28
+ conditions:
29
+ - indicator: "rsi"
30
+ period: 14
31
+ operator: ">"
32
+ value: "{rsi_exit}"
33
+ - indicator: "volume_ratio"
34
+ period: 5
35
+ operator: ">"
36
+ value: 2.5
37
+ logic: "any"
38
+ stop_loss: "{stop_loss}"
39
+ take_profit: "{take_profit}"
40
+
41
+ position:
42
+ size: 0.5
43
+ max_positions: 1
@@ -0,0 +1,34 @@
1
+ name: "MA Golden Cross"
2
+ version: "1.0"
3
+ description: "均线金叉策略 — MA5上穿MA20时买入,MA5下穿MA20时卖出。使用 ma_diff 指标(编码: fast*100+slow,如520=MA5-MA20)检测交叉"
4
+
5
+ parameters:
6
+ fast_period: 5
7
+ slow_period: 20
8
+ stop_loss: -0.08
9
+ take_profit: 0.20
10
+
11
+ entry:
12
+ conditions:
13
+ - indicator: "ma_diff"
14
+ period: 520
15
+ operator: "cross_above"
16
+ value: 0
17
+ - indicator: "volume_ratio"
18
+ operator: ">"
19
+ value: 1.2
20
+ logic: "all"
21
+
22
+ exit:
23
+ conditions:
24
+ - indicator: "ma_diff"
25
+ period: 520
26
+ operator: "cross_below"
27
+ value: 0
28
+ logic: "any"
29
+ stop_loss: "{stop_loss}"
30
+ take_profit: "{take_profit}"
31
+
32
+ position:
33
+ size: 1.0
34
+ max_positions: 1
@@ -0,0 +1,35 @@
1
+ name: "RSI Oversold Bounce"
2
+ version: "1.0"
3
+ description: "RSI超卖反弹策略 — 当RSI跌至超卖区间时买入,升至超买区间时卖出"
4
+
5
+ parameters:
6
+ rsi_period: 14
7
+ rsi_oversold: 30
8
+ rsi_overbought: 70
9
+ stop_loss: -0.05
10
+ take_profit: 0.15
11
+
12
+ entry:
13
+ conditions:
14
+ - indicator: "rsi"
15
+ period: "{rsi_period}"
16
+ operator: "<"
17
+ value: "{rsi_oversold}"
18
+ - indicator: "volume_ratio"
19
+ operator: ">"
20
+ value: 1.0
21
+ logic: "all"
22
+
23
+ exit:
24
+ conditions:
25
+ - indicator: "rsi"
26
+ period: "{rsi_period}"
27
+ operator: ">"
28
+ value: "{rsi_overbought}"
29
+ logic: "any"
30
+ stop_loss: "{stop_loss}"
31
+ take_profit: "{take_profit}"
32
+
33
+ position:
34
+ size: 1.0
35
+ max_positions: 1
@@ -0,0 +1,45 @@
1
+ name: "Shrink Pullback"
2
+ version: "1.0"
3
+ description: "缩量回调策略 — 上升趋势中缩量回踩MA20附近,放量反弹时买入"
4
+
5
+ parameters:
6
+ stop_loss: -0.06
7
+ take_profit: 0.15
8
+
9
+ entry:
10
+ conditions:
11
+ - indicator: "ma_diff"
12
+ period: 1020
13
+ operator: ">"
14
+ value: 0
15
+ - indicator: "bollinger_position"
16
+ period: 20
17
+ operator: "<"
18
+ value: 0.4
19
+ - indicator: "rsi"
20
+ period: 14
21
+ operator: "<"
22
+ value: 50
23
+ - indicator: "volume_ratio"
24
+ period: 5
25
+ operator: ">"
26
+ value: 1.2
27
+ logic: "all"
28
+
29
+ exit:
30
+ conditions:
31
+ - indicator: "rsi"
32
+ period: 14
33
+ operator: ">"
34
+ value: 75
35
+ - indicator: "bollinger_position"
36
+ period: 20
37
+ operator: ">"
38
+ value: 0.9
39
+ logic: "any"
40
+ stop_loss: "{stop_loss}"
41
+ take_profit: "{take_profit}"
42
+
43
+ position:
44
+ size: 1.0
45
+ max_positions: 1
@@ -0,0 +1,42 @@
1
+ name: "Volume Breakout"
2
+ version: "1.0"
3
+ description: "放量突破策略 — 股价突破20日高点且成交量放大2倍以上时买入"
4
+
5
+ parameters:
6
+ breakout_period: 20
7
+ volume_threshold: 2.0
8
+ stop_loss: -0.06
9
+ take_profit: 0.20
10
+
11
+ entry:
12
+ conditions:
13
+ - indicator: "bollinger_position"
14
+ period: 20
15
+ operator: ">"
16
+ value: 0.95
17
+ - indicator: "volume_ratio"
18
+ period: 5
19
+ operator: ">"
20
+ value: "{volume_threshold}"
21
+ - indicator: "price_change"
22
+ operator: ">"
23
+ value: 2.0
24
+ logic: "all"
25
+
26
+ exit:
27
+ conditions:
28
+ - indicator: "ma_diff"
29
+ period: 510
30
+ operator: "cross_below"
31
+ value: 0
32
+ - indicator: "rsi"
33
+ period: 14
34
+ operator: ">"
35
+ value: 80
36
+ logic: "any"
37
+ stop_loss: "{stop_loss}"
38
+ take_profit: "{take_profit}"
39
+
40
+ position:
41
+ size: 0.8
42
+ max_positions: 1
File without changes