feat: 全链路新增 type 字段支持 + exchange.ts 超时退出优化

- TS: exit 函数统一管理进程退出与 DB 连接关闭;10s 超时 + 异常路径 clearTimeout
- Python: PairType(spot/um/cm) 贯穿 Kline 模型、策略配置、数据查询
- 回测脚本升级: 9策略 × 4币种 × 6时间级别 × 2交易类型
- 新增 generate_report.py 回测报告生成工具
This commit is contained in:
Rekey
2026-06-17 10:01:52 +08:00
parent ebaef5042e
commit 626acb20d3
13 changed files with 42394 additions and 5129 deletions
+2
View File
@@ -201,6 +201,8 @@ async def run_one(
warmup_bars=100,
)
strategy_config.symbol = symbol
strategy_config.exchange = bt.exchange
strategy_config.type = bt.type
strategy_config.name = f"{strategy_name}_{symbol}"
engine = BacktestEngine(bt, db_config=config.db)