From a82b8c72b728a55f637fc927d5de457504030519 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 17 Aug 2026 01:32:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=99=AE=E9=80=82=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E9=87=8D=E5=A4=8Dimport=20bug(=E5=AE=88=E5=8D=AB=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A=E5=90=8E=E8=A1=A5)+=E5=89=8D=E7=AB=AF=E6=99=AE?= =?UTF-8?q?=E9=80=82=E5=88=97=E6=98=BE=E7=A4=BA=E6=9C=89=E6=95=88=E5=B9=B4?= =?UTF-8?q?/=E6=80=BB=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/regime_perf_by_period.py | 1 - static/index.html | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/profile-scripts/regime_perf_by_period.py b/deploy/profile-scripts/regime_perf_by_period.py index 538cdad0..c3dc0e3b 100644 --- a/deploy/profile-scripts/regime_perf_by_period.py +++ b/deploy/profile-scripts/regime_perf_by_period.py @@ -169,7 +169,6 @@ def process_period(conn, market, period_tag): _univ_score = _univ_years = _univ_valid = _univ_leave1 = 0 _ed_list = [t.get("entry_date", "")[:4] for t in reg_trades if t.get("entry_date")] if len(_ed_list) >= 5: - from collections import defaultdict _yr = defaultdict(list) for _y, _t in zip(_ed_list, reg_trades): _yr[_y].append(_t.get("profit_pct", 0)) diff --git a/static/index.html b/static/index.html index 9ccf3bfe..5b6a184d 100644 --- a/static/index.html +++ b/static/index.html @@ -2549,7 +2549,7 @@ function renderStrategyTable(strategies) { '' + (st.sizing_slots ? st.sizing_slots + '仓' : '10仓') + (st.conviction_model ? '' : '') + '' + '' + ((s.description && s.description.title) ? '' : '') + '' + cell('composite', compositeShow, v => v + (s._confidence != null && s._confidence < 1 ? '×' + s._confidence.toFixed(2) + '' : ''), 'font-bold text-amber-300') + - cell('universality_score', universalityShow, v => v + '/' + (isOverall ? (st.universality || {}).months : (rwUniv ? rwUniv.months + '/' + (rwUniv.regime_total_months || '?') : '?')) + '月') + + cell('universality_score', universalityShow, v => v + '' + (isOverall ? ('/' + ((st.universality || {}).valid_years || 0) + '年有效') : (rwUniv ? ('/' + (rwUniv.valid_years || 0) + '年有效') : '?')) + '') + cell('full_return_pct', retShow, v => v + '%', 'font-bold text-amber-300') + cell('capital_final', capShow, v => '¥' + (v/10000).toFixed(0) + '万') + cell('cagr_pct', cagrShow, v => v + '%', hl(cagrShow, best.cagr_pct)) + @@ -2599,6 +2599,7 @@ function renderStrategyTable(strategies) { const ddV = rwPf ? rwPf.portfolio_max_dd_pct : null; const univ = rw.universality ? rw.universality.score : null; const univM = rw.universality ? (rw.universality.months + '/' + (rw.universality.regime_total_months || '?')) : null; + const univYears = rw.universality ? ((rw.universality.valid_years || 0) + '/' + (rw.universality.years || 0) + '年') : null; // ── 2026-08-16 行状态按【该表温区 rg】独立判定(老莫反复强调)── const qg = (s.qualification || {})[rg]; const rLong = qg && qg.long_ok, rMid = qg && qg.mid_ok, rShort = qg && qg.short_ok; @@ -2637,7 +2638,7 @@ function renderStrategyTable(strategies) { 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 + '/' + (univM || '?') + '月') + + cell('universality_score', univ, v => v + '' + (univYears || '') + '') + cell('portfolio_max_dd_pct', ddV, v => v + '%', '') + ''; };