LSTM Neural Networks and ARIMA for Stock Prediction
Historical prices of commodities or stock indexes can help us understand the way the commodity/stock has performed over the past and can help us also predict its price in the near future. We can use this data to our advantage apply various time series models depending on whether it is univariate or multivariate. “The accurate prediction of trends in stock price can not only help investors avoid and control risks in time, but also have important guiding significance in reducing investment losses.”[1]. Auto-Regressive Moving average is known for univariate time series predictions with average accuracy of 80 % .ARIMA-GARCH/APARCH family of models, using the Box-Jenkins methodology are often used to forecast the movement of stock prices.[2] The disadvantages of these models are that they are based on historical prices and tend to indicate the trend at a later stage after the movement has already been taken. Recent development in computational power and advancements in neural networks/deep learning have helped us up bring models which have accuracy to 98% . “In financial time series, the data often show a strong correlation, and historical information also has very high value in application”.[3] Long Short term memory part of re-current neural network works by plugging together input from next layer to earlier nodes thereby allowing it to have backward travel in a feedforward network.
We will be using stock prices of Apple Inc. in the dataset which is taken from yahoo finance computed daily. Our dataset is containing stock prices for roughly past 10 years from Feb 2009 to Feb 2019.
Line Plot of Actual VS Predicted Set
Line Plot of Actual VS Predicted Set
Training Phase
Line Plot of Actual VS Predicted LSTM
https://medium.com/@dr.siddhaling
Dr. Siddhaling Urolagin,
PhD, Post-Doc, Machine Learning and Data Science Expert,
Passionate Researcher, Deep Learning, Machine Learning and applications,
dr.siddhaling@gmail.com
References [1]: Shui-Ling YU and Zhe Lia,*Stock Price Prediction Based on ARIMA-RNN Combined Model, 2017 4th International Conference on Social Science (ICSS 2017) , ISBN: 978-1-60595-525-4 [2]: Derek LAM , Lincoln College , Time Series Modelling of Monthly WTI Crude Oil Returns, 2017 [3]: Shui-Ling YU and Zhe Lia,*Stock Price Prediction Based on ARIMA-RNN Combined Model, 2017 4th International Conference on Social Science (ICSS 2017) , ISBN: 978-1-60595-525-4