MoFin 初始提交

完整数据采集+分析管道:
- market_watch.py:90行业板块采集(同花顺/东方财富)
- 市场精选推荐 cron:全市场分析+候选池+星级推荐
- price_monitor.py:持仓/自选高频价格监控
- refresh_mtf_cache.py:多周期K线缓存
- 策略评估/知识萃取管道

文档:docs/ 含完整需求+架构设计
注意:尚未配置 git remote,笑笑接手后自行配置
This commit is contained in:
知微 (MoFin)
2026-06-20 12:04:21 +08:00
commit aa0f740381
950 changed files with 189006 additions and 0 deletions
@@ -0,0 +1,12 @@
{
"title": "Cron Job: 区间维护",
"type": "未知",
"created_at": "2026-06-03T18:55:56.050113",
"summary": "**Job ID:** d763b2aab864\n**Run Time:** 2026-06-03 18:09:15\n**Schedule:** every 30m\n[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to",
"content": "# Cron Job: 区间维护\n\n**Job ID:** d763b2aab864\n**Run Time:** 2026-06-03 18:09:15\n**Schedule:** every 30m\n\n## Prompt\n\n[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user — do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly \"[SILENT]\" (nothing else) to suppress delivery. Never combine [SILENT] with content — either report your findings normally, or say [SILENT] and nothing more.]\n\n【区间维护】每30分钟自动检查并维护买入区\n\n时段:8:00-22:00,否则SILENT\n\n第一步:读 ~/.hermes/zone_breach.json\n 没有action=reassess的条目 → SILENT(零输出,不发消息)\n\n第二步:对每只action=reassess的股票,执行以下流程\n\n2a. 偏离>10%(明显老数据):\n - web_search 查找该股近期走势和研报\n - 根据当前价位重新计算合理买入区\n - 如果是watchlist里的自选股:直接更新 /home/hmo/web-dashboard/data/watchlist.json 的 buy_low/buy_high\n - 如果是decisions里的active策略:直接更新 /home/hmo/web-dashboard/data/decisions.json 的对应trigger区间\n - 重置zone_breach.json中该股的breach_count=0, action=maintain\n\n2b. 偏离3~10%(临界):\n - 拉实时价\n - 只生成调整建议,不执行修改\n - 不清除breach标记,等用户确认后再改\n\n第三步:推送XMPP\n 用 docker exec ejabberd ejabberdctl send_message chat zhiwei@yoin.fun mohe@yoin.fun \"\" \"...\" \n 推送格式(多条合并成一条):\n 【区间维护】时间\n ✅ 已自动调整:股票名(代码) 旧区间→新区间(理由)\n 💡 建议调整:股票名(代码) 建议XX~XX(理由)\n \n 无调整也SILENT\n\n第四步:如果是A股非交易时段(15:00-次日9:30),只分析不推送\n\n## Response\n\n## 分析结果\n\n**时间:** 2026-06-03 18:08 CSTA股非交易时段 15:00-09:30\n\n**检查 zone_breach.json**1 只股票 action=reassess\n\n---\n\n### 📊 300548 博创科技(长芯博创)\n\n| 项目 | 旧数据 | 实际实时价 |\n|------|--------|-----------|\n| 当前价 | 224.27(过期) | **244.90** |\n| 原买入区 | 230~235 | 230~235 |\n| 偏离 | -3.5%(偏低) | **+5.3%**(偏高) |\n| 状态 | 价格低于区间 | 价格已远超区间 |\n\n**关键发现:** 旧数据 224.27 明显过期。今日该股大幅上涨+4.39%,收 **244.90**,比原买入区高 4.2%~6.4%——情况已从\"低于区间\"逆转成\"高于区间\"。\n\n**归属:** watchlist 自选股(不在 decisions 决策库中)\n\n### 💡 调整建议(2b临界,仅建议不执行)\n\n基于当前价 244.90,参照其他已调区间(区间上沿 ≈ 当前价 1~3%):\n\n> **建议新区间:238~245**\n> - 238 ≈ 当前价 -2.8%(买入下沿)\n> - 245 ≈ 当前价 +0.04%(买入上沿)\n> - 原 230~235 已完全失效——今日最低 238.01 都未触及原区间\n\n不执行修改,不清除 breach 标记,等待用户确认。\n",
"stocks_mentioned": [
"300548"
],
"structured": null,
"_id": "cron_d763b2aab864_2026-06-03_18-09-15"
}