From 531edc96850f6a9a83111c8b1a8a39ae0f73bfc3 Mon Sep 17 00:00:00 2001 From: hmo Date: Thu, 30 Jul 2026 23:57:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=93=E4=BD=8D=E2=9A=A1=E6=94=B9?= =?UTF-8?q?=E5=8F=AF=E7=82=B9=E5=87=BB=E6=8C=89=E9=92=AE,=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E4=BF=A1=E5=BF=B5=E5=88=86=E7=BA=A7=E4=BB=93=E4=BD=8D?= =?UTF-8?q?=E8=A7=84=E5=88=99=E6=A8=A1=E6=80=81=E6=A1=86(=E5=9B=A0?= =?UTF-8?q?=E5=AD=90=E6=98=8E=E7=BB=86+=E5=8F=A0=E4=B9=98=E8=A7=84?= =?UTF-8?q?=E5=88=99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index cc49e69f..b5a3db86 100644 --- a/static/index.html +++ b/static/index.html @@ -1993,6 +1993,45 @@ function showDesc(version) { `; document.body.appendChild(modal); } +function showConviction(version) { + const s = (window._strats || []).find(x => x.version === version); + const st = (s && s.summary_stats) || {}; + const model = st.conviction_model; + if (!model) { showToast('该策略无信念分级仓位'); return; } + const slots = st.sizing_slots || 10; + const isStack = model.includes('叠乘'); + // boost分布(从trades统计在前端没有, 用summary里的说明) + const rules = isStack ? [ + ['动量基因 DNA', '收缩突破形态(ATR处20日最低1/4位+破20日新高+量比>1.2)', '×2'], + ['行业确认牛', '行业板块ADX>25(行业级趋势强化)', '×2'], + ['资金加速度', 'flow_delta>0(主力资金净流入在加速)', '×2'], + ] : [ + ['动量基因 DNA', '收缩突破形态(ATR处20日最低1/4位+破20日新高+量比>1.2)', '任一命中 ×2'], + ['行业趋势强', '行业板块ADX≥20', '任一命中 ×2'], + ['资金加速度', 'flow_delta>0(主力资金净流入在加速)', '任一命中 ×2'], + ]; + const modal = document.createElement('div'); + modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm'; + modal.onclick = () => modal.remove(); + modal.innerHTML = ` +
+
+

⚡ 信念分级仓位

+ +
+
+
${model}
+
基准 ${slots} 仓(总资金分${slots}份,每份一票)。命中信念因子的票按规则放大单票仓位:
+ ${rules.map(r => `
+
${r[0]}
+
${r[1]}
+
${r[2]}
+
`).join('')} +
${isStack ? '多个因子同时命中则叠乘(如 DNA+行业牛 = ×4),封顶 ×4;均不命中 ×1(基准仓)。' : '多个因子同时命中不叠乘,统一 ×2;均不命中 ×1(基准仓)。'}
+
+
`; + document.body.appendChild(modal); +} function showToast(msg) { const t = document.createElement('div'); t.className = 'fixed top-4 right-4 z-50 bg-slate-800 border border-slate-600 rounded-lg px-4 py-2 text-sm text-slate-200 shadow-lg'; @@ -2153,7 +2192,7 @@ function renderStrategyTable(strategies) { html += '' + '' + s.version + (isCurrent ? ' 当前' : '') + ((s.market && s.market !== 'all') ? ' ' + (s.market === 'hk' ? '港' : 'A') + '' : '') + '' + '' + (s.name || '') + (smallSample ? ' ⚠️' : '') + '' + - '' + (st.sizing_slots ? st.sizing_slots + '仓' : '10仓') + (st.conviction_model ? '' : '') + '' + + '' + (st.sizing_slots ? st.sizing_slots + '仓' : '10仓') + (st.conviction_model ? '' : '') + '' + '' + ((s.description && s.description.title) ? '' : '') + '' + cell('composite', s._composite, v => v + (s._confidence != null && s._confidence < 1 ? '×' + s._confidence.toFixed(2) + '' : ''), 'font-bold text-amber-300') + cell('universality_score', (st.universality || {}).score, v => v + '/' + (st.universality || {}).months + '月') +