Initial: MoFin 持仓分析与策略管理系统

核心模块:
- 策略生命周期管理 (strategy_lifecycle.py)
- 技术分析引擎 (technical_analysis.py)
- 双维度策略评估 (strategy_evaluator.py)
- 实时行情获取 (get_realtime_prices.py)
- Web Dashboard (server.py, :8899)

提示词版本管理:
- prompt_manager 模块 — 统一管理所有知微提示词
- 8个提示词共24个版本已录入
- 策略→提示词版本关联追踪
- Dashboard「提示词」Tab

数据源增强:
- 服务端 POST /api/update/realtime 端点已就绪
- clients/tdx-relay/ — 小小莫在Windows上开发的通达信中继
- 解决港股15分钟延迟问题
This commit is contained in:
2026-06-12 22:54:51 +08:00
commit 9b9c37002a
65 changed files with 8659 additions and 0 deletions
@@ -0,0 +1,12 @@
策略生成规则 v2.2(止损三级分离 + 移动止损)
| 场景 | 止损位置 | 逻辑 |
|------|---------|------|
| 新买入(cost=0) | 弱支撑(weak_support) | 入场失败小亏走人 |
| 已持仓(profit≥-20%) | 强支撑(strong_support) | 趋势坏了才走 |
| 深套(profit<-20%) | min(强支撑, 价×0.85) | 不轻易割 |
盈利>5%:取 max(弱支撑, 成本线, 现价×0.95) 移动止损
买入区 R/R 约束:新买入≥1.5,已持仓≥1.0
买入区宽度收紧:只围绕弱支撑,不扩展到弱压力