docs: 更新README添加回测执行方式

This commit is contained in:
2026-05-11 23:46:12 +08:00
parent f70aa1d3d1
commit 6231401b71

View File

@@ -131,7 +131,20 @@ portfolio = executor.execute(signals, data)
## 快速开始
### 1. 使用新框架
### 1. 运行回测
```bash
# 使用默认配置
python run_rotation.py
# 指定配置文件
python run_rotation.py --config config/strategies/rotation.yaml
# 指定报告保存路径
python run_rotation.py --save-path results/my_rotation
```
### 2. 代码方式使用框架
```python
from framework import FactorBase, FactorRegistry, SignalGenerator, StrategyBase
@@ -158,7 +171,7 @@ selector = TopNSelector(
signals = selector.generate(factor_data)
```
### 2. 运行测试
### 3. 运行测试
```bash
# 框架单元测试