Select a backtest result
-Choose from the sidebar or run a new VectorBT backtest
+SELECT A BACKTEST
+Choose from sidebar or run a new VBT backtest on live HL data
From 737b24895c83ae6b0118f8d1c4de9313990ca8d4 Mon Sep 17 00:00:00 2001 From: ramseshk <45832522+ramseshk@users.noreply.github.com> Date: Fri, 7 Aug 2026 12:31:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20VBT=20dashboard=20=E2=80=94=20proper=20m?= =?UTF-8?q?etrics=20display=20+=20redesigned=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed total_return_pct, profit_factor, n_bars showing 0 in detail view by using ?? operator instead of || 0 and fixing renderDetail logic - Run Backtest now renders result directly from API response (no re-fetch race condition) - Redesigned UI: monospace trading terminal aesthetic - Darker palette (#090d14 background, #0d1321 cards) - Indigo histogram, proper grid layout - Subtle borders (1px #1a2332), better spacing - Status indicator with pulse animation - Sidebar shows Sharpe, Return%, Profit Factor per result - 8 metric cards: Return, Sharpe, DD, Win Rate, PF, Trades, End Equity, Sortino - Smaller, cleaner fonts, monospace throughout - Bumped memory guard to 2GB to prevent dashboard getting killed --- dashboard/server.py | 6 +- dashboard/static/vbt.html | 298 +++++++++++++++++++------------------- 2 files changed, 149 insertions(+), 155 deletions(-) diff --git a/dashboard/server.py b/dashboard/server.py index 3b7ee23..82b73d0 100644 --- a/dashboard/server.py +++ b/dashboard/server.py @@ -44,9 +44,9 @@ from strategies.quant_report import compute_quant_report # ═══════════════════════════════════════════════════════════ import gc, os as _os -MEM_SOFT_LIMIT = 256 * 1024 * 1024 # 256 MB — force GC -MEM_WARN_LIMIT = 384 * 1024 * 1024 # 384 MB — log warning -MEM_HARD_LIMIT = 512 * 1024 * 1024 # 512 MB — terminate +MEM_SOFT_LIMIT = 512 * 1024 * 1024 # 512 MB — force GC +MEM_WARN_LIMIT = 768 * 1024 * 1024 # 768 MB — log warning +MEM_HARD_LIMIT = 2048 * 1024 * 1024 # 2 GB — terminate def check_memory(): """Check RSS, force GC if over soft limit, raise if over hard limit.""" diff --git a/dashboard/static/vbt.html b/dashboard/static/vbt.html index d1618c4..0f0474a 100644 --- a/dashboard/static/vbt.html +++ b/dashboard/static/vbt.html @@ -7,73 +7,79 @@
-