feat(factors): 添加 cs_mean 函数并增强 max_/min_ 单参数支持
- 新增 cs_mean 截面均值函数,支持 GTJA Alpha127 等因子转换 - max_/min_ 支持单参数调用,默认使用 252 天(约 1 年)滚动窗口
This commit is contained in:
@@ -86,7 +86,9 @@ SELECTED_FACTORS = [
|
||||
]
|
||||
|
||||
# 因子定义字典(完整因子库,用于存放尚未注册到metadata的因子)
|
||||
FACTOR_DEFINITIONS = {}
|
||||
FACTOR_DEFINITIONS = {
|
||||
'test': '[([(col("close")) - (col("close").shift([dyn int: 5]).over([col("ts_code")]))]) / (col("close").shift([dyn int: 5]).over([col("ts_code")]))]'
|
||||
}
|
||||
|
||||
|
||||
def get_label_factor(label_name: str) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user