Phenomenal! It appears that we are able to almost perfectly predict the stock price on the next day given a set of previous days. We didn't even have to train a fancy neural network! So, why bother to continue? Well, as it turns out, predicting the stock price one day in advance does not really make us millionaires. Moving averages are inherently lagging indicators. They are metrics that reflect significant changes in the market only after the stock price has started to follow a particular trend. Due to the short time span between our predictions and the actual occurrence of the event, the optimal point for market entry would have already passed by the time such a model would reflect a significant trend.
On the other hand, using this method to try to predict multiple timesteps into the future will also not work. We can actually...