Hello Qt community,
I've seen this video which talks about how to compress different indicators into a sin
https://www.youtube.com/watch?v=sDu6CudKa0Q
I tried to do the same by this way:
data_hist['sma10'] = talib.SMA(data_hist['close'].values, 10)
data_hist['difsma'] = data_hist['close'] - data_hist['sma10']
data_hist['cci10'] = talib.CCI(data_hist['high'].values, data_hist['low'].values, data_hist['close'].values, 10)
data_hist['mom5'] = talib.MOM(data_hist['close'].values, 5)
data_hist.dropna(inplace=True)
data_hist['difsma'] = data_hist['close'] - data_hist['sma10']
cols = ['cci10', 'mom5', 'difsma']
data_hist['norm'] = ( data_hist[cols].sum(axis=1) - data_hist[cols].mean(axis=1) ) / data_hist[cols].std(axis=1)
But this is an example of output data (it's not between -1 and 1...)
2013-09-11 00:00:00+00:00 -1.557247
2013-09-12 00:00:00+00:00 -1.686368
2013-09-13 00:00:00+00:00 -2.160459
2013-09-16 00:00:00+00:00 -2.805381
2013-09-17 00:00:00+00:00 -2.770916
2013-09-18 00:00:00+00:00 -1.726371
2013-09-19 00:00:00+00:00 -1.610760
2013-09-20 00:00:00+00:00 -1.645410
2013-09-23 00:00:00+00:00 2.143846
2013-09-24 00:00:00+00:00 1.863802
2013-09-25 00:00:00+00:00 1.847545
2013-09-26 00:00:00+00:00 1.956981
2013-09-27 00:00:00+00:00 2.507031
2013-09-30 00:00:00+00:00 -0.856816
2013-10-01 00:00:00+00:00 1.422277
2013-10-02 00:00:00+00:00 1.604809
What am I missing out? Any alternative to compress various indicators in a single column?