Signed-off-by: Dinger <quantdinger@gmail.com>
This commit is contained in:
Dinger
2026-04-06 01:39:25 +08:00
parent 15c901364b
commit 3ca291a346
214 changed files with 2771 additions and 8535 deletions
+89
View File
@@ -4,6 +4,95 @@ This document records version updates, new features, bug fixes, and database mig
---
## V3.0.1 (2026-04-05) — Frontend / docs
- **前端版本**`QuantDinger-Vue-src/package.json`、页脚展示与 `frontend/VERSION` 统一为 **3.0.1**
- **文档**:根目录 `README.md``docs/README_CN.md` 补充 QuantDinger 专属交易所邀请注册链接表(与个人中心「开户」一致),版本徽章更新为 3.0.1。
- **回测中心**:暗黑主题下图标与「添加标的」等弹窗样式对齐(`a-icon`、图表标题区、Modal 挂载层)。
---
## V2.2.4 (2026-04-05)
### 🚀 New Features
- **真实策略回测主链路**: 新增基于 `strategyId` 的策略回测入口,支持已保存的 `IndicatorStrategy``ScriptStrategy`,不再只是“取指标再跑一次指标回测”。
- **策略快照解析层**: 后端新增统一策略快照解析逻辑,把 `indicator_config``trading_config``strategy_code` 解析为可回测的标准输入。
- **策略回测历史与详情**: 回测记录现在可区分 `indicator` / `strategy_indicator` / `strategy_script`,并支持策略回测历史、详情查看和 AI 修正建议链路。
- **交易助手联动回测中心**: 交易助手中的策略项新增回测跳转入口,可直接带 `strategy_id` 进入回测中心。
### 🐛 Bug Fixes
- Fixed the previous “策略回测” pseudo-flow that only reused `/api/indicator/backtest` and could not faithfully replay stored strategies.
- Fixed strategy backtest history semantics so records can be linked to concrete strategies instead of only relying on `indicator_id`.
- Fixed strategy backtest UI entry restoration in Backtest Center and wired the strategy selector/history drawer to real backend endpoints.
### 🎨 UI/UX Improvements
- Restored the `回测中心 -> 策略回测` tab with strategy summary cards and environment override controls.
- Unified strategy backtest history display with the existing run viewer and AI suggestion modal.
### 📋 Database Migration
**在已有 PostgreSQL 库上执行(新库若已通过更新后的 `migrations/init.sql` 初始化则无需再执行):**
```sql
-- ============================================================
-- QuantDinger V2.2.4 Database Migration
-- Strategy Backtest Persistence Upgrade
-- ============================================================
ALTER TABLE qd_backtest_runs ADD COLUMN IF NOT EXISTS strategy_id INTEGER;
ALTER TABLE qd_backtest_runs ADD COLUMN IF NOT EXISTS strategy_name VARCHAR(255) DEFAULT '';
ALTER TABLE qd_backtest_runs ADD COLUMN IF NOT EXISTS run_type VARCHAR(50) DEFAULT 'indicator';
ALTER TABLE qd_backtest_runs ADD COLUMN IF NOT EXISTS config_snapshot TEXT DEFAULT '';
ALTER TABLE qd_backtest_runs ADD COLUMN IF NOT EXISTS engine_version VARCHAR(50) DEFAULT '';
ALTER TABLE qd_backtest_runs ADD COLUMN IF NOT EXISTS code_hash VARCHAR(128) DEFAULT '';
CREATE INDEX IF NOT EXISTS idx_backtest_runs_strategy_id ON qd_backtest_runs(strategy_id);
CREATE INDEX IF NOT EXISTS idx_backtest_runs_run_type ON qd_backtest_runs(run_type);
CREATE TABLE IF NOT EXISTS qd_backtest_trades (
id SERIAL PRIMARY KEY,
run_id INTEGER NOT NULL,
user_id INTEGER NOT NULL DEFAULT 1 REFERENCES qd_users(id) ON DELETE CASCADE,
strategy_id INTEGER,
trade_index INTEGER DEFAULT 0,
trade_time VARCHAR(64) DEFAULT '',
trade_type VARCHAR(64) DEFAULT '',
side VARCHAR(32) DEFAULT '',
price DOUBLE PRECISION DEFAULT 0,
amount DOUBLE PRECISION DEFAULT 0,
profit DOUBLE PRECISION DEFAULT 0,
balance DOUBLE PRECISION DEFAULT 0,
reason VARCHAR(64) DEFAULT '',
payload_json TEXT DEFAULT '',
created_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_backtest_trades_run_id ON qd_backtest_trades(run_id);
CREATE TABLE IF NOT EXISTS qd_backtest_equity_points (
id SERIAL PRIMARY KEY,
run_id INTEGER NOT NULL,
point_index INTEGER DEFAULT 0,
point_time VARCHAR(64) DEFAULT '',
point_value DOUBLE PRECISION DEFAULT 0,
created_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_backtest_equity_points_run_id ON qd_backtest_equity_points(run_id);
```
### 📝 Migration Notes
- All statements are idempotent and safe to run multiple times.
- Existing backtest data is preserved.
- Existing `indicator` backtest records remain compatible; new strategy backtests will write `run_type`, `strategy_id`, `strategy_name`, `config_snapshot`, `engine_version`, and `code_hash`.
- `qd_backtest_trades` and `qd_backtest_equity_points` are introduced for future strategy-level analytics and debugging.
---
## V2.2.3 (2026-03-24)
### 🚀 New Features
+20 -6
View File
@@ -27,7 +27,7 @@
<p>
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square&logo=apache" alt="License"></a>
<img src="https://img.shields.io/badge/Version-2.2.3-orange?style=flat-square" alt="Version">
<img src="https://img.shields.io/badge/Version-3.0.1-orange?style=flat-square" alt="Version">
<img src="https://img.shields.io/badge/Python-3.10+-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python">
<img src="https://img.shields.io/badge/Docker-一键部署-2496ED?style=flat-square&logo=docker&logoColor=white" alt="Docker">
<img src="https://img.shields.io/badge/Vibe%20Coding-就绪-FF6B6B?style=flat-square&logo=sparkles&logoColor=white" alt="Vibe Coding">
@@ -51,6 +51,7 @@
- [🎯 为什么选择QuantDinger](#-为什么选择quantdinger)
- [📸 视觉导览](#-视觉导览--观看视频演示)
- [✨ 核心功能](#-核心功能)
- [🔗 QuantDinger 交易所注册邀请链接](#quantdinger-交易所注册邀请链接)
- [🔌 支持的交易所和经纪商](#-支持的交易所和经纪商)
- [🏗️ 架构与配置](#-架构与配置)
- [📚 文档索引](#-文档索引)
@@ -386,6 +387,23 @@ flowchart TB
---
## 🔗 QuantDinger 交易所注册邀请链接
以下为 **QuantDinger** 合作邀请注册链接。通过链接开户可能享受交易手续费返佣(例如最高约 **20%** 返佣,具体以各交易所规则与活动为准)。
| 交易所 | 邀请 / 注册链接 |
|--------|-----------------|
| Binance | [注册开户](https://www.bsmkweb.cc/register?ref=QUANTDINGER) |
| Bitget | [注册开户](https://partner.hdmune.cn/bg/7r4xz8kd) |
| Bybit | [注册开户](https://partner.bybit.com/b/DINGER) |
| OKX | [注册开户](https://www.xqmnobxky.com/join/QUANTDINGER) |
| Gate.io | [注册开户](https://www.gateport.company/share/DINGER) |
| HTX | [注册开户](https://www.htx.com/invite/zh-cn/1f?invite_code=dinger) |
网页端登录后,亦可在 **个人中心 → 选择交易所开户** 使用相同链接。
---
## 🔌 支持的交易所和经纪商
### 加密货币(直接API交易)
@@ -412,11 +430,7 @@ flowchart TB
### 交易所返佣入口
如果你本来就准备开通交易所账户,建议直接走返佣链接。很多交易用户本来就会主动找“手续费减免/返佣链接”,而下面这些链接都可以直接享受 20% 手续费减免,不增加任何额外成本
- **OKX**[开户即享 20% 手续费减免](https://www.promooboost.com/join/QUANTDINGER)
- **Bitget**[开户即享 20% 手续费减免](https://partner.bitget.com/bg/dinger)
- **Bitget(备用链接)**[备用 20% 手续费减免注册链接](https://partner.hdmune.cn/bg/7r4xz8kd)
完整列表见上文:[QuantDinger 交易所注册邀请链接](#quantdinger-交易所注册邀请链接)
---