- strategies/shared/factors/momentum.py: MomentumFactor/TrendFactor/ReversalFactor/VolatilityFactor - strategies/shared/signals/selectors.py: TopNSelector/TrendFollower/ReversalTrader - strategies/shared/risk/controls.py: StopLossControl/PositionLimitControl/PremiumControl - strategies/shared/__init__.py: 统一入口导出所有定制组件
54 lines
1.0 KiB
Python
54 lines
1.0 KiB
Python
"""
|
|
定制组件统一入口
|
|
|
|
所有定制因子、信号生成器、风控组件都在这里导出
|
|
"""
|
|
|
|
# 定制因子
|
|
from strategies.shared.factors.momentum import (
|
|
MomentumFactor,
|
|
TrendFactor,
|
|
ReversalFactor,
|
|
VolatilityFactor
|
|
)
|
|
|
|
# 定制信号生成器
|
|
from strategies.shared.signals.selectors import (
|
|
TopNSelector,
|
|
TrendFollower,
|
|
ReversalTrader
|
|
)
|
|
|
|
# 定制风控组件
|
|
from strategies.shared.risk.controls import (
|
|
StopLossControl,
|
|
PositionLimitControl,
|
|
PremiumControl,
|
|
premium_filter_callback,
|
|
crash_filter_callback,
|
|
holding_time_stoploss_callback
|
|
)
|
|
|
|
|
|
__all__ = [
|
|
# 因子
|
|
'MomentumFactor',
|
|
'TrendFactor',
|
|
'ReversalFactor',
|
|
'VolatilityFactor',
|
|
|
|
# 信号生成器
|
|
'TopNSelector',
|
|
'TrendFollower',
|
|
'ReversalTrader',
|
|
|
|
# 风控组件
|
|
'StopLossControl',
|
|
'PositionLimitControl',
|
|
'PremiumControl',
|
|
|
|
# 回调函数
|
|
'premium_filter_callback',
|
|
'crash_filter_callback',
|
|
'holding_time_stoploss_callback',
|
|
] |