feat: 研究Tab当前温区激活区块按温区分组——当前温区排最前高亮,组内按该温区胜率降序,每策略一行(该温区数据),API返回regime_state

This commit is contained in:
xxm
2026-08-15 13:43:05 +08:00
parent 37364086b7
commit d20fa4b678
2 changed files with 67 additions and 3 deletions
+2 -1
View File
@@ -736,7 +736,8 @@ def api_research_strategies():
_entry['state_reason'] = '当前温区路由激活'
_entry['note'] = f"({pt or '当前周期'}无回测记录,显示10y数据)"
strats.append(_entry)
return jsonify({'strategies': strats, 'regime_active': sorted(_active_set)})
return jsonify({'strategies': strats, 'regime_active': sorted(_active_set),
'regime_state': _weights.get('state', 'unknown')})
except Exception as e:
return jsonify({'error': str(e)}), 500