Jiang-Nan Yang
1 min readDec 28, 2016

--

Dude, you are making a serious mistake and wasted me almost a whole day to figure out. You are making the most important mistake in financial prediction, i.e., using future data to predict the future! Your results of MLP using scaled data were just too good to be true, but your model would not work at all in reality. Why? When you scale Xi and Yi, you passed them all together to the scaling function, thus built a hidden function between Yi scaled Xi:

timeseries = np.array(data[i:i+train+predict])
if scale: timeseries = preprocessing.scale(timeseries)
x_i = timeseries[:-1]
y_i = timeseries[-1]

However, in reality, you will never be able to perform the same scaling to you data because Yi is from the future and does not exist yet!!

If you apply your model to live trading, it is going to cost you a lot of money!

--

--