新增美股轮动策略模块: - strategies/us_rotation/config.yaml: 47只美股标的池,动量窗口250天,Top5选股 - strategies/us_rotation/strategy.py: USRotationStrategy实现 - run_us_rotation.py: 回测入口脚本 回测结果 (2016-2026, 约10年): - 总收益: 7675% (年化52.49%) - 基准NDX收益: 540% (年化19.72%) - 超额年化收益: 32.78% - 夏普比率: 1.33 (基准0.80) - 最大回撤: 42.15% - 卡玛比率: 1.25 - 胜率: 56.1% - 平均持仓: 2.7天 年度最佳: 2020年+221% (超额176%) 年度防守: 2022年-10.5% (基准-33.7%, 超额+23.3%) 持仓Top5: NVDA(35.8%), AMD(30.1%), SHOP(26%), AVGO(23.9%), FICO(23.3%)
194 lines
3.7 KiB
YAML
194 lines
3.7 KiB
YAML
# 美股轮动策略配置
|
||
|
||
# ==================== 候选池配置 ====================
|
||
code_list:
|
||
# 科技巨头
|
||
"AAPL":
|
||
name: "Apple"
|
||
sector: "Technology"
|
||
"ADBE":
|
||
name: "Adobe"
|
||
sector: "Technology"
|
||
"AMD":
|
||
name: "AMD"
|
||
sector: "Technology"
|
||
"AMZN":
|
||
name: "Amazon"
|
||
sector: "Technology"
|
||
"ASML":
|
||
name: "ASML"
|
||
sector: "Technology"
|
||
"AVGO":
|
||
name: "Broadcom"
|
||
sector: "Technology"
|
||
"CRM":
|
||
name: "Salesforce"
|
||
sector: "Technology"
|
||
"CRWD":
|
||
name: "CrowdStrike"
|
||
sector: "Technology"
|
||
"CSCO":
|
||
name: "Cisco"
|
||
sector: "Technology"
|
||
"FICO":
|
||
name: "FICO"
|
||
sector: "Technology"
|
||
"GOOGL":
|
||
name: "Google"
|
||
sector: "Technology"
|
||
"INTC":
|
||
name: "Intel"
|
||
sector: "Technology"
|
||
"KLAC":
|
||
name: "KLA"
|
||
sector: "Technology"
|
||
"LRCX":
|
||
name: "Lam Research"
|
||
sector: "Technology"
|
||
"META":
|
||
name: "Meta"
|
||
sector: "Technology"
|
||
"MSFT":
|
||
name: "Microsoft"
|
||
sector: "Technology"
|
||
"MU":
|
||
name: "Micron"
|
||
sector: "Technology"
|
||
"NET":
|
||
name: "Cloudflare"
|
||
sector: "Technology"
|
||
"NFLX":
|
||
name: "Netflix"
|
||
sector: "Technology"
|
||
"NVDA":
|
||
name: "NVIDIA"
|
||
sector: "Technology"
|
||
"ORCL":
|
||
name: "Oracle"
|
||
sector: "Technology"
|
||
"PANW":
|
||
name: "Palo Alto"
|
||
sector: "Technology"
|
||
"PLTR":
|
||
name: "Palantir"
|
||
sector: "Technology"
|
||
"QCOM":
|
||
name: "Qualcomm"
|
||
sector: "Technology"
|
||
"SNOW":
|
||
name: "Snowflake"
|
||
sector: "Technology"
|
||
"TSLA":
|
||
name: "Tesla"
|
||
sector: "Technology"
|
||
"TSM":
|
||
name: "TSMC"
|
||
sector: "Technology"
|
||
|
||
# 金融
|
||
"AXP":
|
||
name: "American Express"
|
||
sector: "Financial"
|
||
"BAC":
|
||
name: "Bank of America"
|
||
sector: "Financial"
|
||
"C":
|
||
name: "Citigroup"
|
||
sector: "Financial"
|
||
"GS":
|
||
name: "Goldman Sachs"
|
||
sector: "Financial"
|
||
"JPM":
|
||
name: "JPMorgan"
|
||
sector: "Financial"
|
||
"MA":
|
||
name: "Mastercard"
|
||
sector: "Financial"
|
||
"MS":
|
||
name: "Morgan Stanley"
|
||
sector: "Financial"
|
||
|
||
# 消费零售
|
||
"COST":
|
||
name: "Costco"
|
||
sector: "Consumer"
|
||
"LULU":
|
||
name: "Lululemon"
|
||
sector: "Consumer"
|
||
"PDD":
|
||
name: "PDD Holdings"
|
||
sector: "Consumer"
|
||
"SHOP":
|
||
name: "Shopify"
|
||
sector: "Consumer"
|
||
|
||
# 医药健康
|
||
"LLY":
|
||
name: "Eli Lilly"
|
||
sector: "Healthcare"
|
||
"NVO":
|
||
name: "Novo Nordisk"
|
||
sector: "Healthcare"
|
||
|
||
# 其他
|
||
"CAT":
|
||
name: "Caterpillar"
|
||
sector: "Industrial"
|
||
"COIN":
|
||
name: "Coinbase"
|
||
sector: "Crypto"
|
||
"CRCL":
|
||
name: "Circle"
|
||
sector: "Crypto"
|
||
"FUTU":
|
||
name: "Futu"
|
||
sector: "Financial"
|
||
"HOOD":
|
||
name: "Robinhood"
|
||
sector: "Financial"
|
||
"SAP":
|
||
name: "SAP"
|
||
sector: "Technology"
|
||
"SCCO":
|
||
name: "Southern Copper"
|
||
sector: "Materials"
|
||
|
||
# ==================== 基准配置 ====================
|
||
benchmark:
|
||
code: "NDX"
|
||
name: "纳斯达克100"
|
||
|
||
# ==================== 回测参数 ====================
|
||
start_date: "2016-01-01"
|
||
|
||
# ==================== 因子参数 ====================
|
||
# 动量窗口(天数)
|
||
n_days: 250
|
||
# 因子类型
|
||
factor_type: "momentum"
|
||
|
||
# ==================== 轮动参数 ====================
|
||
# 不分组,直接选 Top N
|
||
diversified: false
|
||
select_num: 5
|
||
|
||
# ==================== 调仓控制 ====================
|
||
# 每日调仓
|
||
rebalance_days: 1
|
||
# 调仓阈值:新组合得分超过当前组合 X% 才触发调仓
|
||
rebalance_threshold: 0.0
|
||
# 交易成本(双边)
|
||
trade_cost: 0.001
|
||
|
||
# ==================== 数据缓存 ====================
|
||
use_cache: true
|
||
|
||
# ==================== 数据源配置 ====================
|
||
# SSH 隧道配置(用于 yfinance)
|
||
ssh_tunnel:
|
||
enabled: true
|
||
host: "8.218.167.69"
|
||
port: 22
|
||
username: "root"
|
||
key_path: "hk_ecs.pem"
|
||
local_port: 1080 |