Files
etf/archive/README.md

77 lines
2.8 KiB
Markdown
Raw Permalink 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.

# 归档代码说明
本目录存放已重构迁移的旧代码,保留用于参考和过渡期兼容。
## 目录结构
```
archive/
├── legacy_core/ # 旧核心模块
│ ├── core/ # 原core目录
│ │ ├── common/ # 通用工具notify, oss_utils, utils等
│ │ ├── datasource/ # 数据源hybrid_source, yfinance_source等
│ │ └── factors/ # 因子计算momentum, technical
│ ├── engine.py # 原轮动策略引擎
│ ├── portfolio.py # 原持仓跟踪
│ └── report.py # 原报告生成
├── legacy_scripts/ # 旧脚本入口
│ ├── scripts/
│ │ ├── daily_scheduler.py # 原定时调度
│ │ ├── run_rotation.py # 原回测入口
│ │ └── run_cci_screener.py # CCI选股入口
├── legacy_examples/ # 旧示例文件
│ ├── examples/
│ │ ├── flask_api_client.py
│ │ └ universal_fetcher_examples.py
├── legacy_tests/ # 旧测试文件
│ ├── tests/
│ │ ├── experiments/ # A/B测试等实验
│ │ ├── utils/ # 工具测试
│ │ ├── framework_comparison_test.py
│ │ ├── full_backtest_comparison.py
│ │ └ ...
├── legacy_screener/ # 旧筛选器模块
│ ├── base.py # Screener抽象基类已被framework/signals覆盖
│ └── cci.py # CCI超卖筛选器依赖已归档的core模块
└── single_files/ # 单独文件
├── fetch_159516_nav.py
├── fetch_159930.py
├── 动量.py
├── 全球市场.py
├── index_basic.csv
├── index_fund_info.csv
├── Dockerfile.flask
└── start_flask_server.sh
```
## 新框架位置
重构后的新代码位于:
- `framework/` - 抽象接口层
- `strategies/shared/` - 定制组件层
- `strategies/rotation/strategy.py` - 新策略实现
## 过渡说明
1. **数据源**:原`core/datasource/hybrid_source.py`功能待迁移到`strategies/shared/data/sources.py`
2. **回测引擎**:原`strategies/rotation/engine.py`功能已迁移到`framework/execution/__init__.py`
3. **因子计算**:原`core/factors/momentum.py`功能已迁移到`strategies/shared/factors/momentum.py`
4. **报告生成**:原`strategies/rotation/report.py`功能保留在`visualization/report_generator/`
## 归档时间
- 日期2025-05-11
- 原因:框架抽象化重构,分离通用能力与定制代码
## 更新记录
- 2025-05-11移除 strategies/screener/ → archive/legacy_screener/
---
*本目录内容仅供参考新功能请使用framework和strategies/shared目录*