2026-04-28 变更记录


摘要


1. 后端核心更新: 纸面交易器(WeatherPaperTrader)新增状态持久化,支持进程重启后恢复持仓和交易记录;weather_mm_runner.py 在每个轮询周期结束自动保存状态。

2. LLM 配置迁移: 从 high-five 代理切换回 DeepSeek 官方 API,模型降级为 deepseek-v4-pro(去掉了 -max 后缀)。

3. 风险参数大幅放宽: 单合约上限从 $10 → 500 share,总敞口从 $50 → 2000 share,方向敞口同样放宽至 500 share。

4. 前端大幅增强: 智能定价(跳过自有订单、挂在盘口前一档)、单笔 $5 上限、一键 Redeem/清理、盘口深度面板标记自有挂单并实时更新价格。

5. HKO 预测算法改进: 内陆站外推信号分时段权重(早/中/下午不同策略),爆发升温检测(多窗口 burst detection),内陆校准轨迹推算。

6. MM Weather 持仓结算分析增强: /mm/weather 底部 settlement-card 从单表格升级为完整面板——新增持仓汇总(总投入/已实现PnL/总PnL/期望PnL/盈利概率/最好/最坏情况)、持仓明细表(方向×温度×份额×均价×成本×现值×浮盈)、按结算温度收益分析表+Plotly 柱状图。API 同源 /api/weather/hk/positions

7. 编码规范: SOUL.md 新增 Coding Discipline 章节——每次修改代码必须自验证。


Bug Fix

  • 修复 progress_prediction 在峰值已过场景下覆盖 LLM 真实峰值判断的问题,增加 peak_passed 时以实测最大值为硬上限的逻辑。
  • 修复 mm_weather.htmldata.holdingsdata.positions 字段名不匹配导致 settlement-card 始终 display:none 的 bug。

  • 数据刷新链路


    层级频率说明
    前端轮询10 秒setInterval(refreshActiveCards, 10000)/api/mm/weather/status
    状态文件60 秒weather_mm_runner.py --interval 60 读预测→报价→写 state
    概率重算事件驱动/api/weather/hk/recalc?temp=X 新高温→立即归零+重分配
    完整预测按需/api/weather/hk/llm-predict 触发 hko_predict.py

    验证方法

  • curl -s http://localhost:8899/mm/weather \| grep -c 's_pos_holdings' 应返回 ≥2
  • curl -s http://localhost:8899/api/weather/hk/positions \| python3 -c "..." 应返回有效数据
  • 浏览器打开 /mm/weather,滚动到底部,确认持仓结算分析板块完整显示

  • 变更文件

    PEAK_PREDICTION_UPDATES.md | 34 +

    config/llm_config.json | 14 +-

    docs/daily/2026-04-27.md | 9 +

    docs/peak-prediction-updates.md | 168 +

    logs/dashboard.log | 768 +

    logs/expiry_check.log | 32078 ++++++++++++++++++++++++++++++++++++

    logs/monitor.log | 23369 ++++++++++++++++++++++++++

    scripts/auto_push.sh | 50 +-

    scripts/hko_predict.py | 262 +-

    src/mm/weather_mm_runner.py | 32 +

    src/mm/weather_risk.py | 6 +-

    src/mm/weather_signal.py | 2 +-

    src/web/app.py | 514 +-

    src/web/templates/docs.html | 31 +-

    src/web/templates/mm_weather.html | 661 +-

    15 files changed, 57754 insertions(+), 244 deletions(-)