feat: RR阈值2.0→1.0(保底) + 存档RR分析结论

数据支撑: 123049笔回测 Pearson r=0.05, 分策略/分年规律相反, RR是风控非质量指标
This commit is contained in:
xxm
2026-08-17 18:51:28 +08:00
parent 9d12b7b0d5
commit c9a0cc9183
3 changed files with 95 additions and 5 deletions
+3 -3
View File
@@ -120,8 +120,8 @@ def main():
processed += 1
continue
# 超跌类策略豁免 RR 门槛(超跌反弹 RR 天然 <2,用策略自带参数即可,同 p_oversold 先例)
if _rr < 2.0 and cand_sector not in ("p_oversold", "b_td1_v3", "b_td1"):
print(f"{code} {name} RR={_rr:.2f}<2.0,不入自选")
if _rr < 1.0 and cand_sector not in ("p_oversold", "b_td1_v3", "b_td1"):
print(f"{code} {name} RR={_rr:.2f}<1.0(保底门槛),不入自选")
processed += 1
continue
# 用候选自带参数(不再重锚定)
@@ -164,7 +164,7 @@ def main():
WHERE status='active' AND decision_type='自选策略'
AND code != ?
ORDER BY COALESCE(rr_ratio,0) ASC, updated_at ASC LIMIT 1""", (code,)).fetchone()
if weakest and (weakest[2] or 0) < 2.0:
if weakest and (weakest[2] or 0) < 1.0:
conn.execute(
"INSERT INTO watchlist_log (code, name, event, reason, old_signal, new_signal, price) "
"VALUES (?,?,?,?,?,?,?)",
@@ -77,8 +77,8 @@ def main(dry_run=False):
_rr = conn.execute(
"SELECT rr_ratio FROM holding_strategies WHERE code=? AND status='active'",
(code,)).fetchone()
if _rr and _rr[0] is not None and 0 < _rr[0] < 2.0:
reasons.append(f"RR={_rr[0]}<2.0")
if _rr and _rr[0] is not None and 0 < _rr[0] < 1.0:
reasons.append(f"RR={_rr[0]}<1.0(保底)")
except Exception:
pass