Predicting the Stock Market using Machine Learning: Long short-term Memory
Electronic Research Journal of Engineering, Computer and Applied Sciences, 2, 2020, 202-219
18 Pages Posted: 8 Apr 2021
Date Written: 2020
The stock market is notorious for its intense uncertainty and instability, and researchers and investors alike often try a detailed and useful way to direct their stock trading. Long short-term memory (LSTM) neural networks are a subtype of Recurrent neural networks (RNNs) having significant practical utility in a wide variety of applications. Moreover, due to its unique ability to ‘remember,’ LSTMs do not depend on the long-term and can, therefore help forecast financial time series such as the stock market. In this study, we use sci-kit learn’s min-max scaler to transform the data, extract features, and establish our model for prediction. To make our analysis holistic, we use daily price data for two entities listed on two different stock exchanges. All stages of the study have been conducted using various libraries of the Python programming language using the iPython Notebook. Our results suggest that LSTMs may be more effective than traditional linear techniques such as ARIMA since the latter can not capture the non-linear factors of a problem. Furthermore, even though LSTM is better for the issue at hand, they may perform worse for others unless tuned accordingly.
Keywords: Python, AI, LSTM, Stock Market
JEL Classification: 100
Suggested Citation: Suggested Citation