holds_concepts_effect
- czsc.sensors.holds_concepts_effect(holds: DataFrame, concepts: dict, top_n=20, min_n=3, **kwargs)[source]
股票持仓列表的板块效应
原理概述:在选股时,如果股票的概念板块与组合中的其他股票的概念板块有重合,那么这个股票的表现会更好。
- Parameters:
holds –
组合股票池数据,样例:
dt
symbol
weight
2023-05-09 00:00:00
601858.SH
0.00333333
2023-05-09 00:00:00
300502.SZ
0.00333333
2023-05-09 00:00:00
603258.SH
0.00333333
2023-05-09 00:00:00
300499.SZ
0.00333333
2023-05-09 00:00:00
300624.SZ
0.00333333
concepts –
股票的概念板块,样例: {
’002507.SZ’: [‘电子商务’, ‘超级品牌’, ‘国企改革’], ‘002508.SZ’: [‘家用电器’, ‘杭州亚运会’, ‘恒大概念’]
}
top_n – 选取前 n 个密集概念
min_n – 单股票至少要有 n 个概念在 top_n 中
- Returns:
过滤后的选股结果,每个时间点的 top_n 概念