You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
521 B
18 lines
521 B
|
|
|
|
```python
|
|
# 行业动量因子(相对强度)
|
|
group_rank(ts_mean(close / close[3], 3), 'industry')
|
|
|
|
# 行业估值修复因子(均值回归)
|
|
group_rank(ts_mean(close, 3) / close, 'industry')
|
|
|
|
# 行业资金流向因子(量价结合)
|
|
group_rank(ts_sum(volume * (close - close[1]), 3), 'industry')
|
|
|
|
# 行业波动率特征因子(风险调整)
|
|
group_rank(1 / (ts_std(close / close[1], 3) + 1e-8), 'industry')
|
|
|
|
# 行业间相对强度因子(横截面)
|
|
group_rank(close / ts_max(close, 3), 'industry')
|
|
``` |