If you preprocess the input data with pct_change(), it would work for the prices, but I’m afraid it will not for the volume, as far you are not taking into account that the market behavior won’t be the same if volume is 10 or 10000. And what if the price of tomorrow is outside the range of your scaler? The prediction’s accuracy will decrease. Kindly note that you wouldn’t have this problem using RSI or CCI indicators because their value range are more or less stable, so you could scale them using the whole training set. And their values are very important: a RSI of 10 is not the same as a RSI of 90 even if the changes along the window are quite similar. Therefore, just a np.log() preprocessing would be enough for those technical indicators. To sum it up, I think you are doing a great job with these tutorial series, but in my honest opinion, before tuning the NN parameters or creating fancy custom loss functions, you should spend more time with feature generation, feature selection and preprocessing (maybe some PCA as well). This is the very first step.
