feat: 事项四健康监控注册——health_monitor_daily每日跑v_weak+v_oversold健康检查(实盘浮盈vs回测基线5y偏差写strategy_health+告警)+cron 16:45, 修无实盘时health=50误报偏低告警
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user