diff --git a/server.py b/server.py index fa05da56..64b5f32c 100644 --- a/server.py +++ b/server.py @@ -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: diff --git a/static/index.html b/static/index.html index 64df84cf..efc05230 100644 --- a/static/index.html +++ b/static/index.html @@ -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 += '