feat: 综合分加信号/成交比效率惩罚+温区表已激活/可激活徽章区分
This commit is contained in:
+12
-3
@@ -2443,8 +2443,13 @@ function renderStrategyTable(strategies) {
|
||||
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);
|
||||
// 2026-08-17 老莫:效率惩罚(信号/成交比过高=大量信号未成交)
|
||||
const _posN = (st.portfolio || {}).positions_taken || 0;
|
||||
const _sigN = n;
|
||||
const _ratioN = _posN > 0 ? _sigN / _posN : 99;
|
||||
const _effN = _ratioN <= 2 ? 1.0 : _ratioN <= 5 ? 0.9 : _ratioN <= 10 ? 0.75 : 0.5;
|
||||
s._confidence = conf;
|
||||
s._composite = Math.round((ret + wr + sh + pfc + dd) * conf);
|
||||
s._composite = Math.round((ret + wr + sh + pfc + dd) * conf * _effN);
|
||||
}
|
||||
// 保存数据用于列排序
|
||||
window._strats = strategies;
|
||||
@@ -2638,7 +2643,11 @@ function renderStrategyTable(strategies) {
|
||||
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);
|
||||
comp = Math.round((ret + w + sh + pfc + dd) * rconf);
|
||||
// 2026-08-17 老莫:效率惩罚——信号/成交比过高(大量信号未成交=质量差)综合分打折
|
||||
const _sig = tr != null ? tr : 0, _pos = (rw && rw.positions_taken) || 0;
|
||||
const _ratio = _pos > 0 ? _sig / _pos : 99;
|
||||
const _eff = _ratio <= 2 ? 1.0 : _ratio <= 5 ? 0.9 : _ratio <= 10 ? 0.75 : 0.5;
|
||||
comp = Math.round((ret + w + sh + pfc + dd) * rconf * _eff);
|
||||
}
|
||||
const cagr = rwPf ? rwPf.cagr_pct : null;
|
||||
const ddV = rwPf ? rwPf.portfolio_max_dd_pct : null;
|
||||
@@ -2653,7 +2662,7 @@ function renderStrategyTable(strategies) {
|
||||
const rManual = s.manual_available !== false;
|
||||
let rState, rStateCls, rStateBadge, rRowBg;
|
||||
if (!rManual) { rState = 'manual_off'; rStateCls = 'text-slate-500'; rStateBadge = '<span class="text-[10px] bg-slate-500/20 text-slate-400 px-1 rounded">手动停用</span>'; rRowBg = 'opacity-50'; }
|
||||
else if (r3) { rState = 'ok3'; rStateCls = 'text-emerald-400'; rStateBadge = '<span class="text-[10px] bg-emerald-500/20 text-emerald-300 px-1 rounded">可激活</span>'; rRowBg = 'bg-emerald-900/10'; }
|
||||
else if (r3) { rState = 'ok3'; rStateCls = 'text-emerald-400'; rStateBadge = (s.current === true) ? '<span class="text-[10px] bg-emerald-500/30 text-emerald-200 px-1 rounded">已激活</span>' : '<span class="text-[10px] bg-emerald-500/20 text-emerald-300 px-1 rounded">可激活</span>'; rRowBg = 'bg-emerald-900/10'; }
|
||||
else if (rNearOk) { rState = 'ok2'; rStateCls = 'text-blue-400'; rStateBadge = '<span class="text-[10px] bg-blue-500/20 text-blue-300 px-1 rounded">可用</span>'; rRowBg = ''; }
|
||||
else { rState = 'bad'; rStateCls = 'text-red-400/80'; rStateBadge = '<span class="text-[10px] bg-red-500/20 text-red-300 px-1 rounded">不合格</span>'; rRowBg = 'opacity-60'; }
|
||||
const isActive = rState === 'ok3';
|
||||
|
||||
Reference in New Issue
Block a user