From b6e028c67eaa63c9cb65c3baf3a1354547ca9bab Mon Sep 17 00:00:00 2001 From: hmo Date: Wed, 29 Jul 2026 23:57:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=A8=E5=8F=82=E4=B8=8E=E5=88=97?= =?UTF-8?q?=E8=89=B2=E6=9D=A1=E9=94=AE=E7=BC=BA=E5=A4=B1=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=A4=B1=E8=B4=A5(ranges[total=5Freturn=5Fpc?= =?UTF-8?q?t]=20undefined)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/index.html b/static/index.html index 8c3d6d08..aafe4753 100644 --- a/static/index.html +++ b/static/index.html @@ -2052,12 +2052,12 @@ function renderStrategyTable(strategies) { // 条件格式色条:计算每列 min/max,单元格背景按相对大小画色条 const CURRENT_STRATEGY = 'v7.1'; const ranges = {}; - const cols = ['composite','universality_score','capital_final','cagr_pct','total_trades','avg_hold_days','win_rate','avg_profit_pct','sharpe_ratio','profit_factor','portfolio_max_dd_pct']; + const cols = ['composite','universality_score','full_return_pct','capital_final','cagr_pct','total_trades','avg_hold_days','win_rate','avg_profit_pct','sharpe_ratio','profit_factor','portfolio_max_dd_pct']; for (const c of cols) { let mn = Infinity, mx = -Infinity; for (const s of strategies) { const st = s.summary_stats || {}; const pf = st.portfolio || {}; - const v = c === 'composite' ? s._composite : (c === 'universality_score' ? (st.universality || {}).score : ((c in pf) ? pf[c] : st[c])); + const v = c === 'composite' ? s._composite : (c === 'universality_score' ? (st.universality || {}).score : (c === 'full_return_pct' ? (st.portfolio_full || {}).total_return_pct : ((c in pf) ? pf[c] : st[c]))); if (v != null) { mn = Math.min(mn, v); mx = Math.max(mx, v); } } ranges[c] = { mn: mn === Infinity ? 0 : mn, mx: mx === -Infinity ? 1 : mx }; @@ -2108,7 +2108,7 @@ function renderStrategyTable(strategies) { '' + (st.sizing_slots ? st.sizing_slots + '仓' : '10仓') + '' + cell('composite', s._composite, v => v, 'font-bold text-amber-300') + cell('universality_score', (st.universality || {}).score, v => v + '/' + (st.universality || {}).months + '月') + - cell('total_return_pct', (st.portfolio_full || {}).total_return_pct, v => v + '%' + ((st.portfolio_full||{}).std ? '±' + (st.portfolio_full||{}).std + '' : ''), 'font-bold text-amber-300') + + cell('full_return_pct', (st.portfolio_full || {}).total_return_pct, v => v + '%' + ((st.portfolio_full||{}).std ? '±' + (st.portfolio_full||{}).std + '' : ''), 'font-bold text-amber-300') + cell('capital_final', (st.portfolio_full||pf).capital_final, v => '¥' + (v/10000).toFixed(0) + '万') + cell('cagr_pct', (st.portfolio_full||pf).cagr_pct, v => v + '%', hl((st.portfolio_full||pf).cagr_pct, best.cagr_pct)) + cell('total_trades', st.total_trades, v => (pf.positions_taken||0) + '/' + (v > 999 ? Math.round(v/1000) + 'k' : v), '', false) +