feat: 温区行组合级列显示温区级组合数据——regime_winrates扩展读total_return/cagr/dd/capital/sharpe/pf,前端温区行显示温区级portfolio列
This commit is contained in:
@@ -563,6 +563,11 @@ def api_research_strategies():
|
||||
"cagr_pct": _r[7], "max_dd_pct": _r[8], "capital_final": _r[9],
|
||||
"positions_taken": _r[10], "sharpe_ratio": _r[11],
|
||||
"profit_factor": _r[12],
|
||||
# 2026-08-15 温区级组合级指标(温区行也要显示组合级列)
|
||||
"portfolio": {"cagr_pct": _r[7], "total_return_pct": _r[6],
|
||||
"portfolio_max_dd_pct": _r[8], "capital_final": _r[9],
|
||||
"positions_taken": _r[10], "sharpe_ratio": _r[11],
|
||||
"profit_factor": _r[12]},
|
||||
}
|
||||
_c.close()
|
||||
except Exception:
|
||||
|
||||
+6
-5
@@ -2442,13 +2442,14 @@ function renderStrategyTable(strategies) {
|
||||
const holdShow = rw && rw.avg_hold_days != null ? rw.avg_hold_days : (isOverall ? st.avg_hold_days : null);
|
||||
const sharpeShow = rw && rw.sharpe_ratio != null ? rw.sharpe_ratio : (isOverall ? st.sharpe_ratio : null);
|
||||
const pfShow = rw && rw.profit_factor != null ? rw.profit_factor : (isOverall ? st.profit_factor : null);
|
||||
// 组合级列(综合/普适/全参与/最终资产/年化/回撤):整体行显示,温区行显示"—"
|
||||
// 组合级列:整体行用整体组合;温区行用温区级组合(rw.portfolio,2026-08-15 温区级组合模拟数据)
|
||||
const rwPf = rw && rw.portfolio ? rw.portfolio : null;
|
||||
const compositeShow = isOverall ? s._composite : null;
|
||||
const universalityShow = isOverall ? (st.universality || {}).score : null;
|
||||
const retShow = isOverall ? (st.portfolio_full||{}).total_return_pct : null;
|
||||
const capShow = isOverall ? (st.portfolio_full||pf).capital_final : null;
|
||||
const cagrShow = isOverall ? (st.portfolio_full||pf).cagr_pct : null;
|
||||
const ddShow = isOverall ? (st.portfolio_full||pf).portfolio_max_dd_pct : null;
|
||||
const retShow = isOverall ? (st.portfolio_full||{}).total_return_pct : (rwPf ? rwPf.total_return_pct : null);
|
||||
const capShow = isOverall ? (st.portfolio_full||pf).capital_final : (rwPf ? rwPf.capital_final : null);
|
||||
const cagrShow = isOverall ? (st.portfolio_full||pf).cagr_pct : (rwPf ? rwPf.cagr_pct : null);
|
||||
const ddShow = isOverall ? (st.portfolio_full||pf).portfolio_max_dd_pct : (rwPf ? rwPf.portfolio_max_dd_pct : null);
|
||||
const rowCls = 'border-b border-slate-800/50 hover:bg-slate-800/30 cursor-pointer' + (rgActive ? ' bg-emerald-900/20 border-l-2 border-l-emerald-400' : '');
|
||||
ghtml += '<tr class="' + rowCls + '" onclick="showStrategyDetail(\'' + s.version + '\')">' +
|
||||
'<td class="px-2 py-1.5 whitespace-nowrap">' +
|
||||
|
||||
Reference in New Issue
Block a user