Abstract
Predicting the stock market is a widely studied field, either due to the curiosity in finding an explanation for the behavior of financial assets or for financial purposes. Among these studies the best techniques use neural networks as a prediction tool. More specifically, the best networks for this purpose are called recurrent neural networks (RNN) and provide an extra option when dealing with a sequence of values. However, a great part of the studies is intended to predict the result of few stocks, therefore, this work aims to predict the behavior of a large number of stocks. For this, similar stocks were grouped based on their correlation and later the algorithm K-means was applied so that similar groups were clustered. After this process, the Long Short-Term Memory (LSTM) - a type of RNN - was used in order to predict the price of a certain group of assets. Results showed that clustering stocks did not influence the effectiveness of the network and that investors and portfolio managers can use it to simply their daily tasks.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Affonso, F., de Oliveira, F., Dias, T.M.R.: Uma análise dos fatores que influenciam o movimento acionário das empresas petrolíferas. In: Ibero-Latin American Congress on Computational Methods in Engineering (CILAMCE) (2017)
Bengio, Y., Simard, P., Frasconi, P.: Learning long-term dependencies with gradient descent is difficult. IEEE Trans. Neural Netw. 5(2), 157–166 (1994)
Bini, B.S., Mathew, T.: Clustering and regression techniques for stock prediction. Procedia Technol. 24, 1248–1255 (2016)
Cavalcante, R.C., Brasileiro, R.C., Souza, V.L., Nobrega, J.P., Oliveira, A.L.: Computational intelligence and financial markets: a survey and future directions. Expert Syst. Appl. 55, 194–211 (2016)
Chollet, F.: Keras (2015). https://keras.io
Chong, E., Han, C., Park, F.C.: Deep learning networks for stock market analysis and prediction: methodology, data representations, and case studies. Expert Syst. Appl. 83, 187–205 (2017)
Filho, D.B.F., Júnior, J.A.D.S.: Desvendando os mistérios do coeficiente de correlacão de pearson (r). Universidade Federal de Pernambuco (2009)
Fischer, T., Krauss, C.: Deep learning with long short-term memory networks for financial market predictions. Eur. J. Oper. Res. 270(2), 654–669 (2018)
Gan, G., Ma, C., Wu, J.: Data Clustering: Theory, Algorithms, and Applications, vol. 20. SIAM (2007)
Gerlein, E.A., McGinnity, M., Belatreche, A., Coleman, S.: Evaluating machine learning classification for financial trading: an empirical approach. Expert Syst. Appl. 54, 193–207 (2016)
Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997)
Jung, S.S., Chang, W.: Clustering stocks using partial correlation coefficients. Phys. A: Stat. Mech. Appl. 462, 410–420 (2016)
Ketchen, D.J., Shook, C.L.: The application of cluster analysis in strategic management research: an analysis and critique. Strat. Manag. J. 17(6), 441–458 (1996)
Krauss, C., Do, X.A., Huck, N.: Deep neural networks, gradient-boosted trees, random forests: statistical arbitrage on the S&P 500. Eur. J. Oper. Res. 259(2), 689–702 (2017)
Kumar, B.S., Ravi, V.: A survey of the applications of text mining in financial domain. Knowl.-Based Syst. 114, 128–147 (2016)
Längkvist, M., Karlsson, L., Loutfi, A.: A review of unsupervised feature learning and deep learning for time-series modeling. Pattern Recognit. Lett. 42, 11–24 (2014)
LeCun, Y., Bengio, Y., Hinton, G.: Deep learning. Nature 521(7553), 436 (2015)
Li, Y., Jiang, W., Yang, L., Wu, T.: On neural networks and learning systems for business computing. Neurocomputing 275, 1150–1159 (2018)
Liu, Y., Li, Z., Xiong, H., Gao, X., Wu, J.: Understanding of internal clustering validation measures. In: ICDM, pp. 911–916 (2010)
Mirkin, B.G.: Mathematical Classification and Clustering. Kluwer Academic Publishing, Dordrecht (1996)
Momeni, M., Mohseni, M., Soofi, M.: Clustering stock market companies via k-means algorithm. Kuwait Chap. Arab. J. Bus. Manag. Rev. 4(5), 1 (2015)
Nanda, S.R., Mahanty, B., Tiwari, M.K.: Clustering Indian stock market data for portfolio management. Expert Syst. Appl. 37(12), 8793–8798 (2010)
Nelson, D.M., Pereira, A.C., de Oliveira, R.A.: Stock market’s price movement prediction with LSTM neural networks. In: 2017 International Joint Conference on Neural Networks (IJCNN), pp. 1419–1426. IEEE (2017)
Python Software Foundation: Python 3.5.5 documentation (2018). https://docs.python.org/3.5/
Qiu, M., Song, Y., Akagi, F.: Application of artificial neural network for the prediction of stock market returns: the case of the Japanese stock market. Chaos, Solitons Fractals 85, 1–7 (2016)
Zhang, J., Cui, S., Xu, Y., Li, Q., Li, T.: A novel data-driven stock price trend prediction system. Expert Syst. Appl. 97, 60–69 (2018)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering
About this paper
Cite this paper
Affonso, F., Dias, T.M.R., Pinto, A.L. (2020). A Method for Clustering and Predicting Stocks Prices by Using Recurrent Neural Networks. In: Mugnaini, R. (eds) Data and Information in Online Environments. DIONE 2020. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 319. Springer, Cham. https://doi.org/10.1007/978-3-030-50072-6_3
Download citation
DOI: https://doi.org/10.1007/978-3-030-50072-6_3
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-50071-9
Online ISBN: 978-3-030-50072-6
eBook Packages: Computer ScienceComputer Science (R0)