feat(strategy): 分组选股增强-大类冠军二次过滤确保组合动量达标
核心改进: - selectors.py: _grouped_selection增加二次过滤,大类冠军得分不足时跳过该大类 - strategy.py: min_score参数可配置,从策略配置读取 - config.yaml: min_score=0.0(过滤负动量),保留注释说明更高阈值的权衡 设计原则: - 组合中每个标的动量得分都必须>=min_score - 大类冠军得分不足时不强制持有,持仓数量动态调整 - min_score=0保持简单稳健,更高阈值虽能改善回撤但可能错过机会 实验验证: - min_score=0: 累计收益14580%, 最大回撤-61.1%, 空仓131天 - min_score=0.02: 累计收益17052%, 最大回撤-61.0%, 但2000年恶化 - 决策:保持min_score=0,避免阈值选择的trick问题
This commit is contained in:
@@ -69,7 +69,7 @@ class RotationStrategy(StrategyBase):
|
||||
self._selector = TopNSelector(
|
||||
select_num=self.select_num,
|
||||
group_mapping=self._group_mapping,
|
||||
min_score=0.0,
|
||||
min_score=self.min_score, # 从配置读取,支持动态调整阈值
|
||||
rebalance_days=self.rebalance_days,
|
||||
rebalance_threshold=self.rebalance_threshold
|
||||
)
|
||||
@@ -93,6 +93,7 @@ class RotationStrategy(StrategyBase):
|
||||
self.rebalance_days = config.get('rebalance_days', self.rebalance_days)
|
||||
self.rebalance_threshold = config.get('rebalance_threshold', self.rebalance_threshold)
|
||||
self.trade_cost = config.get('trade_cost', self.trade_cost)
|
||||
self.min_score = config.get('min_score', 0.0) # 动量最低阈值,默认过滤负动量
|
||||
self.start_date = config.get('start_date', '2019-01-01')
|
||||
self.end_date = config.get('end_date', datetime.now().strftime('%Y-%m-%d'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user