refactor: 配置文件迁移到策略目录(模块自包含)

迁移内容:
- config/strategies/rotation.yaml → strategies/rotation/config.yaml

路径更新(核心文件):
- strategies/rotation/strategy.py(注释示例)
- scripts/generate_legacy_report.py(config_path)
- run_rotation.py(注释和默认参数)
- datasource/hybrid_source.py(from_yaml示例和fetch_rotation_data)

保留:
- config/strategies/cci.yaml(无对应策略目录,暂保留)

设计原则:策略模块自包含,配置与实现同目录,方便移植和复制

验证:策略加载成功(候选池11只,回测区间2019-01-01 ~ 2026-05-12)
This commit is contained in:
2026-05-12 22:14:35 +08:00
parent 0a8d0d9212
commit aeb95a6f4c
5 changed files with 6 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ ETF轮动策略回测入口
用法:
python run_rotation.py
python run_rotation.py --config config/strategies/rotation.yaml
python run_rotation.py --config strategies/rotation/config.yaml
python run_rotation.py --save-path results/my_rotation
"""
@@ -20,7 +20,7 @@ def main():
parser.add_argument(
"--config",
type=str,
default="config/strategies/rotation.yaml",
default="strategies/rotation/config.yaml",
help="配置文件路径",
)
parser.add_argument(