clean(rotation): add simple rotation strategy and remove unused files
New: - rotation/simple_rotation.py: daily-iteration rotation strategy (584 lines) - rotation/config_loader.py: standalone config loader - rotation/config_simple.yaml: 11 assets, 7 groups - rotation/README_SIMPLE.md: usage guide - scripts/get_trading_calendar.py: trading calendar fetcher Removed: - rotation/example_usage.py, run_strategy.py (replaced by simple_rotation.py) - rotation/results/ output files (gitignored) - scripts/verify_*.py, calculate_returns_from_detail.py (one-off scripts) - scripts/README_TRADING_CALENDAR.md Backtest result (2020-01-10 ~ 2026-06-01): - Total return: 1237.6%, Annual: 52.66% - Max drawdown: -11.71%, Sharpe: 2.50
This commit is contained in:
@@ -72,7 +72,18 @@ def run_backtest():
|
||||
print("=" * 70)
|
||||
|
||||
strategy = GlobalRotationStrategy(config)
|
||||
result = strategy.run()
|
||||
|
||||
# 运行回测并导出 detail
|
||||
output_dir = project_root / "framework_v2" / "results"
|
||||
output_dir.mkdir(exist_ok=True)
|
||||
|
||||
detail_path = output_dir / "backtest_detail_v2.json"
|
||||
print(f"\n导出 detail JSON: {detail_path}")
|
||||
|
||||
result = strategy.run(
|
||||
export_detail=True,
|
||||
detail_path=str(detail_path)
|
||||
)
|
||||
|
||||
# 打印结果
|
||||
print("\n" + "=" * 70)
|
||||
|
||||
Reference in New Issue
Block a user