- OHLCVData: 标准化K线数据结构 - DataSource: 数据源抽象接口(fetch/fetch_batch) - DataCache: 缓存抽象接口(get/set/is_fresh) - LocalFileCache: 本地文件缓存实现 - HybridDataSourceAdapter/TushareDataSource/YFinanceDataSource: 定制数据源适配器
60 lines
1.1 KiB
Python
60 lines
1.1 KiB
Python
"""
|
||
框架统一入口(通用)
|
||
|
||
只导出抽象接口,具体实现在strategies/shared/
|
||
"""
|
||
|
||
# 因子层抽象
|
||
from framework.factors import FactorBase, FactorRegistry, FactorCombiner
|
||
|
||
# 信号层抽象
|
||
from framework.signals import SignalGenerator
|
||
|
||
# 风控层抽象
|
||
from framework.risk import Position, RiskControl, CallbackHook
|
||
|
||
# 策略层抽象
|
||
from framework.strategy import StrategyBase
|
||
|
||
# 执行层抽象
|
||
from framework.execution import Portfolio, Executor, BacktestExecutor, DryRunExecutor
|
||
|
||
# 配置层
|
||
from framework.config import ConfigLoader, StrategyConfig
|
||
|
||
# 数据层抽象
|
||
from framework.data import OHLCVData, DataSource, DataCache
|
||
|
||
|
||
__all__ = [
|
||
# 因子层
|
||
'FactorBase',
|
||
'FactorRegistry',
|
||
'FactorCombiner',
|
||
|
||
# 信号层
|
||
'SignalGenerator',
|
||
|
||
# 风控层
|
||
'Position',
|
||
'RiskControl',
|
||
'CallbackHook',
|
||
|
||
# 策略层
|
||
'StrategyBase',
|
||
|
||
# 执行层
|
||
'Portfolio',
|
||
'Executor',
|
||
'BacktestExecutor',
|
||
'DryRunExecutor',
|
||
|
||
# 配置层
|
||
'ConfigLoader',
|
||
'StrategyConfig',
|
||
|
||
# 数据层
|
||
'OHLCVData',
|
||
'DataSource',
|
||
'DataCache',
|
||
] |