优宽量化上线了基于 WorldQuant Alpha101 交易因子分析工具,为量化交易策略开发者提供了新式武器,通过分析因子帮助大家更好的理解市场,洞察金融市场背后的契机。
在介绍 Alpha101 之前,先了解一下什么是 Alpha?Alpha 指的是超额收益。举个例子:购买 100 万指数基金并一直持有,这是一个赚取市场被动收益的 Beta 策略。但如果你用 100 万买入 10 支股票,并且比购买指数基金多赚 10%,那么这 10%就是 Alpha 超额收益。大家别小看这个 Alpha 超额收益,事实上市场中大部分交易者包括基金经理都跑不赢指数,所以很多人绞尽脑汁来提升 Alpha 收益。当然这其中也有一些优秀的交易者和基金公司。
在 2015 年中,以擅长数据挖掘的 WorldQuant LLC 量化交易对冲基金公布了《WorldQuant Formulaic 101 Alphas》研究报告,其中公开了他们正在或曾经使用的 101 个 Alpha 表达式,其目的是给交易策略开发者提供更多的灵感和思路。很多人对 WorldQuant 公开的因子产生质疑,因为毕竟 A 股市场与国外的股票市场不一样。但事实证明,这些大部分因子在国内市场还是有效的。优宽量化对这些因子公式做了去重和修正,并在平台上对外开放,供所有用户使用。
在研究报告中,把 Alpha 分为三大类:价格因子、成交量因子、二分因子。
价格类因子
因子名称 | 因子公式 | 优宽量化注释 |
---|---|---|
Alpha#1 | (rank(ts*argmax(signedpower(((returns < 0) ? stddev(returns, 20) : close), 2.), 5)) - 0.5) | 趋势 |
Alpha#4 | (-1 * ts_rank(rank(low), 9)) | 反转 |
Alpha#5 | (rank((open - (sum(vwap, 10) / 10))) * (-1 _ abs(rank((close - vwap))))) | 反转 |
Alpha#8 | (-1 _ rank(((sum(open, 5) _ sum(returns, 5)) - delay((sum(open, 5) * sum(returns, 5)), 10)))) | 反转 |
Alpha#9 | ((0 < ts*min(delta(close, 1), 5)) ? delta(close, 1) : ((ts_max(delta(close, 1), 5) < 0) ? delta(close, 1) : (-1 * delta(close, 1)))) | 反转或趋势 |
Alpha#18 | (-1 * rank(((stddev(abs((close - open)), 5) + (close - open)) + correlation(close, open, 10)))) | 反转 |
Alpha#19 | ((-1 * sign(((close - delay(close, 7)) + delta(close, 7)))) _ (1 + rank((1 + sum(returns, 250))))) | 趋势背离 |
Alpha#20 | (((-1 * rank((open - delay(high, 1)))) _ rank((open - delay(close, 1)))) * rank((open - delay(low, 1)))) | 反转 |
Alpha#23 | (((sum(high, 20) / 20) < high) ? (-1 * delta(high, 2)) : 0) | 20 周期均线上的短期回归 |
Alpha#24 | ((((delta((sum(close, 100) / 100), 100) / delay(close, 100)) < 0.05) 或 ((delta((sum(close, 100) / 100), 100) / delay(close, 100)) == 0.05)) ? (-1 _ (close - ts_min(close, 100))) : (-1 _ delta(close, 3))) | 反转 |
Alpha#29 | (min(product(rank(rank(scale(log(sum(tsmin(rank(rank((-1 * rank(delta((close - 1), 5))))), 2), 1))))), 1), 5) + tsrank(delay((-1 * returns), 6), 5)) | 反转 |
Alpha#32 | (scale(((sum(close, 7) / 7) - close)) + (20 * scale(correlation(vwap, delay(close, 5), 230)))) | 反转 |
Alpha#33 | rank((-1 * ((1 - (open / close))^1))) | 反转 |
Alpha#34 | rank(((1 - rank((stddev(returns, 2) / stddev(returns, 5)))) + (1 - rank(delta(close, 1))))) | 反转 |
Alpha#37 | (rank(correlation(delay((open - close), 1), close, 200)) + rank((open - close))) | 统计 |
Alpha#38 | ((-1 _ rank(ts_rank(close, 10))) _ rank((close / open))) | 反转 |
Alpha#41 | (((high * low)^0.5) - vwap) | 反转 |
Alpha#42 | (rank((vwap - close)) / rank((vwap + close))) | 反转 |
Alpha#46 | ((0.25 < (((delay(close, 20) - delay(close, 10)) / 10) - ((delay(close, 10) - close) / 10))) ? (-1 _ 1) : (((((delay(close, 20) - delay(close, 10)) / 10) - ((delay(close, 10) - close) / 10)) < 0) ? 1 : ((-1 _ 1) * (close - delay(close, 1))))) | 反转 |
Alpha#48 | 未实现 | 未实现 |
Alpha#49 | (((((delay(close, 20) - delay(close, 10)) / 10) - ((delay(close, 10) - close) / 10)) < (-1 _ 0.1)) ? 1 : ((-1 _ 1) * (close - delay(close, 1)))) | 反转 |
Alpha#51 | (((((delay(close, 20) - delay(close, 10)) / 10) - ((delay(close, 10) - close) / 10)) < (-1 _ 0.05)) ? 1 : ((-1 _ 1) * (close - delay(close, 1)))) | 无 |
Alpha#53 | (-1 * delta((((close - low) - (high - close)) / (close - low)), 9)) | 反转 |
Alpha#54 | ((-1 _ ((low - close) _ (open^5))) / ((low - high) * (close^5))) | 反转 |
Alpha#56 | 未实现 | 未实现 |
Alpha#57 | (0 - (1 * ((close - vwap) / decay*linear(rank(ts_argmax(close, 30)), 2)))) | 反转 |
Alpha#60 | (0 - (1 * ((2 _ scale(rank(((((close - low) - (high - close)) / (high - low)) * volume)))) - scale(rank(ts*argmax(close, 10)))))) | 无 |
Alpha#66 | ((rank(decay_linear(delta(vwap, 3.51013), 7.23052)) + ts_rank(decay_linear(((((low * 0.96633) + (low _ (1 - 0.96633))) - vwap) / (open - ((high + low) / 2))), 11.4157), 6.72611)) * -1) | 反转 |
Alpha#73 | (max(rank(decay*linear(delta(vwap, 4.72775), 2.91864)), ts_rank(decay_linear(((delta(((open * 0.147155) + (low _ (1 - 0.147155))), 2.03608) / ((open _ 0.147155) + (low _ (1 - 0.147155)))) _ -1), 3.33829), 16.7411)) _ -1) | 反转 |
Alpha#84 | signedpower(ts_rank((vwap - ts_max(vwap, 15.3217)), 20.7127), delta(close, 4.96796)) | 无 |
Alpha#101 | ((close - open) / ((high - low) + .001)) | 反转 |
量价类因子
因子名称 | 因子公式 | 优宽量化注释 |
---|---|---|
Alpha#2 | (-1 * correlation(rank(delta(log(volume), 2)), rank(((close - open) / open)), 6)) | 量价背离 |
Alpha#3 | (-1 * correlation(rank(open), rank(volume), 10)) | 量价背离 |
Alpha#6 | (-1 * correlation(open, volume, 10)) | 量价背离 |
Alpha#7 | ((adv20 < volume) ? ((-1 _ ts_rank(abs(delta(close, 7)), 60)) _ sign(delta(close, 7))) : (-1 * 1)) | 无 |
Alpha#11 | ((rank(ts*max((vwap - close), 3)) + rank(ts_min((vwap - close), 3))) * rank(delta(volume, 3))) | 反转缩量 |
Alpha#12 | (sign(delta(volume, 1)) * (-1 _ delta(close, 1))) | 量价背离 |
Alpha#13 | (-1 * rank(covariance(rank(close), rank(volume), 5))) | 量价背离 |
Alpha#14 | ((-1 _ rank(delta(returns, 3))) _ correlation(open, volume, 10)) | 量价背离 |
Alpha#15 | (-1 * sum(rank(correlation(rank(high), rank(volume), 3)), 3)) | 量价背离 |
Alpha#16 | (-1 * rank(covariance(rank(high), rank(volume), 5))) | 量价背离 |
Alpha#17 | (((-1 _ rank(ts_rank(close, 10))) _ rank(delta(delta(close, 1), 1))) * rank(ts*rank((volume / adv20), 5))) | 反转缩量 |
Alpha#22 | (-1 * (delta(correlation(high, volume, 5), 5) _ rank(stddev(close, 20)))) | 量价背离 |
Alpha#25 | rank(((((-1 _ returns) _ adv20) _ vwap) _ (high - close))) | 无 |
Alpha#26 | (-1 * ts*max(correlation(ts_rank(volume, 5), ts_rank(high, 5), 5), 3)) | 量价背离 |
Alpha#28 | scale(((correlation(adv20, low, 5) + ((high + low) / 2)) - close)) | 背离反转 |
Alpha#30 | (((1.0 - rank(((sign((close - delay(close, 1))) + sign((delay(close, 1) - delay(close, 2)))) + sign((delay(close, 2) - delay(close, 3)))))) * sum(volume, 5)) / sum(volume, 20)) | 反转 |
Alpha#31 | ((rank(rank(rank(decay_linear((-1 * rank(rank(delta(close, 10)))), 10)))) + rank((-1 _ delta(close, 3)))) + sign(scale(correlation(adv20, low, 12)))) | 量价背离反转 |
Alpha#35 | ((tsrank(volume, 32) * (1 - tsrank(((close + high) - low), 16))) * (1 - ts*rank(returns, 32))) | 无 |
Alpha#36 | (((((2.21 * rank(correlation((close - open), delay(volume, 1), 15))) + (0.7 _ rank((open - close)))) + (0.73 _ rank(ts*rank(delay((-1 * returns), 6), 5)))) + rank(abs(correlation(vwap, adv20, 6)))) + (0.6 _ rank((((sum(close, 200) / 200) - open) _ (close - open))))) | 趋势 |
Alpha#39 | ((-1 _ rank((delta(close, 7) _ (1 - rank(decay*linear((volume / adv20), 9)))))) * (1 + rank(sum(returns, 250)))) | 量价背离反转 |
Alpha#40 | ((-1 * rank(stddev(high, 10))) _ correlation(high, volume, 10)) | 量价背离 |
Alpha#43 | (tsrank((volume / adv20), 20) * tsrank((-1 * delta(close, 7)), 8)) | 反转背离 |
Alpha#44 | (-1 * correlation(high, rank(volume), 5)) | 量价背离 |
Alpha#45 | (-1 _ ((rank((sum(delay(close, 5), 20) / 20)) _ correlation(close, volume, 2)) * rank(correlation(sum(close, 5), sum(close, 20), 2)))) | 量价背离 |
Alpha#47 | ((((rank((1 / close)) _ volume) / adv20) _ ((high * rank((high - close))) / (sum(high, 5) / 5))) - rank((vwap - delay(vwap, 5)))) | 无 |
Alpha#50 | (-1 * ts*max(rank(correlation(rank(volume), rank(vwap), 5)), 5)) | 量价背离 |
Alpha#52 | ((((-1 * tsmin(low, 5)) + delay(ts_min(low, 5), 5)) * rank(((sum(returns, 240) - sum(returns, 20)) / 220))) * tsrank(volume, 5)) | 量价背离 |
Alpha#55 | (-1 * correlation(rank(((close - ts_min(low, 12)) / (ts_max(high, 12) - ts_min(low, 12)))), rank(volume), 6)) | 量价背离 |
Alpha#58 | 未实现 | 未实现 |
Alpha#59 | 未实现 | 未实现 |
Alpha#63 | 未实现 | 未实现 |
Alpha#67 | 未实现 | 未实现 |
Alpha#69 | 未实现 | 未实现 |
Alpha#70 | 未实现 | 未实现 |
Alpha#71 | max(ts_rank(decay_linear(correlation(ts_rank(close, 3.43976), ts_rank(adv180, 12.0647), 18.0175), 4.20501), 15.6948), ts_rank(decay_linear((rank(((low + open) - (vwap + vwap)))^2), 16.4662), 4.4388)) | 无 |
Alpha#72 | (rank(decay_linear(correlation(((high + low) / 2), adv40, 8.93345), 10.1519)) / rank(decay_linear(correlation(ts_rank(vwap, 3.72469), ts_rank(volume, 18.5188), 6.86671), 2.95011))) | 无 |
Alpha#76 | 未实现 | 未实现 |
Alpha#77 | min(rank(decay_linear(((((high + low) / 2) + high) - (vwap + high)), 20.0451)), rank(decay_linear(correlation(((high + low) / 2), adv40, 3.1614), 5.64125))) | 无 |
Alpha#78 | (rank(correlation(sum(((low * 0.352233) + (vwap _ (1 - 0.352233))), 19.7428), sum(adv40, 19.7428), 6.83313))^rank(correlation(rank(vwap), rank(volume), 5.77492))) | 无 |
Alpha#80 | 未实现 | 未实现 |
Alpha#82 | 未实现 | 未实现 |
Alpha#83 | ((rank(delay(((high - low) / (sum(close, 5) / 5)), 2)) * rank(rank(volume))) / (((high - low) / (sum(close, 5) / 5)) / (vwap - close))) | 无 |
Alpha#85 | (rank(correlation(((high _ 0.876703) + (close _ (1 - 0.876703))), adv30, 9.61331))^rank(correlation(ts_rank(((high + low) / 2), 3.70596), ts_rank(volume, 10.1595), 7.11408))) | 无 |
Alpha#87 | 未实现 | 未实现 |
Alpha#88 | min(rank(decay_linear(((rank(open) + rank(low)) - (rank(high) + rank(close))), 8.06882)), ts_rank(decay_linear(correlation(ts_rank(close, 8.44728), ts_rank(adv60, 20.6966), 8.01266), 6.65053), 2.61957)) | 无 |
Alpha#89 | 未实现 | 未实现 |
Alpha#90 | 未实现 | 未实现 |
Alpha#91 | 未实现 | 未实现 |
Alpha#92 | min(ts_rank(decay_linear(((((high + low) / 2) + close) < (low + open)), 14.7221), 18.8683), ts_rank(decay_linear(correlation(rank(low), rank(adv30), 7.58555), 6.94024), 6.80584)) | 无 |
Alpha#93 | 未实现 | 未实现 |
Alpha#94 | ((rank((vwap - ts_min(vwap, 11.5783)))^ts_rank(correlation(ts_rank(vwap, 19.6462), ts_rank(adv60, 4.02992), 18.0926), 2.70756)) * -1) | 无 |
Alpha#96 | (max(ts_rank(decay_linear(correlation(rank(vwap), rank(volume), 3.83878), 4.16783), 8.38151), ts_rank(decay_linear(ts_argmax(correlation(ts_rank(close, 7.45404), ts_rank(adv60, 4.13242), 3.65459), 12.6556), 14.0365), 13.4143)) * -1) | 无 |
Alpha#97 | 未实现 | 未实现 |
Alpha#98 | (rank(decay_linear(correlation(vwap, sum(adv5, 26.4719), 4.58418), 7.18088)) - rank(decay_linear(ts_rank(ts_argmin(correlation(rank(open), rank(adv15), 20.8187), 8.62571), 6.95668), 8.07206))) | 无 |
Alpha#100 | 未实现 | 未实现 |
二分类因子
因子名称 | 因子公式 | 优宽量化注释 |
---|---|---|
Alpha#22 | (-1 _ (delta(correlation(high, volume, 5), 5) _ rank(stddev(close, 20)))) | 反转 |
Alpha#27 | ((0.5 < rank((sum(correlation(rank(volume), rank(vwap), 6), 2) / 2.0))) ? (-1 * 1) : 1) | 量价背离 |
Alpha#61 | (rank((vwap - ts*min(vwap, 16.1219))) < rank(correlation(vwap, adv180, 17.9282))) | 量价背离 |
Alpha#62 | ((rank(correlation(vwap, sum(adv20, 22.4101), 9.91009)) < rank(((rank(open) + rank(open)) < (rank(((high + low) / 2)) + rank(high))))) * -1) | 无 |
Alpha#64 | ((rank(correlation(sum(((open * 0.178404) + (low _ (1 - 0.178404))), 12.7054), sum(adv120, 12.7054), 16.6208)) < rank(delta(((((high + low) / 2) _ 0.178404) + (vwap _ (1 - 0.178404))), 3.69741))) * -1) | 无 |
Alpha#65 | ((rank(correlation(((open _ 0.00817205) + (vwap _ (1 - 0.00817205))), sum(adv60, 8.6911), 6.40374)) < rank((open - ts*min(open, 13.635)))) * -1) | 无 |
Alpha#68 | ((ts_rank(correlation(rank(high), rank(adv15), 8.91644), 13.9333) < rank(delta(((close * 0.518371) + (low _ (1 - 0.518371))), 1.06157))) * -1) | 无 |
Alpha#74 | ((rank(correlation(close, sum(adv30, 37.4843), 15.1365)) < rank(correlation(rank(((high _ 0.0261661) + (vwap _ (1 - 0.0261661)))), rank(volume), 11.4791))) * -1) | 无 |
Alpha#75 | (rank(correlation(vwap, volume, 4.24304)) < rank(correlation(rank(low), rank(adv50), 12.4413))) | 量价关系 |
Alpha#79 | 未实现 | 未实现 |
Alpha#81 | ((rank(log(product(rank((rank(correlation(vwap, sum(adv10, 49.6054), 8.47743))^4)), 14.9655))) < rank(correlation(rank(vwap), rank(volume), 5.07914))) * -1) | 无 |
Alpha#86 | ((ts_rank(correlation(close, sum(adv20, 14.7444), 6.00049), 20.4195) < rank(((open + close) - (vwap + open)))) * -1) | 无 |
Alpha#95 | (rank((open - ts_min(open, 12.4105))) < ts_rank((rank(correlation(sum(((high + low) / 2), 19.1351), sum(adv40, 19.1351), 12.8742))^5), 11.7584)) | 无 |
Alpha#99 | ((rank(correlation(sum(((high + low) / 2), 19.8975), sum(adv60, 19.8975), 8.8136)) < rank(correlation(low, volume, 6.28259))) * -1) | 无 |
打开优宽量化官网(youquant.com)注册并登录,点击左上方“控制中心”,在左侧列表中选择“分析工具”,如下图所示: 在分析工具页面,最上方是设置栏,从左往右依次可以设置:品种、起止时间、周期、图片类型。在设置栏的下方是公式编辑区,如果你不会写公式,可以点击下方的下拉菜单,选择已经编辑好的公式,这里支持了许多公式示例,可以选中别加以修改,或者你也可以查看使用文档。另外优宽量化的分析工具已经支持大部分 Alpha101 官方公式,直接点击使用就可以了。点击计算公式,在最下方即可呈现计算结果,并且支持多种数据导出方法:图片、表格(CSV)、JSON 等等。
1、因子公式里面的参数均为默认,并非是最优参数,交易者可以根据品种、周期,以及自己的经验,选择比较合适的参数。 2、因子是相互独立的,把多个因子相互叠加起来,并不一定能得到更好的效果。在设计量化交易策略时,至少有自己的逻辑,而不是机械的拼凑。 3、因子是无限,Alpha101 只是一个抛砖引玉,相信大家能从中获得启发,创造出更多更好的因子和量化交易策略。
在很多交易因子公式中,表面看上去不太合理,但公式的背后都有一定的思路和道理。但市场唯一不变的就是它一直在变,所以这些因子在实际应用中,其有效性具有非线性特征。也就是说,没有行之有效并且始终有效的因子,也就没有万能的交易方法。作为量化交易者应该有一种开放的心态,善于总结归纳,并用于尝试,推陈出新才会在不断变化的市场中获取利润。