From e1b8c4ac6893a14a2bd3f51057573bc9328d5f7f Mon Sep 17 00:00:00 2001 From: claude_dev Date: Sat, 11 Jul 2026 13:20:30 +0800 Subject: [PATCH] =?UTF-8?q?docs(plan):=20=E5=AF=8C=E5=9B=9E=E6=B5=8B?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E9=A1=B5=E5=AE=9E=E6=96=BD=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E2=80=948=E4=BB=BB=E5=8A=A1TDD(metrics=E2=86=92=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E2=86=92=E5=BC=95=E6=93=8E=E2=86=92API=E2=86=92?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E2=86=92=E9=83=A8=E7=BD=B2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plans/2026-07-11-backtest-result-page.md | 476 ++++++++++++++++++ 1 file changed, 476 insertions(+) create mode 100644 docs/superpowers/plans/2026-07-11-backtest-result-page.md diff --git a/docs/superpowers/plans/2026-07-11-backtest-result-page.md b/docs/superpowers/plans/2026-07-11-backtest-result-page.md new file mode 100644 index 0000000..b09c104 --- /dev/null +++ b/docs/superpowers/plans/2026-07-11-backtest-result-page.md @@ -0,0 +1,476 @@ +# 富回测结果页(聚宽级)实施计划 + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** 把 CTA 回测结果页升级到聚宽级(10 指标卡 + 5 图 + 4 tab + 时间缩放),后端用 empyrical 补齐相对基准指标(Alpha/Beta/Sortino/IR),基准可选沪深300/中证500。 + +**Architecture:** vnpy 跑完回测产出 `daily_df` → 新增 `sanguo_backtest/metrics.py`(empyrical 纯函数)算 10 标量指标 + 5 逐日时序 → 存 DB+json → FastAPI 扩端点返回 → 前端 `Result.vue` 重构渲染(echarts)。不碰回测引擎撮合逻辑,只加结果计算层。 + +**Tech Stack:** Python 3.10(容器)/3.14(本机)、vnpy_ctastrategy、empyrical(新增)、pandas、FastAPI、pytest;Vue3 `