# alpha101 因子
对应的函数计算逻辑请参考工具函数部分说明。可以直接使用 get_factor 函数调用,例如:
[In]
get_factor(['000001.XSHE', '600000.XSHG'],'WorldQuant_alpha010', '20190601', '20190610')
[Out]
600000.XSHG 000001.XSHE
2019-06-03 0.162771 0.093489
2019-06-04 0.255633 0.281502
2019-06-05 0.789430 0.222253
2019-06-06 0.437743 0.415231
2019-06-10 0.935448 0.134391
CLOSE = Factor('close')
RETURNS = (CLOSE - REF(CLOSE, 1)) / REF(CLOSE, 1)
CAP = Factor('market_cap')
VWAP = Factor('total_turnover') / Factor('volume)
alpha001 = (RANK(TS_ARGMAX(SIGNEDPOWER(IF((RETURNS < 0), STDDEV(RETURNS, 20), CLOSE), 2.), 5)) - 0.5)
alpha002 = (-1 * CORRELATION(RANK(DELTA(LOG(VOLUME), 2)), RANK(((CLOSE - OPEN) / OPEN)), 6))
alpha003 = (-1 * CORRELATION(RANK(OPEN), RANK(VOLUME), 10))
alpha004 = (-1 * TS_RANK(RANK(LOW), 9))
alpha005 = (RANK((OPEN - (SUM(VWAP, 10) / 10))) * (-1 * ABS(RANK((CLOSE - VWAP)))))
alpha006 = (-1 * CORRELATION(OPEN, VOLUME, 10))
alpha007 = IF((ADV(20) < VOLUME), ((-1 * TS_RANK(ABS(DELTA(CLOSE, 7)), 60)) * SIGN(DELTA(CLOSE, 7))), (-1 * 1))
alpha008 = (-1 * RANK(((SUM(OPEN, 5) * SUM(RETURNS, 5)) - DELAY((SUM(OPEN, 5) * SUM(RETURNS, 5)), 10))))
alpha009 = IF((0 < TS_MIN(DELTA(CLOSE, 1), 5)), DELTA(CLOSE, 1), (IF((TS_MAX(DELTA(CLOSE, 1), 5) < 0), DELTA(CLOSE, 1), (-1 * DELTA(CLOSE, 1)))))
alpha010 = RANK(IF((0 < TS_MIN(DELTA(CLOSE, 1), 4)), DELTA(CLOSE, 1), IF((TS_MAX(DELTA(CLOSE, 1), 4) < 0), DELTA(CLOSE, 1), (-1 * DELTA(CLOSE, 1)))))
alpha011 = ((RANK(TS_MAX((VWAP - CLOSE), 3)) + RANK(TS_MIN((VWAP - CLOSE), 3))) * RANK(DELTA(VOLUME, 3)))
alpha012 = (SIGN(DELTA(VOLUME, 1)) * (-1 * DELTA(CLOSE, 1)))
alpha013 = (-1 * RANK(COVARIANCE(RANK(CLOSE), RANK(VOLUME), 5)))
alpha014 = ((-1 * RANK(DELTA(RETURNS, 3))) * CORRELATION(OPEN, VOLUME, 10))
alpha015 = (-1 * SUM(RANK(CORRELATION(RANK(HIGH), RANK(VOLUME), 3)), 3))
alpha016 = (-1 * RANK(COVARIANCE(RANK(HIGH), RANK(VOLUME), 5)))
alpha017 = (((-1 * RANK(TS_RANK(CLOSE, 10))) * RANK(DELTA(DELTA(CLOSE, 1), 1))) * RANK(TS_RANK((VOLUME / ADV(20)), 5)))
alpha018 = (-1 * RANK(((STDDEV(ABS((CLOSE - OPEN)), 5) + (CLOSE - OPEN)) + CORRELATION(CLOSE, OPEN, 10))))
alpha019 = ((-1 * SIGN(((CLOSE - DELAY(CLOSE, 7)) + DELTA(CLOSE, 7)))) * (1 + RANK((1 + SUM(RETURNS, 250)))))
alpha020 = (((-1 * RANK((OPEN - DELAY(HIGH, 1)))) * RANK((OPEN - DELAY(CLOSE, 1)))) * RANK((OPEN - DELAY(LOW, 1))))
alpha021 = IF((((SUM(CLOSE, 8) / 8) + STDDEV(CLOSE, 8)) < (SUM(CLOSE, 2) / 2)), (-1 * 1), IF(((SUM(CLOSE, 2) / 2) < ((SUM(CLOSE, 8) / 8) - STDDEV(CLOSE, 8))), 1, IF(((1 < (VOLUME / ADV(20))) | ((VOLUME / ADV(20)) == 1)), 1, (-1 * 1))))
alpha022 = (-1 * (DELTA(CORRELATION(HIGH, VOLUME, 5), 5) * RANK(STDDEV(CLOSE, 20))))
alpha023 = IF(((SUM(HIGH, 20) / 20) < HIGH), (-1 * DELTA(HIGH, 2)), 0)
alpha024 = IF((((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)))
alpha025 = RANK(((((-1 * RETURNS) * ADV(20)) * VWAP) * (HIGH - CLOSE)))
alpha026 = (-1 * TS_MAX(CORRELATION(TS_RANK(VOLUME, 5), TS_RANK(HIGH, 5), 5), 3))
alpha027 = IF((0.5 < RANK((SUM(CORRELATION(RANK(VOLUME), RANK(VWAP), 6), 2) / 2.0))), (-1 * 1), 1)
alpha028 = SCALE(((CORRELATION(ADV(20), LOW, 5) + ((HIGH + LOW) / 2)) - CLOSE))
alpha029 = (MIN(PRODUCT(RANK(RANK(SCALE(LOG(SUM(TS_MIN(RANK(RANK((-1 * RANK(DELTA((CLOSE - 1), 5))))), 2), 1))))), 1), 5) + TS_RANK(DELAY((-1 * RETURNS), 6), 5))
alpha030 = (((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))
alpha031 = ((RANK(RANK(RANK(DECAY_LINEAR((-1 * RANK(RANK(DELTA(CLOSE, 10)))), 10)))) + RANK((-1 * DELTA(CLOSE, 3)))) + SIGN(SCALE(CORRELATION(ADV(20), LOW, 12))))
alpha032 = (SCALE(((SUM(CLOSE, 7) / 7) - CLOSE)) + (20 * SCALE(CORRELATION(VWAP, DELAY(CLOSE, 5), 230))))
alpha033 = RANK((-1 * ((1 - (OPEN / CLOSE))**1)))
alpha034 = RANK(((1 - RANK((STDDEV(RETURNS, 2) / STDDEV(RETURNS, 5)))) + (1 - RANK(DELTA(CLOSE, 1)))))
alpha035 = ((TS_RANK(VOLUME, 32) * (1 - TS_RANK(((CLOSE + HIGH) - LOW), 16))) * (1 - TS_RANK(RETURNS, 32)))
alpha036 = (((((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, ADV(20), 6)))) + (0.6 * RANK((((SUM(CLOSE, 200) / 200) - OPEN) * (CLOSE - OPEN)))))
alpha037 = (RANK(CORRELATION(DELAY((OPEN - CLOSE), 1), CLOSE, 200)) + RANK((OPEN - CLOSE)))
alpha038 = ((-1 * RANK(TS_RANK(CLOSE, 10))) * RANK((CLOSE / OPEN)))
alpha039 = ((-1 * RANK((DELTA(CLOSE, 7) * (1 - RANK(DECAY_LINEAR((VOLUME / ADV(20)), 9)))))) * (1 + RANK(SUM(RETURNS, 250))))
alpha040 = ((-1 * RANK(STDDEV(HIGH, 10))) * CORRELATION(HIGH, VOLUME, 10))
alpha041 = (((HIGH * LOW)**0.5) - VWAP)
alpha042 = (RANK((VWAP - CLOSE)) / RANK((VWAP + CLOSE)))
alpha043 = (TS_RANK((VOLUME / ADV(20)), 20) * TS_RANK((-1 * DELTA(CLOSE, 7)), 8))
alpha044 = (-1 * CORRELATION(HIGH, RANK(VOLUME), 5))
alpha045 = (-1 * ((RANK((SUM(DELAY(CLOSE, 5), 20) / 20)) * CORRELATION(CLOSE, VOLUME, 2)) * RANK(CORRELATION(SUM(CLOSE, 5), SUM(CLOSE, 20), 2))))
alpha046 = IF((0.25 < (((DELAY(CLOSE, 20) - DELAY(CLOSE, 10)) / 10) - ((DELAY(CLOSE, 10) - CLOSE) / 10))), (-1 * 1), IF(((((DELAY(CLOSE, 20) - DELAY(CLOSE, 10)) / 10) - ((DELAY(CLOSE, 10) - CLOSE) / 10)) < 0), 1, ((-1 * 1) * (CLOSE - DELAY(CLOSE, 1)))))
alpha047 = ((((RANK((1 / CLOSE)) * VOLUME) / ADV(20)) * ((HIGH * RANK((HIGH - CLOSE))) / (SUM(HIGH, 5) / 5))) - RANK((VWAP - DELAY(VWAP, 5))))
alpha048 = (INDUSTRY_NEUTRALIZE(((CORRELATION(DELTA(CLOSE, 1), DELTA(DELAY(CLOSE, 1), 1), 250) * DELTA(CLOSE, 1)) / CLOSE)) / SUM(((DELTA(CLOSE, 1) / DELAY(CLOSE, 1))**2), 250))
alpha049 = IF(((((DELAY(CLOSE, 20) - DELAY(CLOSE, 10)) / 10) - ((DELAY(CLOSE, 10) - CLOSE) / 10)) < (-1 * 0.1)), 1, ((-1 * 1) * (CLOSE - DELAY(CLOSE, 1))))
alpha050 = (-1 * TS_MAX(RANK(CORRELATION(RANK(VOLUME), RANK(VWAP), 5)), 5))
alpha051 = IF(((((DELAY(CLOSE, 20) - DELAY(CLOSE, 10)) / 10) - ((DELAY(CLOSE, 10) - CLOSE) / 10)) < (-1 * 0.05)), 1, ((-1 * 1) * (CLOSE - DELAY(CLOSE, 1))))
alpha052 = ((((-1 * TS_MIN(LOW, 5)) + DELAY(TS_MIN(LOW, 5), 5)) * RANK(((SUM(RETURNS, 240) - SUM(RETURNS, 20)) / 220))) * TS_RANK(VOLUME, 5))
alpha053 = (-1 * DELTA((((CLOSE - LOW) - (HIGH - CLOSE)) / (CLOSE - LOW)), 9))
alpha054 = ((-1 * ((LOW - CLOSE) * (OPEN**5))) / ((LOW - HIGH) * (CLOSE**5)))
alpha055 = (-1 * CORRELATION(RANK(((CLOSE - TS_MIN(LOW, 12)) / (TS_MAX(HIGH, 12) - TS_MIN(LOW, 12)))), RANK(VOLUME), 6))
alpha056 = (0 - (1 * (RANK((SUM(RETURNS, 10) / SUM(SUM(RETURNS, 2), 3))) * RANK((RETURNS * CAP)))))
alpha057 = (0 - (1 * ((CLOSE - VWAP) / DECAY_LINEAR(RANK(TS_ARGMAX(CLOSE, 30)), 2))))
alpha058 = (-1 * TS_RANK(DECAY_LINEAR(CORRELATION(INDUSTRY_NEUTRALIZE(VWAP), VOLUME, 4), 8), 6))
alpha059 = (-1 * TS_RANK(DECAY_LINEAR(CORRELATION(INDUSTRY_NEUTRALIZE(((VWAP * 0.728317) + (VWAP * (1 - 0.728317)))), VOLUME, 4), 16), 8))
alpha060 = (0 - (1 * ((2 * SCALE(RANK(((((CLOSE - LOW) - (HIGH - CLOSE)) / (HIGH - LOW)) * VOLUME)))) - SCALE(RANK(TS_ARGMAX(CLOSE, 10))))))
alpha061 = (RANK((VWAP - TS_MIN(VWAP, 16))) < RANK(CORRELATION(VWAP, ADV(180), 18)))
alpha062 = ((RANK(CORRELATION(VWAP, SUM(ADV(20), 22), 10)) < RANK(((RANK(OPEN) + RANK(OPEN)) < (RANK(((HIGH + LOW) / 2)) + RANK(HIGH))))) * -1)
alpha063 = ((RANK(DECAY_LINEAR(DELTA(INDUSTRY_NEUTRALIZE(CLOSE), 2), 8)) - RANK(DECAY_LINEAR(CORRELATION(((VWAP * 0.318108) + (OPEN * (1 - 0.318108))), SUM(ADV(180), 37), 14), 12))) * -1)
alpha064 = ((RANK(CORRELATION(SUM(((OPEN * 0.178404) + (LOW * (1 - 0.178404))), 13), SUM(ADV(120), 13), 17)) < RANK(DELTA(((((HIGH + LOW) / 2) * 0.178404) + (VWAP * (1 - 0.178404))), 4))) * -1)
alpha065 = ((RANK(CORRELATION(((OPEN * 0.00817205) + (VWAP * (1 - 0.00817205))), SUM(ADV(60), 9), 6)) < RANK((OPEN - TS_MIN(OPEN, 14)))) * -1)
alpha066 = ((RANK(DECAY_LINEAR(DELTA(VWAP, 4), 7)) + TS_RANK(DECAY_LINEAR(((((LOW * 0.96633) + (LOW * (1 - 0.96633))) - VWAP) / (OPEN - ((HIGH + LOW) / 2))), 11), 7)) * -1)
alpha067 = ((RANK((HIGH - TS_MIN(HIGH, 2)))**RANK(CORRELATION(INDUSTRY_NEUTRALIZE(VWAP), INDUSTRY_NEUTRALIZE(ADV(20)), 6))) * -1)
alpha068 = ((TS_RANK(CORRELATION(RANK(HIGH), RANK(ADV(15)), 9), 14) < RANK(DELTA(((CLOSE * 0.518371) + (LOW * (1 - 0.518371))), 1))) * -1)
alpha069 = ((RANK(TS_MAX(DELTA(INDUSTRY_NEUTRALIZE(VWAP), 3), 5))**TS_RANK(CORRELATION(((CLOSE * 0.490655) + (VWAP * (1 - 0.490655))), ADV(20), 5), 9)) * -1)
alpha070 = ((RANK(DELTA(VWAP, 1))**TS_RANK(CORRELATION(INDUSTRY_NEUTRALIZE(CLOSE), ADV(50), 18), 18)) * -1)
alpha071 = MAX(TS_RANK(DECAY_LINEAR(CORRELATION(TS_RANK(CLOSE, 3), TS_RANK(ADV(180), 12), 18), 4), 16), TS_RANK(DECAY_LINEAR((RANK(((LOW + OPEN) - (VWAP + VWAP)))**2), 16), 4))
alpha072 = (RANK(DECAY_LINEAR(CORRELATION(((HIGH + LOW) / 2), ADV(40), 9), 10)) / RANK(DECAY_LINEAR(CORRELATION(TS_RANK(VWAP, 4), TS_RANK(VOLUME, 19), 7), 3)))
# Modify DELTA(VWAP, 4.72775) to DELTA(VWAP, 5)
alpha073 = (MAX(RANK(DECAY_LINEAR(DELTA(VWAP, 5), 3)), TS_RANK(DECAY_LINEAR(((DELTA(((OPEN * 0.147155) + (LOW * (1 - 0.147155))), 2) / ((OPEN * 0.147155) + (LOW * (1 - 0.147155)))) * -1), 3), 17)) * -1)
alpha074 = ((RANK(CORRELATION(CLOSE, SUM(ADV(30), 37), 15)) < RANK(CORRELATION(RANK(((HIGH * 0.0261661) + (VWAP * (1 - 0.0261661)))), RANK(VOLUME), 11))) * -1)
alpha075 = (RANK(CORRELATION(VWAP, VOLUME, 4)) < RANK(CORRELATION(RANK(LOW), RANK(ADV(50)), 12)))
# Modify TS_RANK(CORRELATION(INDUSTRY_NEUTRALIZE(LOW), ADV(81), 8), 19.569) to TS_RANK(CORRELATION(INDUSTRY_NEUTRALIZE(LOW), ADV(81), 8), 20)
alpha076 = (MAX(RANK(DECAY_LINEAR(DELTA(VWAP, 1), 12)), TS_RANK(DECAY_LINEAR(TS_RANK(CORRELATION(INDUSTRY_NEUTRALIZE(LOW), ADV(81), 8), 20), 17), 19)) * -1)
alpha077 = MIN(RANK(DECAY_LINEAR(((((HIGH + LOW) / 2) + HIGH) - (VWAP + HIGH)), 20)), RANK(DECAY_LINEAR(CORRELATION(((HIGH + LOW) / 2), ADV(40), 3), 6)))
alpha078 = (RANK(CORRELATION(SUM(((LOW * 0.352233) + (VWAP * (1 - 0.352233))), 20), SUM(ADV(40), 20), 7))**RANK(CORRELATION(RANK(VWAP), RANK(VOLUME), 6)))
alpha079 = (RANK(DELTA(INDUSTRY_NEUTRALIZE(((CLOSE * 0.60733) + (OPEN * (1 - 0.60733)))), 1)) < RANK(CORRELATION(TS_RANK(VWAP, 4), TS_RANK(ADV(150), 9), 15)))
alpha080 = ((RANK(SIGN(DELTA(INDUSTRY_NEUTRALIZE(((OPEN * 0.868128) + (HIGH * (1 - 0.868128)))), 4)))**TS_RANK(CORRELATION(HIGH, ADV(10), 5), 6)) * -1)
alpha081 = ((RANK(LOG(PRODUCT(RANK((RANK(CORRELATION(VWAP, SUM(ADV(10), 50), 8))**4)), 15))) < RANK(CORRELATION(RANK(VWAP), RANK(VOLUME), 5))) * -1)
alpha082 = (MIN(RANK(DECAY_LINEAR(DELTA(OPEN, 1), 15)), TS_RANK(DECAY_LINEAR(CORRELATION(INDUSTRY_NEUTRALIZE(VOLUME), ((OPEN * 0.634196) + (OPEN * (1 - 0.634196))), 17), 7), 13)) * -1)
alpha083 = ((RANK(DELAY(((HIGH - LOW) / (SUM(CLOSE, 5) / 5)), 2)) * RANK(RANK(VOLUME))) / (((HIGH - LOW) / (SUM(CLOSE, 5) / 5)) / (VWAP - CLOSE)))
alpha084 = SIGNEDPOWER(TS_RANK((VWAP - TS_MAX(VWAP, 15)), 21), DELTA(CLOSE, 5))
alpha085 = (RANK(CORRELATION(((HIGH * 0.876703) + (CLOSE * (1 - 0.876703))), ADV(30), 10))**RANK(CORRELATION(TS_RANK(((HIGH + LOW) / 2), 4), TS_RANK(VOLUME, 10), 7)))
alpha086 = ((TS_RANK(CORRELATION(CLOSE, SUM(ADV(20), 15), 6), 20) < RANK(((OPEN + CLOSE) - (VWAP + OPEN)))) * -1)
alpha087 = (MAX(RANK(DECAY_LINEAR(DELTA(((CLOSE * 0.369701) + (VWAP * (1 - 0.369701))), 2), 3)), TS_RANK(DECAY_LINEAR(ABS(CORRELATION(INDUSTRY_NEUTRALIZE(ADV(81)), CLOSE, 13)), 5), 14)) * -1)
# Modify TS_RANK(ADV(60), 20.6966) to TS_RANK(ADV(60), 21),
alpha088 = MIN(RANK(DECAY_LINEAR(((RANK(OPEN) + RANK(LOW)) - (RANK(HIGH) + RANK(CLOSE))), 8)), TS_RANK(DECAY_LINEAR(CORRELATION(TS_RANK(CLOSE, 8), TS_RANK(ADV(60), 21), 8), 7), 3))
alpha089 = (TS_RANK(DECAY_LINEAR(CORRELATION(((LOW * 0.967285) + (LOW * (1 - 0.967285))), ADV(10), 7), 6), 4) - TS_RANK(DECAY_LINEAR(DELTA(INDUSTRY_NEUTRALIZE(VWAP), 3), 10), 15))
alpha090 = ((RANK((CLOSE - TS_MAX(CLOSE, 5)))**TS_RANK(CORRELATION(INDUSTRY_NEUTRALIZE(ADV(40)), LOW, 5), 3)) * -1)
alpha091 = ((TS_RANK(DECAY_LINEAR(DECAY_LINEAR(CORRELATION(INDUSTRY_NEUTRALIZE(CLOSE), VOLUME, 10), 16), 4), 5) - RANK(DECAY_LINEAR(CORRELATION(VWAP, ADV(30), 4), 3))) * -1)
alpha092 = MIN(TS_RANK(DECAY_LINEAR(AS_FLOAT((((HIGH + LOW) / 2) + CLOSE) < (LOW + OPEN)), 15), 19), TS_RANK(DECAY_LINEAR(CORRELATION(RANK(LOW), RANK(ADV(30)), 8), 7), 7))
alpha093 = (TS_RANK(DECAY_LINEAR(CORRELATION(INDUSTRY_NEUTRALIZE(VWAP), ADV(81), 17), 20), 8) / RANK(DECAY_LINEAR(DELTA(((CLOSE * 0.524434) + (VWAP * (1 - 0.524434))), 3), 16)))
alpha094 = ((RANK((VWAP - TS_MIN(VWAP, 12)))**TS_RANK(CORRELATION(TS_RANK(VWAP, 20), TS_RANK(ADV(60), 4), 18), 3)) * -1)
alpha095 = (RANK((OPEN - TS_MIN(OPEN, 12))) < TS_RANK((RANK(CORRELATION(SUM(((HIGH + LOW) / 2), 19), SUM(ADV(40), 19), 13))**5), 12))
# Modify TS_RANK(ADV(60), 4.13242) to TS_RANK(ADV(60), 4)
alpha096 = MAX(TS_RANK(DECAY_LINEAR(CORRELATION(RANK(VWAP), RANK(VOLUME), 4), 4), 8), TS_RANK(DECAY_LINEAR(TS_ARGMAX(CORRELATION(TS_RANK(CLOSE, 7), TS_RANK(ADV(60), 4), 4), 13), 14), 13)) * -1
# Modify TS_RANK(LOW, 7.87871) to TS_RANK(LOW, 8)
alpha097 = ((RANK(DECAY_LINEAR(DELTA(INDUSTRY_NEUTRALIZE(((LOW * 0.721001) + (VWAP * (1 - 0.721001)))), 3), 20)) - TS_RANK(DECAY_LINEAR(TS_RANK(CORRELATION(TS_RANK(LOW, 8), TS_RANK(ADV(60), 17), 5), 19), 16), 7)) * -1)
alpha098 = (RANK(DECAY_LINEAR(CORRELATION(VWAP, SUM(ADV(5), 26), 6), 7)) - RANK(DECAY_LINEAR(TS_RANK(TS_ARGMIN(CORRELATION(RANK(OPEN), RANK(ADV(15)), 21), 9), 7), 8)))
alpha099 = ((RANK(CORRELATION(SUM(((HIGH + LOW) / 2), 20), SUM(ADV(60), 20), 9)) < RANK(CORRELATION(LOW, VOLUME, 6))) * -1)
alpha100 = (0 - (1 * (((1.5 * SCALE(INDUSTRY_NEUTRALIZE(INDUSTRY_NEUTRALIZE(RANK(((((CLOSE - LOW) - (HIGH - CLOSE)) / (HIGH - LOW)) * VOLUME)))))) - SCALE(INDUSTRY_NEUTRALIZE((CORRELATION(CLOSE, RANK(ADV(20)), 5) - RANK(TS_ARGMIN(CLOSE, 30)))))) * (VOLUME / ADV(20)))))
alpha101 = ((CLOSE - OPEN) / ((HIGH - LOW) + .001))
# 技术指标
# 均线类指标
均线类指标计算逻辑请参考表格中的因子计算逻辑部分。可以直接使用 get_factor 函数调用,例如:
[In]
get_factor('000001.XSHE','MACD_DIFF','20200101','20200110')
[Out]
2020-01-02 0.197243
2020-01-03 0.242007
2020-01-06 0.265545
2020-01-07 0.287342
2020-01-08 0.262057
2020-01-09 0.249631
2020-01-10 0.229073
Name: 000001.XSHE, dtype: float64
因子字段 | 函数名与默认参数 | 因子计算逻辑 |
---|---|---|
MACD_DIFF, MACD_DEA, MACD_HIST | 指数平滑移动平均线 MACD SHORT = 12, LONG = 26, M = 9 | DIFF = EMA(CLOSE, SHORT) - EMA(CLOSE, LONG) DEA = EMA(DIFF, M) HIST = (DIFF - DEA) * 2 |
TRIX, MATRIX | 三重指数平均移动平均 TRIX M1 = 12, M2 = 20 | TRIX = (TR - REF(TR, 1)) / REF(TR, 1) * 100; TR = EMA(EMA(EMA(CLOSE, M1), M1), M1) MATRIX= MA(TRIX, M2) |
BOLL, BOLL_UP, BOLL_DOWN | 布林带 BOLL N = 20, P = 2 | BOLL = MA(CLOSE, N) BOLLUP = BOLL + STD(CLOSE, N) * P BOLLDOWN = BOLL - STD(CLOSE, N) * P |
ASI, ASIT | 震动升降指标 ASI M1= 26, M2 = 10 | LC = REF(CLOSE, 1) AA = ABS(HIGH - LC) BB = ABS(LOW - LC) CC = ABS(HIGH - REF(LOW, 1)) DD = ABS(LC - REF(OPEN, 1)) R = IF((AA BB) & (AA CC), AA + BB / 2 + DD / 4, IF((BB CC) & (BB AA), BB + AA / 2 + DD / 4, CC + DD / 4)) X = (CLOSE - LC + (CLOSE - OPEN) / 2 + LC - REF(OPEN, 1)) SI = X _ 16 / R _ MAX(AA, BB) ASI = SUM(SI, M1) ASIT = MA(ASI, M2)" |
MA3, 5, 10, 20, 30, 55, 60, 120, 250 | 移动均线 MA N: 3, 5, 10, 20, 30, 55, 60, 120, 250 | MA3, 5, 10… = MA(CLOSE, N) |
EMA3, 5, 10, 20, 30, 55, 60, 120, 250 | 指数移动均线 EMA N: 3, 5, 10, 20, 30, 55, 60, 120, 250 | EMA3, 5, 10... = EMA(CLOSE, N) |
HMA3, 5, 10, 20, 30, 55, 60, 120, 250 | 高价平均线 HMA N: 3, 5, 10, 20, 30, 55, 60, 120, 250 | HMA3, 5, 10... = MA(HIGH, N) |
LMA3, 5, 10, 20, 30, 55, 60, 120, 250 | 低价平均线 LMA N: 3, 5, 10, 20, 30, 55, 60, 120, 250 | LMA3, 5, 10… = MA(LOW, N)… |
VMA3, 5, 10, 20, 30, 55, 60, 120, 250 | 变异平均线 VMA N: 3, 5, 10, 20, 30, 55, 60, 120, 250 | VV = (HIGH+OPEN+LOW+CLOSE)/4 VMA3, 5, 10... = MA(VV, N)… |
AMV3, 5, 10, 20, 30, 55, 60, 120, 250 | 成本均线 AMV N: 3, 5, 10, 20, 30, 55, 60, 120, 250 | AMOV = VOLUME * (OPEN + CLOSE) / 2 AMV3, 5, 10… = SUM(AMOV, N) / SUM(VOLUME, N)… |
VOL3, 5, 10, 20, 30, 55, 60, 120, 250 | 平均换手率(%) VOL N: 3, 5, 10, 20, 30, 55, 60, 120, 250 | HSL =100* VOLUME / CAPITAL VOL3, 5, 10... = MA(HSL, N) HSL 代表换手率 CAPITAL 代表流通股本 |
DAVOL5, 10, 20 | 平均换手率与 120 日平均换手率比值 DAVOL N: 5, 10, 20 | DAVOL3, 5... = VOLN / VOL120 |
BBI, BBIBOLL_UP, BBIBOLL_DOWN | 多空指标 BBIBOLL M1 = 3, M2 = 6, M3 = 12, M4 = 24, M = 6, N = 11 | BBI = (MA(CLOSE, M1) + MA(CLOSE, M2) + MA(CLOSE, M3) + MA(CLOSE, M4)) / 4 BBIBOLLUP = BBI + M * STD(BBI, N) BBIBOLLDOWN = BBI - M * STD(BBI, N)" |
DPO, MADPO | 区间震荡线 DPO M1 = 20, M2 = 10, M = 6 | DPO = CLOSE - REF(MA(CLOSE, M1), M2) MADPO = MA(DPO, M3) |
MCST | 市场成本 MCST | MCST = DMA(AMOUNT / VOLUME, 100 * VOLUME / CAPITAL) AMOUNT 代表成交额 CAPITAL 代表流通股本 |
# 超买超卖指标
超买超卖指标计算逻辑请参考下面表格中的因子计算逻辑部分。可以直接使用 get_factor 函数调用,例如:
[In]
get_factor('000001.XSHE','OBOS','20200401','20200408')
[Out]
2020-04-01 2.0
2020-04-02 4.0
2020-04-03 2.0
2020-04-07 4.0
2020-04-08 2.0
Name: 000001.XSHE, dtype: float64
因子字段 | 函数名与默认参数 | 因子计算逻辑 |
---|---|---|
OBOS | 超买超卖指标 OBOS N = 10 | 过去 N 日股票上涨家数之和 – 过去 N 日股票下跌家数之和。 如果当日股票收盘价大于上一交易日股票收盘价,则该股票今日为上涨。 |
KDJ_K, KDJ_D, KDJ_J | 随机波动指标 KDJ N = 9, M1 = 3, M2 = 3 | RSV = (CLOSE - LLV(LOW, N)) / (HHV(HIGH, N) - LLV(LOW, N)) * 100 K = EMA(RSV, (M1 * 2 - 1)) D = EMA(K, (M2 * 2 - 1)) J = K * 3 - D * 2 |
RSI6, RSI10 | 相对强弱指标 RSI N1 = 6, 10 | LC = REF(CLOSE, 1) RSI = MA(MAX(CLOSE - LC, 0), N) / MA(ABS(CLOSE - LC), N) * 100 |
WR | 威廉指标 WR N = 10, L1 = 6 | WR = (HHV(HIGH, N) - CLOSE) / (HHV(HIGH, N) - LLV(LOW, N)) * 100 |
LWR1, LWR2 | LWR 威廉指标 LWR N = 9, M1 = 3, M2 = 3 | RSV = (HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))*100 LWR1 = SMA_CN(RSV,M1,1) LWR2 = SMA_CN(LWR1,M2,1) |
BIAS5, BIAS10, BIAS20 | 乖离率 BIAS L1 = 5, 10, 20 | (CLOSE - MA(CLOSE, L1)) / MA(CLOSE, L1) * 100 |
BIAS36, BIAS612, MABIAS | 36 乖离 BIAS36 | BIAS36 = MA(CLOSE, 3) – MA(CLOSE, 6) BIAS612 = MA(CLOSE, 6) – MA(CLOSE, 12) MABIAS = MA(BIAS36, M) |
ACCER | 幅度涨速 ACCER N = 8 | ACCER = SLOPE (CLOSE, N) / CLOSE |
CYF | 市场能量 CYF N = 21 | CYF = 100 – 100 / (1 + EMA(HSL, N )) |
SWL, SWS | 分水岭 FSL | SWL = (EMA(CLOSE,5)7+EMA(CLOSE,10)3)/10 SWS = DMA(EMA(CLOSE,12),MAX(1,100(SUM(VOLUME,5)/(3CAPITAL)))) CAPITAL 代表流通股本 |
ADTM, MAADTM | 动态买卖气指标 ADTM N = 23, M = 8 | DTM = IF(OPEN<=REF(OPEN,1),0,MAX((HIGH-OPEN),(OPEN-REF(OPEN,1)))) DBM = IF(OPEN>=REF(OPEN,1),0,MAX((OPEN-LOW),(OPEN-REF(OPEN,1)))) STM = SUM(DTM,N) SBM = SUM(DBM,N) ADTM = IF(STM>SBM,(STM-SBM)/STM,IF(STM=SBM,0,(STM-SBM)/SBM)) MAADTM = MA(ADTM, M) |
TR, ATR | 真实波幅 ATR N = 14,M1 = 9 | TR = SUM(MAX(MAX(HIGH - LOW, ABS(HIGH - REF(CLOSE, 1))), ABS(LOW - REF(CLOSE, 1))), M1) ATR = MA(TR, N) |
DKX, MADKX | 多空线 DKX M = 10 | MID = (3CLOSE+LOW+OPEN+HIGH)/6 DKX = (20MID+19REF(MID,1)+18REF(MID,2)+17REF(MID,3)+16REF(MID,4)+15REF(MID,5)+14REF(MID,6)+ 13REF(MID,7)+12REF(MID,8)+11REF(MID,9)+10REF(MID,10)+9REF(MID,11)+8REF(MID,12)+7REF(MID,13)+ 6REF(MID,14)+5REF(MID,15)+4REF(MID,16)+3REF(MID,17)+2REF(MID,18)+REF(MID,20))/210 MADKX = MA(DKX, M) |
TAPI, MATAPI | 加权指数成交值 TAPI M = 6 | TAPI = AMOUNT / CLOSE MATAPI = MA(TAPI, M) AMOUNT 代表成交额 |
OSC | 变动速率线 OSC N = 10 | 100 * (CLOSE – MA(CLOSE, N)) |
CCI | 商品路径指标 CCI N = 14 | CCI = (TYP – MA(TYP, N)) / (0.015 * AVEDEV (TYP, N)) TYP = (HIGH + LOW + CLOSE) / 3 |
ROC | 变形率指标 ROC N = 12 | ROC = 100 * (CLOSE – REF(CLOSE, N) / REF(CLOSE, N) |
MFI | 资金流量指标 MFI N = 14 | TYP = (HIGH + LOW + CLOSE) / 3 V1 = SUM(IF(TYP > REF(TYP, 1), TYP * VOLUME, 0), N) / SUM(IF(TYP < REF(TYP, 1), TYP * VOLUME, 0), N) MFI = 100 - ( 100 / ( 1 + V1 ) ) |
MTM, MAMTM | 动量线 MTM N = 14 | MTM = CLOSE – REF(CLOSE, N) MAMTM = MA(MTM, M) |
MARSI6, MARSI10 | 相对强弱平均线 MARSI N = 6, 10 | LC = REF(CLOSE, 1) RSI = SMA(MAX(CLOSE - LC, 0), N) / SMA(ABS(CLOSE - LC), N) * 100 MARSI = MA(RSI, N) |
SKD_K, SKD_D | 慢速随机指标 SKD N = 9, M = 3 | LOWV = LLV(LOW, N) HIGHV = HHV(HIGH, N) RSV = EMA((CLOSE – LOWV) / (HIGHV – LOWV) * 100, M) SKD_K = EMA(RSV , M) SKD_D = MA(SKD_K, M) |
UDL, MAUDL | 引力线 UDL N1 = 3, N2 = 5, N3 = 10, N4 = 20, M =6 | UDL = (MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4 MAUDL = MA(UDL,M) |
DI1, DI2, ADX, ADXR | 趋向指标 DMI M1 = 14, M2 = 6 | TR = SUM(MAX(MAX(HIGH - LOW, ABS(HIGH - REF(CLOSE, 1))), ABS(LOW - REF(CLOSE, 1))), M1) HD = HIGH - REF(HIGH, 1) LD = REF(LOW, 1) - LOW DMP = SUM(IF((HD 0) & (HD LD), HD, 0), M1) DMM = SUM(IF((LD 0) & (LD HD), LD, 0), M1) DI1 = DMP * 100 / TR DI2 = DMM * 100 / TR ADX = MA(ABS(DI2 - DI1) / (DI1 + DI2) * 100, M2) ADXR = (ADX + REF(ADX, M2)) / 2" |
# 能量指标
能量指标计算逻辑请参考下面表格中的因子计算逻辑部分。可以直接使用 get_factor 函数调用,例如:
[In]
get_factor('000006.XSHE',['AR', 'BR'],'20200501','20200510')
[Out]
AR BR
order_book_id date
000006.XSHE 2020-05-06 110.555556 116.022099
2020-05-07 110.497238 118.435754
2020-05-08 107.777778 112.154696
因子字段 | 函数名与默认参数 | 因子计算逻辑 |
---|---|---|
AR, BR | 人气意愿指标 ARBR M1 = 26 | AR = SUM(HIGH - OPEN, M1) / SUM(OPEN - LOW, M1) * 100 BR = SUM(MAX(0, HIGH - REF(CLOSE, 1)), M1) / SUM(MAX(0, REF(CLOSE, 1) - LOW), M1) * 100 |
VR, MAVR | 容量比例 VR M1 = 26, M = 6 | LC = REF(CLOSE, 1) VR = SUM(IF(CLOSE LC, VOL, 0), M1) / SUM(IF(CLOSE <= LC, VOL, 0), M1) * 100 MAVR = MA(VR, M) |
CR,MACR1, MACR2, MACR3, MACR4 | CR 指标 CR N = 26, M1 = 10, M2 = 20, M3 = 40, M4 = 62 | MID = REF(HIGH+LOW, 1) / 2 CR = SUM(MAX(0,HIGH-MID),N)/SUM(MAX(0,MID-LOW),N)*100 MACR1 = REF(MA(CR,M1),1+M1/2.5) MACR2 = REF(MA(CR,M2),1+M2/2.5) MACR3 = REF(MA(CR,M3),1+M3/2.5) MACR4= REF(MA(CR,M4),1+M4/2.5) |
MASS, MAMASS | 梅斯线 MASS N1 = 9, N2 = 25, M = 6 | MASS = SUM(MA(HIGH-LOW,N1)/MA(MA(HIGH-LOW,N1),N1),N2) MAMASS = MA(MASS, M) |
SY | 心理线 SY N = 9 | SY = COUNT(CLOSE>REF(CLOSE,1),N)/N*100 |
PCNT | 幅度比 PCNT | PCNT = (CLOSE-REF(CLOSE,1))/CLOSE*100; |
CYR, MACYR | 市场强弱 CYR N = 13, M = 5 | DIVE = 0.01*EMA(AMOUNT,N)/EMA(VOLUME,N) CYR = (DIVE/REF(DIVE,1)-1)*100 MACYR = MA(CYR, M) AMOUNT 代表成交额 |
AMP1,AMP3,AMP5, AMP10,AMP20,AMP60 | 振幅 AMP N:1,3,5,10,20,60 | AMP1,3,5… = (HHV(HIGH,N)-LLV(LOW,N))/REF(CLOSE,N) |
WMA3,WMA5,WMA10,WMA20, WMA60,WMA120,WMA250 | 加权移动平均线 WMA N:3,5,10,20,60,120,250 | WMA1,3,5… = (CLOSE*N+REF(CLOSE, 1)*(N-1)+…+REF(CLOSE, N-1)/(1+2+…+N)) |
VOLT20, VOLT60 | 近 20 日/60 日波动率 N:20,60 | 20 日/60 日收盘价的标准差 |
MDD20,MDD60 | 近 20 日/60 日最大回撤 N:20,60 | 20 日/60 日收盘价的最大回撤 |
AROON_UP,AROON_DOWN | 阿隆指标 N=14 | AROON_UP = [(计算期天数-最高价后的天数)/计算期天数]*100 AROON_DOWN = [(计算期天数-最低价后的天数)/计算期天数]*100 |
QTYR_5_20 | 5 日 20 日量比 N=5, M=20 | MA(VOLUME, N) / MA(VOLUME, M) |
OBV | 能量潮 OBV | OBV=REF(OBV, 1) + sgn × VOLUME 其中,sgn 是符号函数,其数值由下式决定: sgn=1 , CLOSE>REF(CLOSE, 1) sgn=0, CLOSE = REF(CLOSE, 1) sgn=-1 , CLOSE< REF(CLOSE, 1) |