Hello,
Concerning the training data and the test data, I'm a bit confused.
In the course, we assume that we have stock market data from today up to 10 years back.
So the prediction seems to work perfectly.
If we have to make a prediction about tomorrow or the next 100 days or years, we don't know the data on which to test.
on which to run the test (30% for the test). How can the prediction be implemented? Since we're assuming that our
application will have to be used in the real world (predicting and trading the next prediction in real time).
What solution or approach should we implement to solve this problem?
In my humble opinion, since the stock_prediction_using_lstm model has already been processed, 70% of the test will represent
previous data for an entire market over 10 years, but 30% of this market remains unknown.
Hi Oswald,
Thanks for your question! I totally understand your confusion about training and test data in real-world stock predictions.
In our course, we use 70% of historical data for training the model and 30% for testing. This setup helps us see how well the model learns from the past and how accurately it can predict data it hasn’t seen before. But remember, this is just for educational purposes to help you grasp the concepts.
Now, when we think about predicting stocks in the real world, it gets a bit trickier. You're spot on—predicting future prices isn't as straightforward because we don’t have access to future data. One approach we can use is the sliding window method. Basically, you train the model on the latest available data (like the past 70 days) and then make a prediction for the next day. After that prediction, you’d retrain the model with the new data to keep it up to date.
Another thing to keep in mind is that stock markets are influenced by all sorts of unpredictable factors—news, events, and investor sentiment—that the model can’t always account for.
That said, I want to point out that predicting exact future prices using these techniques is a bit beyond what we cover in this course. Our focus is really on helping you understand the fundamentals of stock prediction using LSTM models.
I hope this clears things up! If you have any more questions, feel free to ask!
Best,
Rathan
Thanks for the details. I understand.
@oswaldjchrisgmail-com Your most welcome. If you have any more questions, feel free to ask!