Skip to content

Commit 09c1d20

Browse files
committed
fix: stabilize actionable decisions
1 parent d6e4699 commit 09c1d20

9 files changed

Lines changed: 610 additions & 3 deletions

File tree

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
2525
- [测试] 补充设置项帮助元数据、API schema、前端弹窗交互测试,并修复 Bot 名称路由与调度时间 provider 测试的离线 CI 稳定性问题。
2626
- [修复] 港股日线跳过不支持港股的内置历史数据源,避免港股代码错配到非港股市场数据。
2727
- [修复] 修正分析 API 对北交所 `BJ` 前缀与 `.BJ` 后缀股票代码的校验,保持前端自动补全与 Tushare `ts_code` 调用格式一致。
28+
- [改进] 个股报告操作建议增加支撑/压力位与主力资金流校准,减少仅因单日涨跌导致买入/卖出剧烈切换,并补充“震荡观望、洗盘观察”等中性建议。
2829

2930
## [3.15.0] - 2026-05-05
3031

docs/full-guide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,10 @@ python main.py --debug
10081008

10091009
---
10101010

1011+
## 分析决策可操作性
1012+
1013+
个股报告的操作建议会结合支撑位、压力位、量能/筹码、主力资金流向和风险事件进行校准,避免仅因单日涨跌或评分跨线在“买入/卖出”之间剧烈切换。若价格处在支撑与压力之间且资金流不明确,报告会优先给出“持有、震荡观望、洗盘观察”等中性可执行建议;只有接近支撑确认、有效突破压力且量价/资金配合时才给出买入,跌破关键支撑或主力资金持续流出时才给出卖出/减仓。
1014+
10111015
## 回测功能
10121016

10131017
回测模块自动对历史 AI 分析记录进行事后验证,评估分析建议的准确性。

docs/full-guide_EN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,10 @@ You can tune the behavior in `.env`:
854854

855855
---
856856

857+
## Decision Actionability
858+
859+
Single-stock reports calibrate operation advice with support/resistance, volume/chip context, main-force capital flow, and risk events. This reduces direct buy/sell flips caused only by one-day price movement or score thresholds. When price is between support and resistance and capital flow is unclear, the report prefers neutral actionable wording such as hold, range-bound watch, or shakeout watch. Buy calls require support confirmation or a valid resistance breakout with volume/capital-flow confirmation; sell/reduce calls require support failure, sustained outflow, or clearly elevated risk.
860+
857861
## Backtesting
858862

859863
The backtesting module automatically validates historical AI analysis records against actual price movements, evaluating the accuracy of analysis recommendations.

src/agent/agents/decision_agent.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ def system_prompt(self, ctx: AgentContext) -> str:
8989
- 20-39: sell (negative trend + risk)
9090
- 0-19: sell (major risk + bearish)
9191
92+
## Actionability Guardrails
93+
- Do not flip directly between buy and sell only because one trading day moved up or down.
94+
- Base operation_advice on support/resistance, volume/chip context, main-force capital flow, and risk flags.
95+
- If price is between support and resistance and capital flow is not clearly one-sided, prefer a neutral action such as hold/watch/range-bound/shakeout watch; keep decision_type as hold.
96+
- Buy requires support confirmation or a valid resistance breakout with volume/capital-flow confirmation.
97+
- Sell requires support failure, sustained main-force outflow, or clearly elevated risk.
98+
9299
## Output Format
93100
Return a valid JSON object following the Decision Dashboard schema. The JSON \
94101
must include at minimum these top-level keys:

src/agent/executor.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@ class AgentResult:
178178
4. **检查清单可视化**:用 ✅⚠️❌ 明确显示每项检查结果
179179
5. **风险优先级**:舆情中的风险点要醒目标出
180180
181+
## 可操作性与稳定性约束
182+
183+
- 不得仅因为单日涨跌或评分跨线就在“买入/卖出”之间剧烈切换。
184+
- 操作建议必须同时参考价格位置(支撑/压力位)、量能/筹码、主力资金流向和风险事件。
185+
- 股价位于支撑与压力之间、资金流不明确时,优先输出“持有/震荡/观望/洗盘观察”等可执行的中性建议;`decision_type` 仍保持 `hold`。
186+
- 只有在接近支撑确认或有效突破压力,且资金流/量价配合时,才能给出买入;接近压力且资金流出时不得追买。
187+
- 只有在跌破关键支撑、主力资金持续流出或风险显著放大时,才能给出卖出/减仓。
188+
181189
{language_section}
182190
"""
183191

@@ -306,6 +314,14 @@ class AgentResult:
306314
4. **检查清单可视化**:用 ✅⚠️❌ 明确显示每项检查结果
307315
5. **风险优先级**:舆情中的风险点要醒目标出
308316
317+
## 可操作性与稳定性约束
318+
319+
- 不得仅因为单日涨跌或评分跨线就在“买入/卖出”之间剧烈切换。
320+
- 操作建议必须同时参考价格位置(支撑/压力位)、量能/筹码、主力资金流向和风险事件。
321+
- 股价位于支撑与压力之间、资金流不明确时,优先输出“持有/震荡/观望/洗盘观察”等可执行的中性建议;`decision_type` 仍保持 `hold`。
322+
- 只有在接近支撑确认或有效突破压力,且资金流/量价配合时,才能给出买入;接近压力且资金流出时不得追买。
323+
- 只有在跌破关键支撑、主力资金持续流出或风险显著放大时,才能给出卖出/减仓。
324+
309325
{language_section}
310326
"""
311327

0 commit comments

Comments
 (0)