remove: 删除集中仓列——挑装运气指标不该存在,只留MC公平口径
This commit is contained in:
+2
-6
@@ -2033,7 +2033,7 @@ function renderStrategyTable(strategies) {
|
||||
}
|
||||
// 找每列最优值用于高亮
|
||||
const best = { win_rate: -999, sharpe_ratio: -999, profit_factor: -999, avg_profit_pct: -999,
|
||||
total_return_pct: -999, cagr_pct: -999, portfolio_max_dd_pct: 999 };
|
||||
cagr_pct: -999, portfolio_max_dd_pct: 999 };
|
||||
for (const s of strategies) {
|
||||
const st = s.summary_stats || {};
|
||||
const pf = st.portfolio || {};
|
||||
@@ -2041,7 +2041,6 @@ function renderStrategyTable(strategies) {
|
||||
if (st.sharpe_ratio != null) best.sharpe_ratio = Math.max(best.sharpe_ratio, st.sharpe_ratio);
|
||||
if (st.profit_factor != null) best.profit_factor = Math.max(best.profit_factor, st.profit_factor);
|
||||
if (st.avg_profit_pct != null) best.avg_profit_pct = Math.max(best.avg_profit_pct, st.avg_profit_pct);
|
||||
if (pf.total_return_pct != null) best.total_return_pct = Math.max(best.total_return_pct, pf.total_return_pct);
|
||||
if (pf.cagr_pct != null) best.cagr_pct = Math.max(best.cagr_pct, pf.cagr_pct);
|
||||
if (pf.portfolio_max_dd_pct != null) best.portfolio_max_dd_pct = Math.min(best.portfolio_max_dd_pct, pf.portfolio_max_dd_pct);
|
||||
}
|
||||
@@ -2053,7 +2052,7 @@ function renderStrategyTable(strategies) {
|
||||
// 条件格式色条:计算每列 min/max,单元格背景按相对大小画色条
|
||||
const CURRENT_STRATEGY = 'v7.1';
|
||||
const ranges = {};
|
||||
const cols = ['composite','universality_score','total_return_pct','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','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) {
|
||||
@@ -2088,7 +2087,6 @@ function renderStrategyTable(strategies) {
|
||||
th('composite', '综合', 'text-right') +
|
||||
th('universality', '普适', 'text-right') +
|
||||
th('full_return', '全参与', 'text-right') +
|
||||
th('total_return', '集中仓⚠️', 'text-right', '该策略最优激进仓位下的挑装收益——含上车运气,方差大') +
|
||||
th('capital_final', '最终资产', 'text-right') +
|
||||
th('cagr', '年化', 'text-right') +
|
||||
th('trades', '执行数', 'text-right', '实际参与组合模拟的交易笔数;信号总数=为鼠标悬停查看') +
|
||||
@@ -2103,7 +2101,6 @@ function renderStrategyTable(strategies) {
|
||||
const hasResult = st.total_trades != null;
|
||||
const smallSample = hasResult && st.total_trades < 40;
|
||||
const isCurrent = s.version === CURRENT_STRATEGY && (s.market || 'all') !== 'hk';
|
||||
const retCls = pf.total_return_pct == null ? '' : (pf.total_return_pct >= 0 ? 'text-green-400' : 'text-red-400');
|
||||
const rowCls = 'border-b border-slate-800/50 hover:bg-slate-800/30 cursor-pointer' + (isCurrent ? ' bg-emerald-900/20 border-l-2 border-l-emerald-400' : '');
|
||||
html += '<tr class="' + rowCls + '" onclick="showStrategyDetail(\'' + s.version + '\')">' +
|
||||
'<td class="px-2 py-1.5 font-mono font-bold ' + (isCurrent ? 'text-emerald-400' : 'text-blue-400') + '">' + s.version + (isCurrent ? ' <span class="text-[10px] bg-emerald-500/20 text-emerald-300 px-1 rounded">当前</span>' : '') + ((s.market && s.market !== 'all') ? ' <span class="text-[10px] bg-cyan-500/20 text-cyan-300 px-1 rounded">' + (s.market === 'hk' ? '港' : 'A') + '</span>' : '') + '</td>' +
|
||||
@@ -2112,7 +2109,6 @@ function renderStrategyTable(strategies) {
|
||||
cell('composite', s._composite, v => v, 'font-bold text-amber-300') +
|
||||
cell('universality_score', (st.universality || {}).score, v => v + '<span class="text-slate-500">/' + (st.universality || {}).months + '月</span>') +
|
||||
cell('total_return_pct', (st.portfolio_full || {}).total_return_pct, v => v + '%' + ((st.portfolio_full||{}).std ? '<span class="text-slate-500 text-[10px]">±' + (st.portfolio_full||{}).std + '</span>' : ''), 'font-bold text-amber-300') +
|
||||
cell('total_return_pct', pf.total_return_pct, v => v + '%', retCls + ' ' + hl(pf.total_return_pct, best.total_return_pct)) +
|
||||
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) +
|
||||
|
||||
Reference in New Issue
Block a user