Skip to content

Commit bc966f0

Browse files
committed
Add strategy plugin alert guidance copy
1 parent 86a9297 commit bc966f0

3 files changed

Lines changed: 28 additions & 10 deletions

File tree

notifications/telegram.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,33 @@
3737
"quantity_shares": "{quantity}股",
3838
"signal_label": "信号",
3939
"strategy_plugin_line": "🧩 插件:{plugin} | 状态:{route} | 提醒:{action}",
40-
"strategy_plugin_alert_subject": "🚨 危机插件告警:{plugin} | {route}",
41-
"strategy_plugin_alert_title": "🚨 【危机插件告警】",
40+
"strategy_plugin_alert_subject": "🚨 策略插件告警:{plugin} | {route}",
41+
"strategy_plugin_alert_title": "🚨 【策略插件告警】",
4242
"strategy_plugin_alert_context": "运行环境:{context}",
4343
"strategy_plugin_alert_strategy": "策略:{strategy}",
4444
"strategy_plugin_alert_plugin": "插件:{plugin}",
4545
"strategy_plugin_alert_status": "状态:{route}",
4646
"strategy_plugin_alert_action": "人工处理建议:{action}",
4747
"strategy_plugin_alert_mode": "模式:{mode}",
4848
"strategy_plugin_alert_as_of": "信号时间:{as_of}",
49+
"strategy_plugin_alert_guidance": "处置建议:{guidance}",
50+
"strategy_plugin_alert_scope_note": "执行范围:{scope_note}",
51+
"strategy_plugin_alert_scope": "仅作人工复核提醒;插件不会自动下单或改仓位",
4952
"strategy_plugin_name_crisis_response_shadow": "危机观察通知",
53+
"strategy_plugin_name_taco_rebound_shadow": "TACO 抄底观察通知",
5054
"strategy_plugin_mode_shadow": "影子观察",
51-
"strategy_plugin_route_no_action": "未触发危机",
55+
"strategy_plugin_route_no_action": "未触发",
5256
"strategy_plugin_route_true_crisis": "真危机",
57+
"strategy_plugin_route_taco_rebound": "TACO 反弹确认",
5358
"strategy_plugin_route_unknown_route": "未知状态",
5459
"strategy_plugin_action_no_action": "不操作",
5560
"strategy_plugin_action_watch_only": "仅通知",
61+
"strategy_plugin_action_notify_manual_review": "通知人工复核",
5662
"strategy_plugin_action_defend": "防守",
5763
"strategy_plugin_action_blocked": "已阻断",
64+
"strategy_plugin_guidance_crisis_response_shadow_true_crisis_defend": "优先考虑降低杠杆或清理杠杆仓位,暂停加仓;如需保留风险敞口,先降到可承受的小仓位。",
65+
"strategy_plugin_guidance_crisis_response_shadow_no_action_blocked": "危机路线被风控阻断;先核对数据新鲜度和外部情境,不建议仅凭此条加仓。",
66+
"strategy_plugin_guidance_taco_rebound_shadow_taco_rebound_notify_manual_review": "TACO 仅提示可能的反弹窗口;可考虑小仓位、分批、预设止损/失效条件的人工博弈,不建议一次性满仓。",
5867
"strategy_plugin_action_monitor": "持续观察",
5968
"strategy_plugin_action_unknown_action": "未知提醒",
6069
"separator": SEPARATOR,
@@ -140,24 +149,33 @@
140149
"quantity_shares": "{quantity} shares",
141150
"signal_label": "Signal",
142151
"strategy_plugin_line": "🧩 Plugin: {plugin} | status: {route} | notice: {action}",
143-
"strategy_plugin_alert_subject": "🚨 Crisis plugin alert: {plugin} | {route}",
144-
"strategy_plugin_alert_title": "🚨 【Crisis Plugin Alert】",
152+
"strategy_plugin_alert_subject": "🚨 Strategy plugin alert: {plugin} | {route}",
153+
"strategy_plugin_alert_title": "🚨 【Strategy Plugin Alert】",
145154
"strategy_plugin_alert_context": "Context: {context}",
146155
"strategy_plugin_alert_strategy": "Strategy: {strategy}",
147156
"strategy_plugin_alert_plugin": "Plugin: {plugin}",
148157
"strategy_plugin_alert_status": "Status: {route}",
149158
"strategy_plugin_alert_action": "Notice: {action}",
150159
"strategy_plugin_alert_mode": "Mode: {mode}",
151160
"strategy_plugin_alert_as_of": "Signal as-of: {as_of}",
161+
"strategy_plugin_alert_guidance": "Manual guidance: {guidance}",
162+
"strategy_plugin_alert_scope_note": "Execution scope: {scope_note}",
163+
"strategy_plugin_alert_scope": "Manual review notice only; the plugin does not place orders or change allocations",
152164
"strategy_plugin_name_crisis_response_shadow": "Crisis Watch Notice",
165+
"strategy_plugin_name_taco_rebound_shadow": "TACO Rebound Watch Notice",
153166
"strategy_plugin_mode_shadow": "shadow",
154-
"strategy_plugin_route_no_action": "no crisis detected",
167+
"strategy_plugin_route_no_action": "no alert",
155168
"strategy_plugin_route_true_crisis": "true crisis",
169+
"strategy_plugin_route_taco_rebound": "TACO rebound confirmed",
156170
"strategy_plugin_route_unknown_route": "unknown status",
157171
"strategy_plugin_action_no_action": "no action",
158172
"strategy_plugin_action_watch_only": "notify only",
173+
"strategy_plugin_action_notify_manual_review": "notify manual review",
159174
"strategy_plugin_action_defend": "defend",
160175
"strategy_plugin_action_blocked": "blocked",
176+
"strategy_plugin_guidance_crisis_response_shadow_true_crisis_defend": "Consider reducing or clearing leveraged exposure, then pause new risk additions; if keeping exposure, resize it to a small amount you can tolerate.",
177+
"strategy_plugin_guidance_crisis_response_shadow_no_action_blocked": "A guard blocked the crisis route; verify data freshness and external context before acting on this alert.",
178+
"strategy_plugin_guidance_taco_rebound_shadow_taco_rebound_notify_manual_review": "TACO only flags a possible rebound window; consider a small staged manual probe with a predefined invalidation level instead of full-size exposure.",
161179
"strategy_plugin_action_monitor": "watch",
162180
"strategy_plugin_action_unknown_action": "unknown notice",
163181
"separator": SEPARATOR,

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ authors = [
1414
]
1515
dependencies = [
1616
"firstrade==0.0.38",
17-
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@b520bcaa216e36b94ce60c8c6a13f982de826830",
18-
"us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@6671946c3e5525bf14c19ab03e8b059e4aa0407b",
17+
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@f176f5d1f208724381278c253941cbc6d0a1c964",
18+
"us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@f206ae7a5f2772873c8e3907daa8d753f616348c",
1919
"google-cloud-storage",
2020
"requests",
2121
]

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
flask
22
gunicorn
33
firstrade==0.0.38
4-
quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@b520bcaa216e36b94ce60c8c6a13f982de826830
5-
us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@6671946c3e5525bf14c19ab03e8b059e4aa0407b
4+
quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@f176f5d1f208724381278c253941cbc6d0a1c964
5+
us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@f206ae7a5f2772873c8e3907daa8d753f616348c
66
google-cloud-storage
77
requests
88
pytest

0 commit comments

Comments
 (0)