feat: 事项四健康监控注册——health_monitor_daily每日跑v_weak+v_oversold健康检查(实盘浮盈vs回测基线5y偏差写strategy_health+告警)+cron 16:45, 修无实盘时health=50误报偏低告警

This commit is contained in:
hmo
2026-08-12 21:59:34 +08:00
parent 52ed188fa9
commit c99813a53a
2 changed files with 68 additions and 5 deletions
+6 -5
View File
@@ -106,12 +106,13 @@ def run_health_check(strategy_version=None):
live_ret, baseline['win_rate'], baseline['avg_profit_pct'], deviation, health))
conn.commit()
# 报警判断
# 报警判断2026-08-12 修:无实盘交易时不告警——health=50 是中性"无数据",非"偏低"
alert = None
if health < 40:
alert = f"🔴 策略健康度严重下降: {health}分 (偏差{deviation}pp)"
elif health < 60:
alert = f"🟡 策略健康度偏低: {health}分 (偏差{deviation}pp)"
if live:
if health < 40:
alert = f"🔴 策略健康度严重下降: {health}分 (偏差{deviation}pp)"
elif health < 60:
alert = f"🟡 策略健康度偏低: {health}分 (偏差{deviation}pp)"
result = {
'version': version,