第4条CRITICAL红线:GATE_9D_ANALYSIS
质量门禁新增9维交叉验证检查: - sector_context不空且非neutral - signal_factors≥1个因子 或 tech_snapshot含技术位 不通过→标记review_needed不写入DB 防止模塑科技式空壳策略(无止盈/无行业上下文/无分析过程)
This commit is contained in:
@@ -89,6 +89,23 @@ STRATEGY_QUALITY_GATES = [
|
||||
"severity": "HIGH",
|
||||
"fix": "设置 d['currency']='HKD'"
|
||||
},
|
||||
# --- 第4条 CRITICAL 红线:9维交叉验证 (2026-07-02 Dad要求) ---
|
||||
# 策略不能只有价格数字,必须有证据经过了多维分析:
|
||||
# 横切面: 大盘+行业+个股 | 纵切面: 基本面+消息面+技术面+资金流
|
||||
# 代码层面可验证: sector_context(行业) + signal_factors(多因子) 或 tech_snapshot
|
||||
{
|
||||
"id": "GATE_9D_ANALYSIS",
|
||||
"desc": "策略必须经过多维分析(sector_context + signal_factors)",
|
||||
"check": lambda d: (
|
||||
bool(d.get("sector_context") and str(d.get("sector_context","")).strip() not in ("neutral","","N/A","-"))
|
||||
and (
|
||||
bool(d.get("signal_factors") and isinstance(d.get("signal_factors"), (list,tuple)) and len(d["signal_factors"]) >= 1)
|
||||
or bool(d.get("tech_snapshot") and any(c in str(d.get("tech_snapshot","")) for c in "支撑阻力压强"))
|
||||
)
|
||||
),
|
||||
"severity": "CRITICAL",
|
||||
"fix": "重新运行 reassess_with_context() 完整重评确保 sector_context/signal_factors/tech_snapshot 均已填充"
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user