feat(framework): 完成框架入口与集成测试

核心组件:
- ConfigLoader: 配置加载器(YAML支持)
- StrategyConfig: 策略配置数据类
- framework/__init__.py: 框架统一入口

导出接口:
- FactorBase, FactorRegistry, FactorCombiner
- SignalGenerator, TopNSelector, TrendFollower, ReversalTrader
- StrategyBase, RotationStrategy
- RiskControl, StopLossControl, PositionLimitControl
- Executor, BacktestExecutor, DryRunExecutor
- ConfigLoader

集成测试:
- 轮动策略完整流程验证
- 趋势策略完整流程验证
- 回调钩子完整流程验证

总计:62个测试全部通过,框架核心实现完成
This commit is contained in:
2026-05-11 22:19:26 +08:00
parent babf224203
commit 95c0d79172
3 changed files with 205 additions and 0 deletions

21
framework/__init__.py Normal file
View File

@@ -0,0 +1,21 @@
"""
量化策略通用框架
融合Freqtrade回调机制 + 模块化因子设计
"""
from .factors import FactorBase, FactorRegistry, FactorCombiner
from .signals import SignalGenerator, TopNSelector, TrendFollower, ReversalTrader
from .strategy import StrategyBase, RotationStrategy
from .risk import RiskControl, StopLossControl, PositionLimitControl
from .execution import Executor, BacktestExecutor, DryRunExecutor
from .config import ConfigLoader
__all__ = [
'FactorBase', 'FactorRegistry', 'FactorCombiner',
'SignalGenerator', 'TopNSelector', 'TrendFollower', 'ReversalTrader',
'StrategyBase', 'RotationStrategy',
'RiskControl', 'StopLossControl', 'PositionLimitControl',
'Executor', 'BacktestExecutor', 'DryRunExecutor',
'ConfigLoader',
]