旗舰版会员

Alpha158因子构建公式

由bigquantfactorbuilder1创建,最终由bigquantfactorbuilder1 被浏览 1 用户

Alpha158 因子总览(共158个)


来源:微软 Qlib 官方 Alpha158,日频 OHLCV 价量因子。文档链接https://bigquant.com/wiki/doc/nODcNAKYPJ

一、K线基础因子(9个)

  1. KMID = (close-open)/open —— 实体涨跌幅
  2. KLEN = (high-low)/open —— 日内振幅
  3. KMID2 = (close-open)/(high-low+1e-12) —— 实体占比
  4. KUP = (high-max(open,close))/open —— 上影线比例
  5. KUP2 = (high-max(open,close))/(high-low+1e-12) —— 上影线占振幅比
  6. KLOW = (min(open,close)-low)/open —— 下影线比例
  7. KLOW2 = (min(open,close)-low)/(high-low+1e-12) —— 下影线占振幅比
  8. KSFT = (2*close-high-low)/open —— 日内重心偏移
  9. KSFT2 = (2*close-high-low)/(high-low+1e-12) —— 重心偏移占振幅比

二、价格比因子(4个)

  1. OPEN0 = open/close —— 开盘相对收盘
  2. HIGH0 = high/close —— 最高相对收盘
  3. LOW0 = low/close —— 最低相对收盘
  4. VWAP0 = vwap/close —— 均价相对收盘

三、成交量比因子(4个)

  1. VOLUME0 = volume/(volume+1e-12) —— 成交量归一
  2. VOLUME1 = volume/mean(volume,5) —— 成交量相对5日均量
  3. VOLUME2 = volume/mean(volume,10) —— 成交量相对10日均量
  4. VOLUME3 = volume/mean(volume,20) —— 成交量相对20日均量

四、价格滚动因子(5日/10日/20日/30日/60日,共5×15=75个)

(1)均值类(MA)

  1. MA5 = mean(close,5)/close —— 5日均价相对收盘
  2. MA10 = mean(close,10)/close —— 10日均价相对收盘
  3. MA20 = mean(close,20)/close —— 20日均价相对收盘
  4. MA30 = mean(close,30)/close —— 30日均价相对收盘
  5. MA60 = mean(close,60)/close —— 60日均价相对收盘

(2)标准差类(STD)

  1. STD5 = std(close,5)/mean(close,5) —— 5日波动率
  2. STD10 = std(close,10)/mean(close,10) —— 10日波动率
  3. STD20 = std(close,20)/mean(close,20) —— 20日波动率
  4. STD30 = std(close,30)/mean(close,30) —— 30日波动率
  5. STD60 = std(close,60)/mean(close,60) —— 60日波动率

(3)涨幅类(ROC)

  1. ROC5 = (close-delay(close,5))/delay(close,5) —— 5日收益率
  2. ROC10 = (close-delay(close,10))/delay(close,10) —— 10日收益率
  3. ROC20 = (close-delay(close,20))/delay(close,20) —— 20日收益率
  4. ROC30 = (close-delay(close,30))/delay(close,30) —— 30日收益率
  5. ROC60 = (close-delay(close,60))/delay(close,60) —— 60日收益率

(4)最高相对类(HIGH_RET)

  1. HIGH5 = (high-delay(close,5))/delay(close,5) —— 5日最高相对期初
  2. HIGH10 = (high-delay(close,10))/delay(close,10) —— 10日最高相对期初
  3. HIGH20 = (high-delay(close,20))/delay(close,20) —— 20日最高相对期初
  4. HIGH30 = (high-delay(close,30))/delay(close,30) —— 30日最高相对期初
  5. HIGH60 = (high-delay(close,60))/delay(close,60) —— 60日最高相对期初

(5)最低相对类(LOW_RET)

  1. LOW5 = (low-delay(close,5))/delay(close,5) —— 5日最低相对期初
  2. LOW10 = (low-delay(close,10))/delay(close,10) —— 10日最低相对期初
  3. LOW20 = (low-delay(close,20))/delay(close,20) —— 20日最低相对期初
  4. LOW30 = (low-delay(close,30))/delay(close,30) —— 30日最低相对期初
  5. LOW60 = (low-delay(close,60))/delay(close,60) —— 60日最低相对期初

(6)偏度类(SKEW)

  1. SKEW5 = skew(close,5) —— 5日价格偏度
  2. SKEW10 = skew(close,10) —— 10日价格偏度
  3. SKEW20 = skew(close,20) —— 20日价格偏度
  4. SKEW30 = skew(close,30) —— 30日价格偏度
  5. SKEW60 = skew(close,60) —— 60日价格偏度

(7)峰度类(KURT)

  1. KURT5 = kurt(close,5) —— 5日价格峰度
  2. KURT10 = kurt(close,10) —— 10日价格峰度
  3. KURT20 = kurt(close,20) —— 20日价格峰度
  4. KURT30 = kurt(close,30) —— 30日价格峰度
  5. KURT60 = kurt(close,60) —— 60日价格峰度

(8)成交量均值类(VMA)

  1. VMA5 = mean(volume,5)/volume —— 5日量均相对当前
  2. VMA10 = mean(volume,10)/volume —— 10日量均相对当前
  3. VMA20 = mean(volume,20)/volume —— 20日量均相对当前
  4. VMA30 = mean(volume,30)/volume —— 30日量均相对当前
  5. VMA60 = mean(volume,60)/volume —— 60日量均相对当前

(9)成交量标准差类(VSTD)

  1. VSTD5 = std(volume,5)/mean(volume,5) —— 5日量波动率
  2. VSTD10 = std(volume,10)/mean(volume,10) —— 10日量波动率
  3. VSTD20 = std(volume,20)/mean(volume,20) —— 20日量波动率
  4. VSTD30 = std(volume,30)/mean(volume,30) —— 30日量波动率
  5. VSTD60 = std(volume,60)/mean(volume,60) —— 60日量波动率

(10)量价相关类(CORR)

  1. CORR5 = corr(close,volume,5) —— 5日量价相关系数
  2. CORR10 = corr(close,volume,10) —— 10日量价相关系数
  3. CORR20 = corr(close,volume,20) —— 20日量价相关系数
  4. CORR30 = corr(close,volume,30) —— 30日量价相关系数
  5. CORR60 = corr(close,volume,60) —— 60日量价相关系数

(11)相对强弱(RSV)

  1. RSV5 = (close-min(low,5))/(max(high,5)-min(low,5)+1e-12) —— 5日RSV
  2. RSV10 = (close-min(low,10))/(max(high,10)-min(low,10)+1e-12) —— 10日RSV
  3. RSV20 = (close-min(low,20))/(max(high,20)-min(low,20)+1e-12) —— 20日RSV
  4. RSV30 = (close-min(low,30))/(max(high,30)-min(low,30)+1e-12) —— 30日RSV
  5. RSV60 = (close-min(low,60))/(max(high,60)-min(low,60)+1e-12) —— 60日RSV

(12)布林中轨(BOLL)

  1. BOLL5 = (close-mean(close,5))/std(close,5) —— 5日布林位置
  2. BOLL10 = (close-mean(close,10))/std(close,10) —— 10日布林位置
  3. BOLL20 = (close-mean(close,20))/std(close,20) —— 20日布林位置
  4. BOLL30 = (close-mean(close,30))/std(close,30) —— 30日布林位置
  5. BOLL60 = (close-mean(close,60))/std(close,60) —— 60日布林位置

(13)乖离率(BIAS)

  1. BIAS5 = (close-mean(close,5))/mean(close,5) —— 5日乖离率
  2. BIAS10 = (close-mean(close,10))/mean(close,10) —— 10日乖离率
  3. BIAS20 = (close-mean(close,20))/mean(close,20) —— 20日乖离率
  4. BIAS30 = (close-mean(close,30))/mean(close,30) —— 30日乖离率
  5. BIAS60 = (close-mean(close,60))/mean(close,60) —— 60日乖离率

(14)价格分位数(QTL)

  1. QTL5 = quantile(close,5,0.5) —— 5日价格中位数
  2. QTL10 = quantile(close,10,0.5) —— 10日价格中位数
  3. QTL20 = quantile(close,20,0.5) —— 20日价格中位数
  4. QTL30 = quantile(close,30,0.5) —— 30日价格中位数
  5. QTL60 = quantile(close,60,0.5) —— 60日价格中位数

(15)成交量分位数(VQTL)

  1. VQTL5 = quantile(volume,5,0.5) —— 5日量中位数
  2. VQTL10 = quantile(volume,10,0.5) —— 10日量中位数
  3. VQTL20 = quantile(volume,20,0.5) —— 20日量中位数
  4. VQTL30 = quantile(volume,30,0.5) —— 30日量中位数
  5. VQTL60 = quantile(volume,60,0.5) —— 60日量中位数

五、量价衍生因子(26个)

  1. TVMA5 = mean(volume*close,5)/mean(volume,5) —— 5日成交均价
  2. TVMA10 = mean(volume*close,10)/mean(volume,10) —— 10日成交均价
  3. TVMA20 = mean(volume*close,20)/mean(volume,20) —— 20日成交均价
  4. TVMA30 = mean(volume*close,30)/mean(volume,30) —— 30日成交均价
  5. TVMA60 = mean(volume*close,60)/mean(volume,60) —— 60日成交均价
  6. PCT_CHG5 = (close-delay(close,5))/delay(close,5) —— 5日涨跌幅(同ROC5)
  7. PCT_CHG10 = (close-delay(close,10))/delay(close,10) —— 10日涨跌幅(同ROC10)
  8. PCT_CHG20 = (close-delay(close,20))/delay(close,20) —— 20日涨跌幅(同ROC20)
  9. PCT_CHG30 = (close-delay(close,30))/delay(close,30) —— 30日涨跌幅(同ROC30)
  10. PCT_CHG60 = (close-delay(close,60))/delay(close,60) —— 60日涨跌幅(同ROC60)
  11. MAX_HIGH5 = max(high,5)/close —— 5日最高相对当前收盘
  12. MAX_HIGH10 = max(high,10)/close —— 10日最高相对当前收盘
  13. MAX_HIGH20 = max(high,20)/close —— 20日最高相对当前收盘
  14. MAX_HIGH30 = max(high,30)/close —— 30日最高相对当前收盘
  15. MAX_HIGH60 = max(high,60)/close —— 60日最高相对当前收盘
  16. MIN_LOW5 = min(low,5)/close —— 5日最低相对当前收盘
  17. MIN_LOW10 = min(low,10)/close —— 10日最低相对当前收盘
  18. MIN_LOW20 = min(low,20)/close —— 20日最低相对当前收盘
  19. MIN_LOW30 = min(low,30)/close —— 30日最低相对当前收盘
  20. MIN_LOW60 = min(low,60)/close —— 60日最低相对当前收盘
  21. RANGE5 = (max(high,5)-min(low,5))/mean(close,5) —— 5日价格区间
  22. RANGE10 = (max(high,10)-min(low,10))/mean(close,10) —— 10日价格区间
  23. RANGE20 = (max(high,20)-min(low,20))/mean(close,20) —— 20日价格区间
  24. RANGE30 = (max(high,30)-min(low,30))/mean(close,30) —— 30日价格区间
  25. RANGE60 = (max(high,60)-min(low,60))/mean(close,60) —— 60日价格区间

六、回归与残差因子(15个)

  1. BETA5 = regbeta(close,sequence(5)) —— 5日价格趋势斜率
  2. BETA10 = regbeta(close,sequence(10)) —— 10日价格趋势斜率
  3. BETA20 = regbeta(close,sequence(20)) —— 20日价格趋势斜率
  4. BETA30 = regbeta(close,sequence(30)) —— 30日价格趋势斜率
  5. BETA60 = regbeta(close,sequence(60)) —— 60日价格趋势斜率
  6. RSQR5 = regrsqr(close,sequence(5)) —— 5日回归R²
  7. RSQR10 = regrsqr(close,sequence(10)) —— 10日回归R²
  8. RSQR20 = regrsqr(close,sequence(20)) —— 20日回归R²
  9. RSQR30 = regrsqr(close,sequence(30)) —— 30日回归R²
  10. RSQR60 = regrsqr(close,sequence(60)) —— 60日回归R²
  11. RESID5 = regresid(close,sequence(5)) —— 5日回归残差
  12. RESID10 = regresid(close,sequence(10)) —— 10日回归残差
  13. RESID20 = regresid(close,sequence(20)) —— 20日回归残差
  14. RESID30 = regresid(close,sequence(30)) —— 30日回归残差
  15. RESID60 = regresid(close,sequence(60)) —— 60日回归残差

七、动量与反转因子(11个)

  1. MOM5 = close-delay(close,5) —— 5日价格动量
  2. MOM10 = close-delay(close,10) —— 10日价格动量
  3. MOM20 = close-delay(close,20) —— 20日价格动量
  4. MOM30 = close-delay(close,30) —— 30日价格动量
  5. MOM60 = close-delay(close,60) —— 60日价格动量
  6. REV5 = -1 * (close-delay(close,5)) —— 5日价格反转
  7. REV10 = -1 * (close-delay(close,10)) —— 10日价格反转
  8. REV20 = -1 * (close-delay(close,20)) —— 20日价格反转
  9. REV30 = -1 * (close-delay(close,30)) —— 30日价格反转
  10. REV60 = -1 * (close-delay(close,60)) —— 60日价格反转
  11. VOL_MOM5 = volume-delay(volume,5) —— 5日成交量动量

八、波动率与流动性因子(15个)

  1. VOLATILITY5 = std(close,5) —— 5日价格波动率
  2. VOLATILITY10 = std(close,10) —— 10日价格波动率
  3. VOLATILITY20 = std(close,20) —— 20日价格波动率
  4. VOLATILITY30 = std(close,30) —— 30日价格波动率
  5. VOLATILITY60 = std(close,60) —— 60日价格波动率
  6. LIQUIDITY5 = mean(volume,5)/std(volume,5) —— 5日流动性
  7. LIQUIDITY10 = mean(volume,10)/std(volume,10) —— 10日流动性
  8. LIQUIDITY20 = mean(volume,20)/std(volume,20) —— 20日流动性
  9. LIQUIDITY30 = mean(volume,30)/std(volume,30) —— 30日流动性
  10. LIQUIDITY60 = mean(volume,60)/std(volume,60) —— 60日流动性
  11. AMOUNT5 = mean(volume*close,5) —— 5日成交金额均值
  12. AMOUNT10 = mean(volume*close,10) —— 10日成交金额均值
  13. AMOUNT20 = mean(volume*close,20) —— 20日成交金额均值
  14. AMOUNT30 = mean(volume*close,30) —— 30日成交金额均值
  15. AMOUNT60 = mean(volume*close,60) —— 60日成交金额均值

说明

  • $open/$high/$low/$close/$volume 为当日价量;
  • delay(x,n) 为滞后n日;
  • mean/std/corr/skew/kurt/quantile/regbeta/regrsqr/regresid 为滚动窗口统计;
  • 1e-12 防止除零。
  • 所有因子均为纯时间序列、无截面依赖,适配机器学习模型输入。

\

{link}