the forecast plot in figure - shows promising picture we can see that the training fit is nearly perfect which is kind of expected the testing performance or the forecast also shows decent performance even though the forecast deviates from the actual at placesthe overall performance both in terms of rmse and the fit seemed to have worked through the use of timedistributed layer wrapper we achieved the goal of modeling this data as time series the model not just had better performance in terms of overall fitit required far less feature engineering and much simpler model (in terms of number of training parametersin this modelwe also truly utilized the power of lstms by allowing it to learn and figure out what and how much of past information impacts the forecast (as compared to regression modeling case where we had restricted the window sizestwo important points before we conclude this section firstboth the models have their own advantages and disadvantages the aim of this section was to chalk out potential ways of modeling given problem the actual usage mostly depends upon the requirements of the use case secondly and more importantlyeither of the models is for learning/demonstration purposes actual stock price forecasting requires far more rigor and knowledgewe just scraped the tip of the iceberg upcoming techniquesprophet the data science landscape is ever evolving and new algorithmstweaks and tools are coming up at rapid pace one such tool is called prophet this is frameworkopen sourced by facebook' data science team for analyzing and forecasting time series prophet uses an additive model that can work with trending and seasonal data the aim of this tool is to enable forecasting at scale this is still in betayet has some really useful features more on this is available at is available in the paper available at paper_ pdf the installation steps are outlined on the web site and are straightforward through pip and conda prophet also uses scikit style apis of fit(and predict(with additional utilities to better handle time series data for the hands-on examples in this sectionyou can refer to the jupyter notebook notebook_stock_prediction_fbprophet ipynb for the necessary code snippets and examples ##note prophet is still in beta and is undergoing changes alsoits installation on windows platform is known to cause issues kindly use conda install (steps mentioned on the web sitewith anaconda distribution to avoid issues since we already have the & index price information available in dataframe/series we now test how we can use this tool to forecast we begin with converting the time series index into column of its own (simply how prophet expects the datafollowed by splitting the series into training and testing ( - splitthe following snippet performs the required actions in [ reset index to get date_time as column prophet_df sp_df reset_index(prepare the required dataframe prophet_df rename(columns={'index':'ds','close':' '},inplace=trueprophet_df prophet_df[['ds',' ']