fix: _missing_active激活策略description也fallback到name/summary——激活但策略库无记录的策略(s2_panic等)说明列不再空
This commit is contained in:
@@ -661,6 +661,14 @@ def api_research_strategies():
|
||||
continue
|
||||
_entry = dict(_s10)
|
||||
_entry['description'] = STRATEGY_DESCRIPTIONS.get(_mv, {})
|
||||
# 2026-08-15:激活但策略库无记录的策略,description fallback 到 name/summary(说明列不再空)
|
||||
if not _entry['description'] and (_entry.get('name') or _entry.get('summary')):
|
||||
_entry['description'] = {
|
||||
'title': _entry.get('name') or _mv,
|
||||
'algorithm': _entry.get('summary') or '',
|
||||
'rationale': _entry.get('hypothesis') or '',
|
||||
'evidence': '',
|
||||
}
|
||||
_entry['regime_winrates'] = _regime_winrates.get(_mv, {})
|
||||
_entry['current'] = True
|
||||
_entry['note'] = f"({pt or '当前周期'}无回测记录,显示10y数据)"
|
||||
|
||||
Reference in New Issue
Block a user