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

See all articles by Khalid Saboor

Khalid Saboor

Beihang University (BUAA) - School of Economic and Management Science

Qurat Ul Ain Saboor

National Defense University, Islamabad

Liyan Han

Beihang University (BUAA) - School of Economic and Management Science

Abdul Saboor Zahid

National Defence University

Date Written: 2020

Abstract

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

Saboor, Khalid and Saboor, Qurat Ul Ain and Han, Liyan and Zahid, Abdul Saboor, Predicting the Stock Market using Machine Learning: Long short-term Memory (2020). Electronic Research Journal of Engineering, Computer and Applied Sciences, 2, 2020, 202-219, Available at SSRN: https://ssrn.com/abstract=3810128

Khalid Saboor (Contact Author)

Beihang University (BUAA) - School of Economic and Management Science ( email )

37 Xue Yuan Road
Beijing 100083
China

Qurat Ul Ain Saboor

National Defense University, Islamabad

E-9 Islamabad
Islamabad, Federal
Pakistan

Liyan Han

Beihang University (BUAA) - School of Economic and Management Science ( email )

37 Xue Yuan Road
Beijing 100083
China

Abdul Saboor Zahid

National Defence University

Islamabad
Pakistan

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
58
Abstract Views
185
rank
448,174
PlumX Metrics