Files
MoFin/_cron_report.py
知微 7b4826777a 自选股自动重评机制+000850华茂股份全面重评
1. stale_detector新增自选股买入区偏离自动重评:
   - 每轮扫描watchlist_stocks, price偏离买入区中心>15%自动触发per_stock_reassess
   - 之前只标记[STRATEGY_STALE]不输出,改为标记+触发重评两步完成
   - 策略完毕直接输出结果,不再等下次cron通知

2. 000850华茂股份全面重评:
   - 核心价值:纺织是壳,金融股权投资才是核心(国泰海通/广发/徽商银行)
   - PB=0.78破净, 7月3日分红3675万占年净利17.85%
   - 7/16临时股东会催化剂
   - 结论:3.70~3.90区间可建仓1~2%,止损3.50,止盈4.30
   - 修复:之前说'观望不建仓'是错的,低估了破净安全垫

3. watchlist_stocks DB加000850记录
2026-07-07 11:20:04 +08:00

58 lines
1.6 KiB
Python

#!/usr/bin/env python3
import sys; sys.path.insert(0, '/home/hmo/MoFin')
from mo_data import *
pf = read_portfolio()
ta = pf.get('total_assets',0)
ca = pf.get('cash',0)
pp = pf.get('position_pct',0)
print(f'TA:{ta:.0f} CASH:{ca:.0f} POS:{pp:.1f}%')
for h in pf.get('holdings', []):
c = h.get('currency','CNY')
p = h.get('price')
pos = h.get('position_pct')
if pos is None:
pos = 0
if p is None:
print(f' {h["code"]} {h["name"]} 价? 仓{pos:.1f}%')
continue
tag = ' HKD' if c == 'HKD' else ''
print(f' {h["code"]} {h["name"]}{p:.2f}{tag}{pos:.1f}%')
wl = read_watchlist()
if wl and 'stocks' in wl:
for s in wl['stocks']:
nm = s.get('name','')
p = s.get('price')
if p is None:
print(f' WATCH {s["code"]} {nm} 价?')
else:
print(f' WATCH {s["code"]} {nm}{p:.2f}')
# sector data
import json, sqlite3, os
db = os.path.join('/home/hmo/MoFin', 'data', 'mofin.db')
conn = sqlite3.connect(db)
c = conn.cursor()
try:
c.execute("SELECT id, market_trend, data FROM sector_snapshots ORDER BY id DESC LIMIT 1")
row = c.fetchone()
if row:
print(f' TREND:{row[1]}')
d = json.loads(row[2]) if isinstance(row[2], str) else row[2]
if d:
for k,v in list(d.items())[:5]:
print(f' {k}: {v}')
except Exception as e:
print(f' DB err:{e}')
conn.close()
# decisions
dec = read_decisions()
if isinstance(dec, dict):
ds = dec.get('decisions',[])
print(f' DECISIONS:{len(ds)}')
for d in ds[:5]:
print(f' {d}')