This can’t predict stock prices as the model used is newly created each time and applied without having been trained. You need to create a trained model per stock (for each frequency period), and then use a stock’s pre-trained model to generate predictions based on the stock’s latest data.
Model is not created every time you predict a particular stock. Ex : someone searches for AAPL and generates predictions and now this prediction is valid for the day and if second user wants to search for AAPL data is just fetched from mongo.
Coming to your concern Even if model is trained every other day, it is trained again and again on the same past history dataset with the newly updated stock price(current day)?
So that model keeps on learning on every new data! Where am I wrong now? Do let me know?
Creating a trained model for each individual stock, especially when dealing with a large number of ticker symbols, can be an arduous and time-consuming task
Okay, I saw the conditional for when the DB result is empty, you fit a new model for the stock ticker.