feat: 综合分加置信系数(样本量×普适月份)——v6.2类小样本单窗口策略从榜首打落
This commit is contained in:
+7
-2
@@ -2016,7 +2016,12 @@ function renderStrategyTable(strategies) {
|
||||
const sh = Math.min(Math.max(st.sharpe_ratio || 0, 0), 20) / 20 * 20;
|
||||
const pfc = Math.min(st.profit_factor || 0, 5) / 5 * 15;
|
||||
const dd = (1 - Math.min(pff.portfolio_max_dd_pct || 0, 50) / 50) * 15;
|
||||
s._composite = Math.round(ret + wr + sh + pfc + dd);
|
||||
// 置信系数:样本量(<40笔递减) × 普适月份(<6月递减)——小样本/单窗口策略的可信度打折
|
||||
const n = st.total_trades || 0;
|
||||
const months = (st.universality || {}).months || 0;
|
||||
const conf = Math.min(1, n / 40) * (months > 0 ? Math.min(1, months / 6) : 1);
|
||||
s._confidence = conf;
|
||||
s._composite = Math.round((ret + wr + sh + pfc + dd) * conf);
|
||||
}
|
||||
// 保存数据用于列排序
|
||||
window._strats = strategies;
|
||||
@@ -2107,7 +2112,7 @@ function renderStrategyTable(strategies) {
|
||||
'<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>' +
|
||||
'<td class="px-2 py-1.5" title="' + (s.hypothesis || s.summary || '').replace(/"/g, '"') + '">' + (s.name || '') + (smallSample ? ' <span class="text-amber-500" title="样本<40笔">⚠️</span>' : '') + '</td>' +
|
||||
'<td class="text-center px-2 py-1.5 font-mono text-cyan-300">' + (st.sizing_slots ? st.sizing_slots + '仓' : '10仓') + '</td>' +
|
||||
cell('composite', s._composite, v => v, 'font-bold text-amber-300') +
|
||||
cell('composite', s._composite, v => v + (s._confidence != null && s._confidence < 1 ? '<span class="text-slate-500 text-[10px]">×' + s._confidence.toFixed(2) + '</span>' : ''), 'font-bold text-amber-300') +
|
||||
cell('universality_score', (st.universality || {}).score, v => v + '<span class="text-slate-500">/' + (st.universality || {}).months + '月</span>') +
|
||||
cell('full_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('capital_final', (st.portfolio_full||pf).capital_final, v => '¥' + (v/10000).toFixed(0) + '万') +
|
||||
|
||||
Reference in New Issue
Block a user