stock-analysis-plugin 0.1.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 (84) hide show
  1. package/README.md +498 -0
  2. package/package.json +88 -0
  3. package/pi/index.ts +1142 -0
  4. package/schemas/market_review_schema.json +176 -0
  5. package/schemas/report_schema.json +131 -0
  6. package/scripts/setup-python.mjs +57 -0
  7. package/scripts/sync-version.sh +56 -0
  8. package/scripts/venv-python.mjs +20 -0
  9. package/skills/bottom-volume/SKILL.md +63 -0
  10. package/skills/bottom-volume/scripts/gather.py +22 -0
  11. package/skills/box-oscillation/SKILL.md +72 -0
  12. package/skills/box-oscillation/scripts/gather.py +22 -0
  13. package/skills/bull-trend/SKILL.md +60 -0
  14. package/skills/bull-trend/scripts/gather.py +22 -0
  15. package/skills/chan-theory/SKILL.md +71 -0
  16. package/skills/chan-theory/scripts/gather.py +22 -0
  17. package/skills/dragon-head/SKILL.md +69 -0
  18. package/skills/dragon-head/scripts/gather.py +22 -0
  19. package/skills/emotion-cycle/SKILL.md +65 -0
  20. package/skills/emotion-cycle/scripts/gather.py +22 -0
  21. package/skills/event-driven/SKILL.md +73 -0
  22. package/skills/event-driven/scripts/gather.py +22 -0
  23. package/skills/expectation-repricing/SKILL.md +72 -0
  24. package/skills/expectation-repricing/scripts/gather.py +22 -0
  25. package/skills/growth-quality/SKILL.md +74 -0
  26. package/skills/growth-quality/scripts/gather.py +22 -0
  27. package/skills/hot-theme/SKILL.md +74 -0
  28. package/skills/hot-theme/scripts/gather.py +22 -0
  29. package/skills/ma-crossover/SKILL.md +63 -0
  30. package/skills/ma-crossover/scripts/gather.py +22 -0
  31. package/skills/market-review/SKILL.md +70 -0
  32. package/skills/market-review/scripts/gather.py +23 -0
  33. package/skills/one-yang-three-yin/SKILL.md +74 -0
  34. package/skills/one-yang-three-yin/scripts/gather.py +22 -0
  35. package/skills/shrink-pullback/SKILL.md +59 -0
  36. package/skills/shrink-pullback/scripts/gather.py +22 -0
  37. package/skills/stock-analysis/SKILL.md +134 -0
  38. package/skills/stock-analysis/scripts/gather.py +22 -0
  39. package/skills/stock-screener/SKILL.md +68 -0
  40. package/skills/stock-screener/scripts/gather.py +22 -0
  41. package/skills/strategy-backtest/SKILL.md +129 -0
  42. package/skills/strategy-backtest/scripts/gather.py +23 -0
  43. package/skills/volume-breakout/SKILL.md +58 -0
  44. package/skills/volume-breakout/scripts/gather.py +22 -0
  45. package/skills/wave-theory/SKILL.md +67 -0
  46. package/skills/wave-theory/scripts/gather.py +22 -0
  47. package/skills/wisburg-research/SKILL.md +119 -0
  48. package/strategies/examples/bottom_volume.yaml +47 -0
  49. package/strategies/examples/box_oscillation.yaml +41 -0
  50. package/strategies/examples/bull_trend.yaml +42 -0
  51. package/strategies/examples/dragon_head.yaml +45 -0
  52. package/strategies/examples/emotion_cycle.yaml +43 -0
  53. package/strategies/examples/ma_crossover.yaml +34 -0
  54. package/strategies/examples/rsi_oversold.yaml +35 -0
  55. package/strategies/examples/shrink_pullback.yaml +45 -0
  56. package/strategies/examples/volume_breakout.yaml +42 -0
  57. package/templates/_macros.j2 +90 -0
  58. package/templates/market_review/full.md.j2 +103 -0
  59. package/templates/stock_analysis/brief.md.j2 +28 -0
  60. package/templates/stock_analysis/full.md.j2 +108 -0
  61. package/tools/__init__.py +0 -0
  62. package/tools/alert_rules.py +243 -0
  63. package/tools/anomaly_detect.py +575 -0
  64. package/tools/backtest.py +764 -0
  65. package/tools/capabilities.py +108 -0
  66. package/tools/diagnostics.py +146 -0
  67. package/tools/gather.py +157 -0
  68. package/tools/import_parser.py +279 -0
  69. package/tools/market_regime.py +252 -0
  70. package/tools/market_review.py +155 -0
  71. package/tools/name_resolver.py +136 -0
  72. package/tools/pattern.py +515 -0
  73. package/tools/position_context.py +161 -0
  74. package/tools/report_renderer.py +116 -0
  75. package/tools/requirements.txt +15 -0
  76. package/tools/risk_screening.py +323 -0
  77. package/tools/screener.py +219 -0
  78. package/tools/search_intel.py +504 -0
  79. package/tools/stock_data.py +1721 -0
  80. package/tools/technical.py +642 -0
  81. package/tools/trading_calendar.py +226 -0
  82. package/tools/volume_analysis.py +178 -0
  83. package/tools/watchlist.py +66 -0
  84. package/tools/watchlist_context.py +185 -0
@@ -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
@@ -0,0 +1,90 @@
1
+ {# Shared Jinja2 macros for stock-analysis-plugin report templates. #}
2
+
3
+ {% macro decision_emoji(decision) -%}
4
+ {%- if decision == 'strong_buy' -%}🟢🟢
5
+ {%- elif decision == 'buy' -%}🟢
6
+ {%- elif decision == 'hold' -%}⚪
7
+ {%- elif decision == 'sell' -%}🟡
8
+ {%- elif decision == 'strong_sell' -%}🔴
9
+ {%- else -%}❔
10
+ {%- endif -%}
11
+ {%- endmacro %}
12
+
13
+ {% macro decision_label(decision) -%}
14
+ {%- if decision == 'strong_buy' -%}强烈买入
15
+ {%- elif decision == 'buy' -%}买入
16
+ {%- elif decision == 'hold' -%}观望
17
+ {%- elif decision == 'sell' -%}卖出
18
+ {%- elif decision == 'strong_sell' -%}强烈卖出
19
+ {%- else -%}-
20
+ {%- endif -%}
21
+ {%- endmacro %}
22
+
23
+ {% macro confidence_label(c) -%}
24
+ {%- if c == 'high' -%}高
25
+ {%- elif c == 'medium' -%}中
26
+ {%- elif c == 'low' -%}低
27
+ {%- else -%}-
28
+ {%- endif -%}
29
+ {%- endmacro %}
30
+
31
+ {% macro signal_emoji(signal) -%}
32
+ {%- if signal == 'green' -%}🟢
33
+ {%- elif signal == 'yellow' -%}🟡
34
+ {%- elif signal == 'red' -%}🔴
35
+ {%- else -%}⚪
36
+ {%- endif -%}
37
+ {%- endmacro %}
38
+
39
+ {% macro signal_label(signal) -%}
40
+ {%- if signal == 'green' -%}绿灯(进攻)
41
+ {%- elif signal == 'yellow' -%}黄灯(均衡)
42
+ {%- elif signal == 'red' -%}红灯(防守)
43
+ {%- else -%}-
44
+ {%- endif -%}
45
+ {%- endmacro %}
46
+
47
+ {% macro stance_label(stance) -%}
48
+ {%- if stance == 'offensive' -%}进攻
49
+ {%- elif stance == 'balanced' -%}均衡
50
+ {%- elif stance == 'defensive' -%}防守
51
+ {%- else -%}-
52
+ {%- endif -%}
53
+ {%- endmacro %}
54
+
55
+ {% macro risk_emoji(level) -%}
56
+ {%- if level == 'high' -%}🔴
57
+ {%- elif level == 'medium' -%}🟡
58
+ {%- elif level == 'low' -%}🟢
59
+ {%- else -%}⚪
60
+ {%- endif -%}
61
+ {%- endmacro %}
62
+
63
+ {% macro change_pct(v) -%}
64
+ {%- if v is none or v is not number -%}-
65
+ {%- elif v > 0 -%}+{{ '%.2f'|format(v) }}%
66
+ {%- else -%}{{ '%.2f'|format(v) }}%
67
+ {%- endif -%}
68
+ {%- endmacro %}
69
+
70
+ {% macro fmt_num(v, digits=2) -%}
71
+ {%- if v is none -%}-
72
+ {%- elif v is number -%}{{ ('%%.%df' % digits)|format(v) }}
73
+ {%- else -%}{{ v }}
74
+ {%- endif -%}
75
+ {%- endmacro %}
76
+
77
+ {% macro market_cn(m) -%}
78
+ {%- if m == 'A' -%}A 股
79
+ {%- elif m == 'HK' -%}港股
80
+ {%- elif m == 'US' -%}美股
81
+ {%- else -%}{{ m }}
82
+ {%- endif -%}
83
+ {%- endmacro %}
84
+
85
+ {% macro direction_emoji(d) -%}
86
+ {%- if d == 'positive' -%}✅
87
+ {%- elif d == 'negative' -%}⚠️
88
+ {%- else -%}ℹ️
89
+ {%- endif -%}
90
+ {%- endmacro %}
@@ -0,0 +1,103 @@
1
+ {%- import '_macros.j2' as m -%}
2
+ # {{ m.market_cn(market) }}大盘复盘 · {{ review_date }}
3
+
4
+ {% set t = temperature or {} -%}
5
+ **温度:** {{ m.signal_emoji(t.signal) }} {{ m.fmt_num(t.score, 1) }}/100 | **信号灯:** {{ m.signal_label(t.signal) }} | **策略姿态:** {{ m.stance_label(strategy_stance) }}
6
+
7
+ {% if regime and (regime.regime_cn or regime.regime) -%}
8
+ > **市场阶段:** {{ regime.regime_cn or regime.regime }}{% if regime.confidence is not none %}(置信度 {{ m.fmt_num(regime.confidence) }}){% endif %}{% if regime.recommended_skills %} | **推荐策略:** {{ regime.recommended_skills | join('、') }}{% endif %}
9
+ {%- endif %}
10
+
11
+ ## 1. 盘面总览
12
+
13
+ {% set ov = overview or {} -%}
14
+ {% if ov.headline -%}
15
+ {{ ov.headline }}
16
+
17
+ {% endif -%}
18
+ {% if ov.indices -%}
19
+ | 指数 | 现值 | 涨跌幅 | 成交量 |
20
+ |------|------|--------|--------|
21
+ {% for idx in ov.indices -%}
22
+ | {{ idx.name }}{% if idx.code %}({{ idx.code }}){% endif %} | {{ m.fmt_num(idx.price) }} | {{ m.change_pct(idx.change_pct) }} | {{ idx.volume or '-' }} |
23
+ {% endfor %}
24
+ {%- endif %}
25
+
26
+ {% set br = ov.breadth or {} -%}
27
+ {% if br and (br.up_count is not none or br.limit_up_count is not none) -%}
28
+ - **涨跌家数:** 🟢 {{ br.up_count or 0 }} 上涨 | 🔴 {{ br.down_count or 0 }} 下跌
29
+ - **涨跌停:** 🚀 {{ br.limit_up_count or 0 }} 涨停 | 💧 {{ br.limit_down_count or 0 }} 跌停
30
+ {% if br.turnover %}- **成交额:** {{ br.turnover }}{% if br.turnover_change %}({{ br.turnover_change }}){% endif %}
31
+ {% endif -%}
32
+ {%- endif %}
33
+
34
+ {% if index_structure -%}
35
+ ## 2. 指数结构
36
+
37
+ {% if index_structure.large_vs_small %}- **大小盘分化:** {{ index_structure.large_vs_small }}
38
+ {% endif %}{% if index_structure.blue_chip_vs_theme %}- **权重 vs 题材:** {{ index_structure.blue_chip_vs_theme }}
39
+ {% endif %}{% if index_structure.position_assessment %}- **指数位置:** {{ index_structure.position_assessment }}
40
+ {% endif %}
41
+ {%- endif %}
42
+
43
+ {% if sectors -%}
44
+ ## 3. 板块主线
45
+
46
+ {% if sectors.leading -%}
47
+ **领涨板块:**
48
+ {% for s in sectors.leading %}- 🟢 {{ s.name }} {{ m.change_pct(s.change_pct) }}{% if s.logic %} — {{ s.logic }}{% endif %}
49
+ {% endfor %}
50
+ {%- endif %}
51
+
52
+ {% if sectors.lagging -%}
53
+ **领跌板块:**
54
+ {% for s in sectors.lagging %}- 🔴 {{ s.name }} {{ m.change_pct(s.change_pct) }}{% if s.reason %} — {{ s.reason }}{% endif %}
55
+ {% endfor %}
56
+ {%- endif %}
57
+
58
+ {% if sectors.main_storylines -%}
59
+ **主线判断:**
60
+ {% for line in sectors.main_storylines %}- **{{ line.theme }}** | 阶段:{{ line.stage or '-' }}{% if line.sustainability %} | 持续性:{{ line.sustainability }}{% endif %}
61
+ {% endfor %}
62
+ {%- endif %}
63
+ {%- endif %}
64
+
65
+ {% if capital_emotion -%}
66
+ ## 4. 资金与情绪
67
+
68
+ {% if capital_emotion.turnover_level %}- **成交分位:** {{ capital_emotion.turnover_level }}
69
+ {% endif %}{% if capital_emotion.limit_ratio %}- **涨跌停比:** {{ capital_emotion.limit_ratio }}
70
+ {% endif %}{% if capital_emotion.money_effect %}- **赚钱效应:** {{ capital_emotion.money_effect }}
71
+ {% endif %}{% if capital_emotion.consecutive_limit_height is not none %}- **连板高度:** {{ capital_emotion.consecutive_limit_height }} 板
72
+ {% endif %}
73
+ {%- endif %}
74
+
75
+ {% if catalysts -%}
76
+ ## 5. 消息催化
77
+
78
+ {% for c in catalysts %}- {{ m.direction_emoji(c.direction) }} **[{{ c.category or '-' }}] {{ c.title }}**{% if c.impact %} — {{ c.impact }}{% endif %}
79
+ {% endfor %}
80
+ {%- endif %}
81
+
82
+ {% if tomorrow_strategy -%}
83
+ ## 6. 明日策略
84
+
85
+ {% set ts = tomorrow_strategy -%}
86
+ - **策略姿态:** {{ m.stance_label(ts.stance) }}
87
+ {% if ts.position_advice %}- **建议仓位:** {{ ts.position_advice }}
88
+ {% endif %}{% if ts.focus_sectors %}- **关注方向:** {{ ts.focus_sectors | join('、') }}
89
+ {% endif %}{% if ts.avoid %}- **规避方向:** {{ ts.avoid | join('、') }}
90
+ {% endif %}{% if ts.key_levels and (ts.key_levels.support or ts.key_levels.resistance) -%}
91
+ - **关键点位:** 支撑 {{ ts.key_levels.support or '-' }} | 压力 {{ ts.key_levels.resistance or '-' }}
92
+ {%- endif %}
93
+ {%- endif %}
94
+
95
+ {% if risks -%}
96
+ ## 7. 风险提示
97
+
98
+ {% for r in risks %}- {{ m.risk_emoji(r.level) }} **[{{ r.category or '风险' }}]** {{ r.description }}
99
+ {% endfor %}
100
+ {%- endif %}
101
+
102
+ ---
103
+ *本报告由 stock-analysis-plugin 渲染,仅供参考,不构成投资建议。*
@@ -0,0 +1,28 @@
1
+ {%- import '_macros.j2' as m -%}
2
+ {{ m.decision_emoji(decision_type) }} **{{ stock_name }}({{ stock_code }})** | {{ m.decision_label(decision_type) }} · 评分 {{ sentiment_score }} · 置信 {{ m.confidence_label(confidence) }}
3
+
4
+ {% if core_conclusion and core_conclusion.one_sentence -%}
5
+ > {{ core_conclusion.one_sentence }}
6
+ {%- endif %}
7
+ {% if risk_screening and risk_screening.veto_buy %}
8
+ ⚠️ **一票否决** — 风险筛查触发,建议谨慎。
9
+ {% endif %}
10
+
11
+ {% set dp = data_perspective or {} -%}
12
+ {% set pp = dp.price_position or {} -%}
13
+ {% set ts = dp.trend_status or {} -%}
14
+ - 📈 **趋势:** {{ ts.ma_alignment or '-' }}{% if ts.is_bullish is not none %}({{ '看多' if ts.is_bullish else '看空' }}){% endif %}
15
+ - 💰 **价位:** 现价 {{ m.fmt_num(pp.current_price) }} | 支撑 {{ m.fmt_num(pp.support_level) }} | 压力 {{ m.fmt_num(pp.resistance_level) }}
16
+
17
+ {% set bp = battle_plan or {} -%}
18
+ {% if bp -%}
19
+ - 🎯 **作战:** 买点 {{ m.fmt_num(bp.ideal_buy) }} | 止损 {{ m.fmt_num(bp.stop_loss) }} | 止盈 {{ m.fmt_num(bp.take_profit) }} | 仓位 {{ bp.suggested_position or '-' }}
20
+ {%- endif %}
21
+
22
+ {% set intel = intelligence or {} -%}
23
+ {% if intel.positive_catalysts -%}
24
+ ✅ **利好:** {{ intel.positive_catalysts | join(';') }}
25
+ {% endif %}
26
+ {% if intel.risk_alerts -%}
27
+ ⚠️ **风险:** {{ intel.risk_alerts | join(';') }}
28
+ {% endif %}
@@ -0,0 +1,108 @@
1
+ {%- import '_macros.j2' as m -%}
2
+ # {{ stock_name }}({{ stock_code }})分析报告
3
+
4
+ **分析日期:** {{ analysis_date }} | **决策:** {{ m.decision_emoji(decision_type) }} {{ m.decision_label(decision_type) }} | **情绪分:** {{ sentiment_score }}/100 | **置信度:** {{ m.confidence_label(confidence) }}
5
+
6
+ {% if core_conclusion -%}
7
+ > **核心结论:** {{ core_conclusion.one_sentence }}
8
+ {% if core_conclusion.signal_type %}> **信号类型:** {{ core_conclusion.signal_type }}{% if core_conclusion.time_sensitivity %} | **时效:** {{ core_conclusion.time_sensitivity }}{% endif %}{% endif %}
9
+ {%- endif %}
10
+
11
+ {% if risk_screening and risk_screening.veto_buy %}
12
+ > ⚠️ **一票否决(veto_buy):** 风险筛查触发否决条件,建议谨慎。
13
+ {% endif %}
14
+
15
+ ## 市场环境
16
+
17
+ {% if market_environment -%}
18
+ - **市场阶段:** {{ market_environment.regime_cn or market_environment.regime or '-' }}{% if market_environment.confidence is not none %}(置信度 {{ m.fmt_num(market_environment.confidence) }}){% endif %}
19
+ {% if market_environment.recommended_skills -%}
20
+ - **推荐策略:** {{ market_environment.recommended_skills | join('、') }}
21
+ {%- endif %}
22
+ {%- else -%}
23
+ - 数据缺失
24
+ {%- endif %}
25
+
26
+ ## 风险筛查
27
+
28
+ {% if risk_screening -%}
29
+ - **风险等级:** {{ m.risk_emoji(risk_screening.risk_level) }} {{ risk_screening.risk_level or '-' }} | **风险分:** {{ risk_screening.risk_score }}/100
30
+ {% if risk_screening.flags -%}
31
+ - **风险标记:**
32
+ {% for f in risk_screening.flags %} - [{{ f.severity }}] {{ f.category }}:{{ f.description }}
33
+ {% endfor %}
34
+ {%- else -%}
35
+ - **风险标记:** 无显著风险标记
36
+ {%- endif %}
37
+ {%- else -%}
38
+ - 数据缺失
39
+ {%- endif %}
40
+
41
+ ## 技术分析
42
+
43
+ {% set dp = data_perspective or {} -%}
44
+ {% set ts = dp.trend_status or {} -%}
45
+ {% set pp = dp.price_position or {} -%}
46
+ {% set vol = dp.volume_analysis or {} -%}
47
+ {% set chip = dp.chip_structure or {} -%}
48
+ - **趋势:** {{ ts.ma_alignment or '-' }}{% if ts.is_bullish is not none %}({{ '看多' if ts.is_bullish else '看空' }}){% endif %}{% if ts.trend_score is not none %} 趋势分 {{ m.fmt_num(ts.trend_score) }}{% endif %}
49
+ - **价格结构:** 现价 {{ m.fmt_num(pp.current_price) }} | 偏离 MA5 {{ m.change_pct(pp.bias_ma5) }} | 支撑 {{ m.fmt_num(pp.support_level) }} | 压力 {{ m.fmt_num(pp.resistance_level) }}
50
+ - **量价:** 量比 {{ m.fmt_num(vol.volume_ratio) }}{% if vol.volume_status %}({{ vol.volume_status }}){% endif %}{% if vol.turnover_rate is not none %} | 换手率 {{ m.change_pct(vol.turnover_rate) }}{% endif %}
51
+ {% if chip and (chip.profit_ratio is not none or chip.avg_cost is not none) -%}
52
+ - **筹码:** 获利盘 {{ m.change_pct(chip.profit_ratio) }} | 平均成本 {{ m.fmt_num(chip.avg_cost) }}{% if chip.concentration is not none %} | 集中度 {{ m.fmt_num(chip.concentration) }}{% endif %}
53
+ {%- endif %}
54
+
55
+ ## 消息面
56
+
57
+ {% set intel = intelligence or {} -%}
58
+ {% if intel.latest_news -%}
59
+ - **最新动态:** {{ intel.latest_news }}
60
+ {%- endif %}
61
+ {% if intel.sentiment_summary -%}
62
+ - **舆情摘要:** {{ intel.sentiment_summary }}
63
+ {%- endif %}
64
+ {% if intel.positive_catalysts -%}
65
+ - **利好催化:**
66
+ {% for c in intel.positive_catalysts %} - ✅ {{ c }}
67
+ {% endfor %}
68
+ {%- endif %}
69
+ {% if intel.risk_alerts -%}
70
+ - **风险提示:**
71
+ {% for a in intel.risk_alerts %} - ⚠️ {{ a }}
72
+ {% endfor %}
73
+ {%- endif %}
74
+
75
+ ## 作战计划
76
+
77
+ {% set bp = battle_plan or {} -%}
78
+ {% if bp -%}
79
+ - **理想买点:** {{ m.fmt_num(bp.ideal_buy) }} | **次级买点:** {{ m.fmt_num(bp.secondary_buy) }}
80
+ - **止损:** {{ m.fmt_num(bp.stop_loss) }} | **止盈:** {{ m.fmt_num(bp.take_profit) }}
81
+ - **建议仓位:** {{ bp.suggested_position or '-' }}
82
+ {% if bp.entry_plan %}- **进场计划:** {{ bp.entry_plan }}
83
+ {% endif %}{% if bp.risk_control %}- **风控要点:** {{ bp.risk_control }}
84
+ {% endif %}{% if bp.action_checklist -%}
85
+ - **操作清单:**
86
+ {% for item in bp.action_checklist %} - [ ] {{ item }}
87
+ {% endfor %}
88
+ {%- endif %}
89
+ {%- else -%}
90
+ - 暂无作战计划
91
+ {%- endif %}
92
+
93
+ {% if core_conclusion and core_conclusion.position_advice -%}
94
+ ## 仓位建议
95
+
96
+ - **空仓者:** {{ core_conclusion.position_advice.no_position or '-' }}
97
+ - **持仓者:** {{ core_conclusion.position_advice.has_position or '-' }}
98
+ {%- endif %}
99
+
100
+ {% if risk_warning -%}
101
+ ## 风险提示
102
+
103
+ {% for w in risk_warning %}- {{ w }}
104
+ {% endfor %}
105
+ {%- endif %}
106
+
107
+ ---
108
+ *本报告由 stock-analysis-plugin 渲染,仅供参考,不构成投资建议。*
File without changes