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:
@@ -34,7 +34,7 @@ def run_with_legacy_report():
|
||||
"""运行新框架回测并生成原引擎格式报告"""
|
||||
|
||||
# 加载配置
|
||||
config_path = 'config/strategies/rotation.yaml'
|
||||
config_path = 'strategies/rotation/config.yaml'
|
||||
with open(config_path, 'r', encoding='utf-8') as f:
|
||||
config = yaml.safe_load(f)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user