From 5c0ba37eda80d39e6ceca59bb1d5f4942f858995 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Thu, 17 Sep 2026 14:32:37 +0800 Subject: chore: establish Strategy Lab source baseline (development, not release) --- frontend/src/pages/RunsPage.svelte | 180 +++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 frontend/src/pages/RunsPage.svelte (limited to 'frontend/src/pages/RunsPage.svelte') diff --git a/frontend/src/pages/RunsPage.svelte b/frontend/src/pages/RunsPage.svelte new file mode 100644 index 0000000..bd77892 --- /dev/null +++ b/frontend/src/pages/RunsPage.svelte @@ -0,0 +1,180 @@ + + + +
+ + + {#if !busy && !error && runs.length === 0} + + {/if} + + {#if !busy && !error && runs.length > 0} +
+ + + + + + + + + + + + + + + + {#each runs as r (r.id)} + + + + + + + + + + + + {/each} + +
时间状态项目数据集资金/佣金/滑点收益最大回撤操作
+ toggle(r.id)} + aria-label={`选择 Run ${r.id.slice(0, 8)} 参与`} + disabled={r.status !== 'succeeded' && chosenIds.length >= 4 && !chosenIds.includes(r.id)} + /> + {fmtDateTime(r.created_at)}{runStatusLabel[r.status]}{r.project_id?.slice(0, 8)}…{r.dataset_id?.slice(0, 8)}…{formatMoney(r.config?.capital)} · {fmtPct(r.config?.commission, 4)} / {fmtPct(r.config?.slippage, 4)}{r.result ? fmtPct(r.result.metrics.total_return) : '—'}{r.result ? fmtPct(r.result.metrics.max_drawdown) : '—'} + 查看 +
+

最多同时选中 4 个已完成的回测用于比较。

+
+ + {#if selected.length > 0} +
+

条件差异

+ + + + + {#each selected as r (r.id)}{/each} + + + + {#each configDiffRows as row, i (i)} + + + {#each row.vals as v, j (j)} + + {/each} + + {/each} + +
维度Run {r.id.slice(0, 6)}
{row.label}{v}
+
+ + {#if comparable.length > 1} +
+

收益曲线对齐比较(首日归一)

+ +

起点对齐为 1,仅叠加不同起点的曲线时只在各自区间内展示。

+
+ {:else} + + {/if} + {/if} + {/if} +
+
-- cgit v1.2.3