docs: 更新README添加回测执行方式
This commit is contained in:
17
README.md
17
README.md
@@ -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
|
||||
# 框架单元测试
|
||||
|
||||
Reference in New Issue
Block a user