Skip to main content

Stocks Clustering Based on Textual Embeddings for Price Forecasting

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 12320))

Abstract

Forecasting stock market prices is a hard task. The main reason for that is due to the fact that its environment is highly dynamic, intrinsically complex, and chaotic. Traditional economic theories suggest that trying to forecast short-term stock price movements is a wasted effort because the market is influenced by several external events and its behavior approximates a random walk. Recent studies that address the problem of stock market forecasting usually create specific prediction models for the price behavior of a single stock. In this work we propose a technique to predict price movements based on similar stock sets. Our goal is to build a model to identify whether the price tends to bullishness or bearishness in the near future, considering stock information from similar sets based on two sources of information: historical stock data and Google Trends news. Firstly, the proposed study applies a method to identify similar stock sets and then creates a forecasting model based on a LSTM (long short-term memory) for these sets. More specifically, two experiments were conducted: (1) using the K-Means algorithm to identify similar stock sets and then using a LSTM neural network to forecast stock price movements for these stock sets; (2) using the DBSCAN (Density-based spatial clustering) algorithm to identify similar stock sets and then using the same LSTM neural network to forecast stock price movements. The study was conducted over 51 stocks of the Brazilian stock market. The results show that the use of an algorithm to identify stock clusters yields an improvement of approximately 7% in accuracy and f1-score and 8% in recall and precision when compared to models for a single stock.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    https://www.bbc.com/news/world-latin-america-47021084.

  2. 2.

    ftp://ftp.bmf.com.br/MarketData.

  3. 3.

    https://moneytimes.com.br.

  4. 4.

    https://noticias.uol.com.br.

  5. 5.

    https://economia.estadao.com.br.

  6. 6.

    https://spacemoney.com.br.

  7. 7.

    https://oglobo.globo.com/.

  8. 8.

    https://trends.google.com/trends/?geo=BR.

  9. 9.

    http://bvmf.bmfbovespa.com.br/cias-listadas/empresas-listadas/BuscaEmpresaListada.aspx?idioma=pt-br.

References

  1. Abhishek, K., Khairwa, A., Pratap, T., Prakash, S.: A stock market prediction model using artificial neural network. In: 2012 Third International Conference on IEEE Computing Communication & Networking Technologies (ICCCNT), pp. 1–5 (2012)

    Google Scholar 

  2. Attigeri, G.V., Manohara Pai, M.M., Pai, R.M., Nayak, A.: Stock market prediction: a big data approach. In: TENCON 2015–2015 IEEE Region 10 Conference, pp. 1–5 (2015)

    Google Scholar 

  3. Boonpeng, S., Jeatrakul, P.: Enhance the performance of neural networks for stock market prediction: an analytical study. In: 2014 Ninth International Conference on IEEE Digital Information Management (ICDIM), pp. 1–6 (2014)

    Google Scholar 

  4. Cheng, C.-H., Chen, T.-L., Wei, L.-Y.: A hybrid model based on rough sets theory and genetic algorithms for stock price forecasting. Inf. Sci. 180, 1610–1629 (2010)

    Article  Google Scholar 

  5. De Melo, J.P.F., Ruy, M.: Predicting Trends in the Stock Market. MAXWELL (2018)

    Google Scholar 

  6. Fama, E.: The behavior of stock-market prices. The J. Bus. 38, 34–105 (1965)

    Article  Google Scholar 

  7. Huang, C.-J., Yang, D.-X., Chuang, Y.-T.: Application of wrapper approach and composite classifier to the stock trend prediction. Expert Syst. Appl. 34, 2870–2878 (2008)

    Article  Google Scholar 

  8. Hu, H., Tang, L., Zhang, S., Wang, H.: Predicting the direction of stock markets using optimized neural networks with Google Trends. Neurocomputing 285, 188–195 (2018)

    Article  Google Scholar 

  9. Iacomin, R.: Stock market prediction. In: 2015 19th International Conference on IEEE System Theory, Control and Computing (ICSTCC), pp. 200–205 (2015)

    Google Scholar 

  10. Kimoto, T., Asakawa, K., Yoda, M., Takeoka, M.: Stock market prediction system with modular neural networks. In: IJCNN International Joint Conference on Neural Networks, pp. 1–6 (1990)

    Google Scholar 

  11. Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980 (2014)

  12. Le, Q., Mikolov, T.: Distributed representations of sentences and documents. In: International Conference on Machine Learning, pp. 1188–1196 (2014)

    Google Scholar 

  13. Lee, M.-C.: Using support vector machine with a hybrid feature selection method to the stock trend prediction. Expert Syst. Appl. 36, 10896–10904 (2009)

    Article  Google Scholar 

  14. Malkiel, B.G.: A Random Walk Down Wall Street: The Time-tested Strategy for Successful Investing. WW Norton & Company, New York (2007)

    Google Scholar 

  15. Abadi, M., et al.: TensorFlow: large-scale machine learning on heterogeneous systems (2015)

    Google Scholar 

  16. Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781 (2013)

  17. Mingyue, Q., Cheng, L., Yu, S.: Application of the artifical neural network in predicting the direction of stock market index. In: 2016 10th International Conference on Complex, Intelligent, and Software Intensive Systems (CISIS), pp. 219–223 (2016)

    Google Scholar 

  18. Nelson, D.M.Q., Pereira, A.C.M., de Oliveira, R.A.: Stock market’s price movement prediction with LSTM neural networks. In: 2017 International Joint Conference on Neural Networks (IJCNN) (2017)

    Google Scholar 

  19. Sable, S., Porwal, A., Singh, U.: Stock price prediction using genetic algorithms and evolution strategies. In: 2017 International Conference of IEEE Electronics, Communication and Aerospace Technology (ICECA), vol. 2, pp. 549–553 (2017)

    Google Scholar 

  20. Siew, H.L., Nordin, Md.J.: Regression techniques for the prediction of stock price trend. In: Statistics in Science, Business, and Engineering (ICSSBE), Langkawi Universiti Kuala Lumpur, pp. 1–5 (2012)

    Google Scholar 

  21. Sun, T., Wang, J., Zhang, P., Cao, Y., Liu, B., Wang, D.: Predicting stock price returns using microblog sentiment for Chinese stock market. In: 2017 3rd International Conference on IEEE Big Data Computing and Communications (BIGCOM), pp. 87–96 (2017)

    Google Scholar 

  22. Tan, T.Z., Quek, C., Ng, G.S.: Brain-inspired genetic complementary learning for stock market prediction. In: The 2005 IEEE Congress on IEEE Evolutionary Computation, vol. 3, pp. 2653–2660 (2005)

    Google Scholar 

  23. Wang, J.-H., Leu, J.-Y.: Stock market trend prediction using ARIMA-based neural networks. IEEE International Conference on Neural Networks, vol. 4, pp. 2160–2165 (1996)

    Google Scholar 

  24. Yang, B., Gong, Zi.-J., Yang, W.: Stock market index prediction using deep neural network ensemble. In: 2017 36th Chinese Control Conference (CCC), pp. 3882–3887 (2017)

    Google Scholar 

  25. Zhou, F., Zhou, H., Yang, Z., Yang, L.: EMD2FNN: a strategy combining empirical mode decomposition and factorization machine based neural network for stock market trend prediction. Expert Syst. Appl. 115, 136–151 (2019)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to André D. C. M. de Oliveira .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

de Oliveira, A.D.C.M., Pinto, P.F.A., Colcher, S. (2020). Stocks Clustering Based on Textual Embeddings for Price Forecasting. In: Cerri, R., Prati, R.C. (eds) Intelligent Systems. BRACIS 2020. Lecture Notes in Computer Science(), vol 12320. Springer, Cham. https://doi.org/10.1007/978-3-030-61380-8_45

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-61380-8_45

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-61379-2

  • Online ISBN: 978-3-030-61380-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics