Prediction of stock prices has been a focal point of the financial body of knowledge for decades now. The complexity of stock price prediction involves various factors, including market trends, economic indicators, company performance, news sentiment, and more. Accordingly, stock prices are said to follow the ‘random walk hypothesis’. This systemic factor should be coupled with the limited human cognitive abilities to envisage the dynamics of financial markets. Novel machine learning algorithms have been advocated as potentially supreme replacement for the ‘human-centric’ stock prediction approaches. Hitherto, a myriad of machine learning algorithms has been effectively used for this purpose – ARIMA (Auto-Regressive Integrated Moving Average), XGBoost (Random Forest and Gradient Boosting Algorithms), CNN (Convolutional Neural Networks) or LSTM (Long Short-Term Memory). The aim of this paper is to test the predictive capacity of LSTM on a sample of large global food industry companies. The prices of shares of five companies were observed, namely: PEP (PepsiCo), TSN (Tyson Foods), NSRGY (Nestle), JBSAY (JBS S.A.), KHC (The Kraft Heinz Company), in the period from 01.01.2015. until 1.11.2022. Based on the data from this time range, a stock price forecast for Nov 2nd, 2022, was made. The results indicate very precise prediction since the difference between predicted and real stock price is insignificant. Keywords: stock price, machine learning, long-short term memory, food-processing industry
Read full abstract