Files
etf/config/strategies/rotation.yaml
aszerW 988c2335fb chore(config): 添加环境变量示例及.gitignore更新
- 新增 .env.example,包含 Tushare API、钉钉机器人和PostgreSQL数据库配置模板
- 更新.gitignore,忽略本地配置文件如 .env.local 和 config_local.py
- 添加对报表文件命名规则的支持,保留示例文件不忽略
- 删除废弃的 chart.py 及相关图表模块代码
- 新增 config/settings.py,实现从环境变量读取配置的统一接口
- 设置数据目录及缓存目录,确保目录存在,提高配置管理规范性
2026-03-18 23:33:40 +08:00

57 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ETF轮动策略配置
# ==================== 候选池配置 ====================
# A股全行业指数代码列表Tushare格式XXXXXX.SH / XXXXXX.SZ
code_list:
# 宽基指数
- "000300.SH" # 沪深300大盘蓝筹
- "000905.SH" # 中证500中盘成长
- "000852.SH" # 中证1000小盘
- "399006.SZ" # 创业板指(创业板龙头)
- "000015.SH" # 上证红利(高股息价值)
# 金融
- "399986.SZ" # 中证银行
# 消费
- "399997.SZ" # 中证白酒
# 医药健康
- "399989.SZ" # 中证医疗
# 科技信息
- "000935.SH" # 中证信息技术
# 新能源
- "399976.SZ" # 新能源汽车
# 周期资源
- "399395.SZ" # 国证有色金属
- "399998.SZ" # 中证煤炭
- "399813.SZ" # 细分化工
- "000937.SH" # 中证能源
# 其他行业
- "399967.SZ" # 中证军工
- "000949.SH" # 中证农业
- "399702.SZ" # 中证国债指数
# ==================== 回测参数 ====================
start_date: "2018-01-01"
end_date: "2025-03-17"
# ==================== 因子参数 ====================
# 动量/趋势窗口期(天数)
n_days: 25
# 因子类型:'momentum'N日涨幅或 'slope_r2'斜率×
factor_type: "slope_r2"
# ==================== 轮动参数 ====================
# 每次轮动选中的ETF数量1=全仓单一品种)
select_num: 5
# ==================== 调仓控制 ====================
# 最低调仓周期(交易日):持仓至少持有 N 天后才允许换仓
rebalance_days: 1
# 调仓得分阈值:新组合总得分需超过当前组合 X% 才触发调仓
rebalance_threshold: 0.0
# 单次换仓成本(双边,含佣金+滑点)
trade_cost: 0.001
# ==================== 数据缓存 ====================
# 是否使用本地缓存True=优先从本地读取)
use_cache: true