Files
MoFin/deploy/profile-scripts/watchlist_12d_backfill.py
T
hmo a40b97f5ca feat(analysis): systematic daily 12-dim LLM analysis for holdings+watchlist
Gap (reported by user via zhiwei): premarket full review updated technical
params but full_analysis (12-dim LLM matrix) was empty for new holdings
and stale for old ones — batch_reassess existed but was never wired into
the daily pipeline and only covered watchlist.

System fix:
- premarket_full_review.py: new Step 1.5 runs batch_reassess --type
  holding --today every trading day 08:10 (force-refresh today's analysis,
  timeout 3600s, result in summary.json)
- batch_reassess.py:
  - coverage: --type holding|watchlist|all (was watchlist-only)
  - staleness: analysis >20h stale gets refreshed (was: skip if any
    analysis exists = forever stale)
  - --today flag: force re-analyze if not reassessed since 04:00 today
  - cash/total read live from portfolio_summary (was hardcoded 321271/
    952879 from weeks ago)
  - HK stock prefix fix (5-digit codes -> hk, was sending sz00700)
- watchlist_12d_backfill.py: wrapper for hermes cron (no args support)
- cron job '批量补全九维分析-一次性' -> '自选12维分析补全-每日午间'
  (daily 12:30 weekdays, covers 109 watchlist stocks missing analysis)

Verified: 300308 got 1920-char 12-dim analysis written to DB at 08:41,
signal=观望, stop/take-profit updated.
2026-07-20 08:48:08 +08:00

13 lines
460 B
Python

#!/usr/bin/env python3
"""watchlist_12d_backfill.py — 自选12维LLM分析补全(每日午间)
包装 batch_reassess.py --type watchlist,供 hermes cron 调度(不支持参数)。
调度:交易日 12:30(午间低峰,自选补全约80分钟)
"""
import subprocess, sys
r = subprocess.run(
[sys.executable, "/home/hmo/MoFin/deploy/profile-scripts/batch_reassess.py",
"--type", "watchlist"],
timeout=7200)
sys.exit(r.returncode)