defaults:
  - base_data_loader_alpha

name: alpha158
compute_backend: myhxdf
expressions:
  alpha158_000: div(sub({disk:close},{disk:open}),{disk:open})
  alpha158_001: div(sub({disk:high},{disk:low}),{disk:open})
  alpha158_002: div(sub({disk:close},{disk:open}),sub({disk:high},add({disk:low},1e-12)))
  alpha158_003: div(sub({disk:high},min({disk:open},{disk:close})),{disk:open})
  alpha158_004: div(sub({disk:high},max({disk:open},{disk:close})),sub({disk:high},add({disk:low},1e-12)))
  alpha158_005: div(sub(min({disk:open},{disk:close}),{disk:low}),{disk:open})
  alpha158_006: div(sub(max({disk:open},{disk:close}),{disk:low}),sub({disk:high},add({disk:low},1e-12)))
  alpha158_007: div(mul(2,sub({disk:close},sub({disk:high},{disk:low}))),{disk:open})
  alpha158_008: div(mul(2,sub({disk:close},sub({disk:high},{disk:low}))),sub({disk:high},add({disk:low},1e-12)))
  alpha158_009: div({disk:open},{disk:close})
  alpha158_010: div({disk:high},{disk:close})
  alpha158_011: div({disk:low},{disk:close})
  alpha158_012: div({disk:vwap},{disk:close})
  alpha158_013: div(delay({disk:volume},1),{disk:volume})
  alpha158_014: div(delay({disk:close},5),{disk:close})
  alpha158_015: div(ts_mean({disk:close},5),{disk:close})
  alpha158_016: div(ts_std({disk:close},5),{disk:close})
  alpha158_017: div(slope({disk:close},5),{disk:close})
  alpha158_018: ts_rsquare({disk:close},5)
  alpha158_019: div(residual({disk:close},5),{disk:close})
  alpha158_020: div(max({disk:high},5),{disk:close})
  # Low
  alpha158_021: div(min({disk:low},5),{disk:close})
  # QTLU
  alpha158_022: div(ts_quantile({disk:close},5,0.8),{disk:close})
  # QTLD
  alpha158_023: div(ts_quantile({disk:close},5,0.2),{disk:close})
  # RANK
  alpha158_024: rank({disk:close},5)
  # RSV
  alpha158_025: div(sub({disk:close},min({disk:low},5)),sub(max({disk:high},5),add(min({disk:low},5),1e-12)))
  # IMAX
  alpha158_026: div(ts_argmax({disk:high},5),5)
  # IMIN
  alpha158_027: div(ts_argmin({disk:low},5),5)
  # IMXD
  alpha158_028: div(sub(ts_argmax({disk:high},5),ts_argmin({disk:low},5)),5)
  # CORR
  alpha158_029: ts_corr({disk:close},log(add(1,{disk:volume})),5)
  # CORD
  alpha158_030: ts_corr(div({disk:close},delay({disk:close},1)),log(add(1,{disk:volume})),5)
  # CNTP
  alpha158_031: ts_mean(gt({disk:close},delay({disk:close},1)),5)
  # CNTN
  alpha158_032: ts_mean(lt({disk:close},delay({disk:close},1)),5)
  # CNTD
  alpha158_033: sub(ts_mean(gt({disk:close},delay({disk:close},1)),5),ts_mean(lt({disk:close},delay({disk:close},1)),5))
  # SUMP
  alpha158_034: div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),5),ts_sum(abs(sub({disk:close},delay({disk:close},1))),5))
  # SUMN
  alpha158_035: div(ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),5),ts_sum(abs(sub({disk:close},delay({disk:close},1))),5))
  # SUMD
  alpha158_036: div(div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),5),sub(ts_sum(abs(sub({disk:close},delay({disk:close},1))),5),ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),5))),ts_sum(abs(sub({disk:close},delay({disk:close},1))),5))
  # VMA
  alpha158_037: div(ts_mean({disk:volume},5),add({disk:volume},1e-12))
  # VSTD
  alpha158_038: div(ts_std({disk:volume},5),add({disk:volume},1e-12))
  # WVMA
  alpha158_039: div(ts_std(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),5),add(ts_mean(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),5),1e-12))
  # VSUMP
  alpha158_040: div(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),5),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),5),1e-12))
  # VSUMN
  alpha158_041: div(ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),5),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),5),1e-12))
  # VSUMD
  alpha158_042: div(sub(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),5),ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),5)),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),5),1e-12))
  # volume
  alpha158_043: div(delay({disk:volume},5),{disk:volume})
  alpha158_044: div(delay({disk:volume},10),{disk:volume})
  alpha158_045: div(delay({disk:volume},20),{disk:volume})
  alpha158_046: div(delay({disk:volume},30),{disk:volume})
  alpha158_047: div(delay({disk:volume},60),{disk:volume})
  # ROC
  alpha158_048: div(delay({disk:close},10),{disk:close})
  alpha158_049: div(delay({disk:close},20),{disk:close})
  alpha158_050: div(delay({disk:close},30),{disk:close})
  alpha158_051: div(delay({disk:close},60),{disk:close})
  # MA
  alpha158_052: div(ts_mean({disk:close},10),{disk:close})
  alpha158_053: div(ts_mean({disk:close},20),{disk:close})
  alpha158_054: div(ts_mean({disk:close},30),{disk:close})
  alpha158_055: div(ts_mean({disk:close},60),{disk:close})
  # STD
  alpha158_056: div(ts_std({disk:close},10),{disk:close})
  alpha158_057: div(ts_std({disk:close},20),{disk:close})
  alpha158_058: div(ts_std({disk:close},30),{disk:close})
  alpha158_059: div(ts_std({disk:close},60),{disk:close})
  # BETA
  alpha158_060: div(slope({disk:close},10),{disk:close})
  alpha158_061: div(slope({disk:close},20),{disk:close})
  alpha158_062: div(slope({disk:close},30),{disk:close})
  alpha158_063: div(slope({disk:close},60),{disk:close})
  # RSQR
  alpha158_064: div(ts_rsquare({disk:close},10),{disk:close})
  alpha158_065: div(ts_rsquare({disk:close},20),{disk:close})
  alpha158_066: div(ts_rsquare({disk:close},30),{disk:close})
  alpha158_067: div(ts_rsquare({disk:close},60),{disk:close})
  # MAX
  alpha158_068: div(ts_max({disk:close},10),{disk:close})
  alpha158_069: div(ts_max({disk:close},20),{disk:close})
  alpha158_070: div(ts_max({disk:close},30),{disk:close})
  alpha158_071: div(ts_max({disk:close},60),{disk:close})
  # MIN
  alpha158_072: div(ts_min({disk:close},10),{disk:close})
  alpha158_073: div(ts_min({disk:close},20),{disk:close})
  alpha158_074: div(ts_min({disk:close},30),{disk:close})
  alpha158_075: div(ts_min({disk:close},60),{disk:close})
  # QTLU
  alpha158_076: div(ts_quantile({disk:close}, 10, 0.8),{disk:close})
  alpha158_077: div(ts_quantile({disk:close},20, 0.8),{disk:close})
  alpha158_078: div(ts_quantile({disk:close},30, 0.8),{disk:close})
  alpha158_079: div(ts_quantile({disk:close},60, 0.8),{disk:close})
  # QTLD
  alpha158_080: div(ts_quantile({disk:close},10, 0.2),{disk:close})
  alpha158_081: div(ts_quantile({disk:close},20, 0.2),{disk:close})
  alpha158_082: div(ts_quantile({disk:close},30, 0.2),{disk:close})
  alpha158_083: div(ts_quantile({disk:close},60, 0.2),{disk:close})
  # RANK
  alpha158_084: rank({disk:close},10)
  alpha158_085: rank({disk:close},20)
  alpha158_086: rank({disk:close},30)
  alpha158_087: rank({disk:close},60)
  # RSV
  alpha158_088: div(sub({disk:close},ts_min({disk:close},10)),sub(ts_max({disk:close},10),ts_min({disk:close},10)))
  alpha158_089: div(sub({disk:close},ts_min({disk:close},20)),sub(ts_max({disk:close},20),ts_min({disk:close},20)))
  alpha158_090: div(sub({disk:close},ts_min({disk:close},30)),sub(ts_max({disk:close},30),ts_min({disk:close},30)))
  alpha158_091: div(sub({disk:close},ts_min({disk:close},60)),sub(ts_max({disk:close},60),ts_min({disk:close},60)))
  # IMAX
  alpha158_092: div(ts_argmax({disk:close},10),10)
  alpha158_093: div(ts_argmax({disk:close},20),20)
  alpha158_094: div(ts_argmax({disk:close},30),30)
  alpha158_095: div(ts_argmax({disk:close},60),60)
  # IMIN
  alpha158_096: div(ts_argmin({disk:close},10),10)
  alpha158_097: div(ts_argmin({disk:close},20),20)
  alpha158_098: div(ts_argmin({disk:close},30),30)
  alpha158_099: div(ts_argmin({disk:close},60),60)
  # IMXD
  alpha158_100: div(sub(ts_argmax({disk:high},10),ts_argmin({disk:low},10)),10)
  alpha158_101: div(sub(ts_argmax({disk:high},20),ts_argmin({disk:low},20)),20)
  alpha158_102: div(sub(ts_argmax({disk:high},30),ts_argmin({disk:low},30)),30)
  alpha158_103: div(sub(ts_argmax({disk:high},60),ts_argmin({disk:low},60)),60)
  # CORR
  alpha158_104: ts_corr({disk:close},log(add(1,{disk:volume})),10)
  alpha158_105: ts_corr({disk:close},log(add(1,{disk:volume})),20)
  alpha158_106: ts_corr({disk:close},log(add(1,{disk:volume})),30)
  alpha158_107: ts_corr({disk:close},log(add(1,{disk:volume})),60)
  # CNTP
  alpha158_108: ts_mean(gt({disk:close},delay({disk:close},1)),10)
  alpha158_109: ts_mean(gt({disk:close},delay({disk:close},1)),20)
  alpha158_110: ts_mean(gt({disk:close},delay({disk:close},1)),30)
  alpha158_111: ts_mean(gt({disk:close},delay({disk:close},1)),60)
  # CNTN
  alpha158_112: ts_mean(lt({disk:close},delay({disk:close},1)),10)
  alpha158_113: ts_mean(lt({disk:close},delay({disk:close},1)),20)
  alpha158_114: ts_mean(lt({disk:close},delay({disk:close},1)),30)
  alpha158_115: ts_mean(lt({disk:close},delay({disk:close},1)),60)
  # CNTD
  alpha158_116: sub(ts_mean(gt({disk:close},delay({disk:close},1)),10),ts_mean(lt({disk:close},delay({disk:close},1)),10))
  alpha158_117: sub(ts_mean(gt({disk:close},delay({disk:close},1)),20),ts_mean(lt({disk:close},delay({disk:close},1)),20))
  alpha158_118: sub(ts_mean(gt({disk:close},delay({disk:close},1)),30),ts_mean(lt({disk:close},delay({disk:close},1)),30))
  alpha158_119: sub(ts_mean(gt({disk:close},delay({disk:close},1)),60),ts_mean(lt({disk:close},delay({disk:close},1)),60))
  # SUMP
  alpha158_120: div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),10),ts_sum(abs(sub({disk:close},delay({disk:close},1))),10))
  alpha158_121: div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),20),ts_sum(abs(sub({disk:close},delay({disk:close},1))),20))
  alpha158_122: div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),30),ts_sum(abs(sub({disk:close},delay({disk:close},1))),30))
  alpha158_123: div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),60),ts_sum(abs(sub({disk:close},delay({disk:close},1))),60))
  # SUMN
  alpha158_124: div(ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),10),ts_sum(abs(sub({disk:close},delay({disk:close},1))),10))
  alpha158_125: div(ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),20),ts_sum(abs(sub({disk:close},delay({disk:close},1))),20))
  alpha158_126: div(ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),30),ts_sum(abs(sub({disk:close},delay({disk:close},1))),30))
  alpha158_127: div(ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),60),ts_sum(abs(sub({disk:close},delay({disk:close},1))),60))
  # SUMD
  alpha158_128: div(div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),10),sub(ts_sum(abs(sub({disk:close},delay({disk:close},1))),10),ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),10))),ts_sum(abs(sub({disk:close},delay({disk:close},1))),10))
  alpha158_129: div(div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),20),sub(ts_sum(abs(sub({disk:close},delay({disk:close},1))),20),ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),20))),ts_sum(abs(sub({disk:close},delay({disk:close},1))),20))
  alpha158_130: div(div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),30),sub(ts_sum(abs(sub({disk:close},delay({disk:close},1))),30),ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),30))),ts_sum(abs(sub({disk:close},delay({disk:close},1))),30))
  alpha158_131: div(div(ts_sum(max(sub({disk:close},delay({disk:close},1)),0),60),sub(ts_sum(abs(sub({disk:close},delay({disk:close},1))),60),ts_sum(max(sub(delay({disk:close},1),{disk:close}),0),60))),ts_sum(abs(sub({disk:close},delay({disk:close},1))),60))
  # VMA
  alpha158_132: div(ts_mean({disk:volume},10),add({disk:volume},1e-12))
  alpha158_133: div(ts_mean({disk:volume},20),add({disk:volume},1e-12))
  alpha158_134: div(ts_mean({disk:volume},30),add({disk:volume},1e-12))
  alpha158_135: div(ts_mean({disk:volume},60),add({disk:volume},1e-12))
  # VSTD
  alpha158_136: div(ts_std({disk:volume},10),add({disk:volume},1e-12))
  alpha158_137: div(ts_std({disk:volume},20),add({disk:volume},1e-12))
  alpha158_138: div(ts_std({disk:volume},30),add({disk:volume},1e-12))
  alpha158_139: div(ts_std({disk:volume},60),add({disk:volume},1e-12))
  # WVMA
  alpha158_140: div(ts_std(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),10),add(ts_mean(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),10),1e-12))
  alpha158_141: div(ts_std(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),20),add(ts_mean(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),20),1e-12))
  alpha158_142: div(ts_std(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),30),add(ts_mean(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),30),1e-12))
  alpha158_143: div(ts_std(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),60),add(ts_mean(mul(abs(div({disk:close},sub(delay({disk:close},1),1))),{disk:volume}),60),1e-12))
  # VSUMP
  alpha158_144: div(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),10),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),10),1e-12))
  alpha158_145: div(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),20),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),20),1e-12))
  alpha158_146: div(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),30),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),30),1e-12))
  alpha158_147: div(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),60),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),60),1e-12))
  # VSUMN
  alpha158_148: div(ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),10),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),10),1e-12))
  alpha158_149: div(ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),20),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),20),1e-12))
  alpha158_150: div(ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),30),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),30),1e-12))
  alpha158_151: div(ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),60),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),60),1e-12))
  # VSUMD
  alpha158_152: div(sub(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),10),ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),10)),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),10),1e-12))
  alpha158_153: div(sub(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),20),ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),20)),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),20),1e-12))
  alpha158_154: div(sub(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),30),ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),30)),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),30),1e-12))
  alpha158_155: div(sub(ts_sum(max(sub({disk:volume},delay({disk:volume},1)),0),60),ts_sum(max(sub(delay({disk:volume},1),{disk:volume}),0),60)),add(ts_sum(abs(sub({disk:volume},delay({disk:volume},1))),60),1e-12))
