feat: 温区表格补夏普+盈亏比列(数据已有,只差显示)+更新过时注释
This commit is contained in:
+5
-2
@@ -2453,8 +2453,8 @@ function renderStrategyTable(strategies) {
|
||||
const sh = Math.min(Math.max((rwPf.sharpe_ratio || 0), 0), 20) / 20 * 20;
|
||||
const pfc = Math.min((rwPf.profit_factor || 0), 5) / 5 * 15;
|
||||
const dd = (1 - Math.min(rwPf.portfolio_max_dd_pct || 0, 50) / 50) * 15;
|
||||
// 2026-08-15:温区行置信用温区自己样本量(regime_winrates 来自全量 strategy_regime_perf,
|
||||
// 与所选周期无关)——用整体 conf 会把温区综合分错误打折(如 1m 视角整体只有 1 笔 → 全部归零)
|
||||
// 2026-08-15:温区行置信用温区自己样本量(regime_winrates 来自预计算表 strategy_regime_perf_by_period,
|
||||
// 按所选周期计算)——用整体 conf 会把温区综合分错误打折(如 1m 视角整体只有 1 笔 → 全部归零)
|
||||
const rn = tr || 0;
|
||||
const rm = rw.universality ? (rw.universality.months || 0) : 0;
|
||||
const rconf = Math.min(1, rn / 40) * (rm > 0 ? Math.min(1, rm / 6) : 1);
|
||||
@@ -2474,6 +2474,8 @@ function renderStrategyTable(strategies) {
|
||||
cell('avg_hold_days', rw.avg_hold_days != null ? rw.avg_hold_days : null, v => v + 'd') +
|
||||
cell('cagr_pct', cagr, v => v + '%', 'font-bold text-amber-300') +
|
||||
cell('composite', comp, v => v, 'font-bold text-amber-300') +
|
||||
cell('sharpe_ratio', rw.sharpe_ratio != null ? rw.sharpe_ratio : null, v => v) +
|
||||
cell('profit_factor', rw.profit_factor != null ? rw.profit_factor : null, v => v) +
|
||||
cell('universality_score', univ, v => v + '<span class="text-slate-500">/' + (univM || '?') + '月</span>') +
|
||||
cell('portfolio_max_dd_pct', ddV, v => v + '%', '') +
|
||||
'<td class="text-center px-2 py-1.5" onclick="event.stopPropagation()"><button onclick="runStrategyBacktest(\'' + s.version + '\')" class="px-2 py-0.5 bg-blue-600/60 hover:bg-blue-500 rounded text-xs">▶回测</button></td></tr>';
|
||||
@@ -2494,6 +2496,7 @@ function renderStrategyTable(strategies) {
|
||||
th('version', '版本', 'text-left') + th('name', '名称', 'text-left') +
|
||||
th('win_rate', '胜率', 'text-right') + th('avg_profit', '平均收益', 'text-right') + th('trades', '笔数', 'text-right') +
|
||||
th('hold', '均持仓', 'text-right') + th('cagr', '年化', 'text-right') + th('composite', '综合', 'text-right') +
|
||||
th('sharpe', '夏普', 'text-right') + th('profit_factor', '盈亏比', 'text-right') +
|
||||
th('universality', '普适', 'text-right') + th('max_dd', '回撤', 'text-right') +
|
||||
'<th class="text-center px-2 py-1.5">操作</th></tr></thead><tbody>' +
|
||||
metas.map(s => renderRegimeRow(s, rg)).join('') +
|
||||
|
||||
Reference in New Issue
Block a user