Skip to main content

A Novel Deep Learning Approach to Find Similar Stocks Using Vector Embeddings

  • Conference paper
  • First Online:
Evolution in Computational Intelligence (FICTA 2023)

Part of the book series: Smart Innovation, Systems and Technologies ((SIST,volume 370))

  • 290 Accesses

Abstract

In today’s highly integrated and globalized world, it’s been observed many times that a group of stocks move in tandem with each other, showing almost similar price movements. Stocks belonging to the same sector usually exhibit this phenomenon. But, the relation/similarity between stocks can be beyond just belonging to the same sector. Also, the relationship between stocks can vary over time. In this paper, an autoencoder is created to find similar stocks in a certain period of time using vector embeddings by using deep learning approach. The premise is that stocks with similar vector representation (bottleneck of autoencoder) will also be similar and would display similar behavior and characteristics. Stock data of Nifty 50 was considered, and performance is evaluated by using Euclidean, cosine, and a combination of Euclidean and cosine similarities, and it is proved that the Euclidean distance is outperforming other metrics.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Lecun, Y., Bottou, L., Bengio, Y., Haffner, P.: Gradient-based learning applied to document recognition. Proc. IEEE 86(11), 2278–2324 (1998). https://doi.org/10.1109/5.726791

    Article  Google Scholar 

  2. Zaidi, S.S.A., Ansari, M.S., Aslam, A., Kanwal, N., Asghar, M.N., Lee, B.: A survey of modern deep learning based object detection models. CoRR. https://arxiv.org/abs/2104.11892 (2021)

  3. Torfi, A., Shirvani, R.A., Keneshloo, Y., Tavaf, N., Fox, E.A.: Natural language processing advancements by deep learning: a survey. CoRR. https://arxiv.org/abs/2003.01200 (2020)

  4. Vaswani, A., et al.: Attention is all you need. CoRR. http://arxiv.org/abs/1706.03762 (2017)

  5. Devlin, J., Chang, M.-W., Lee, K., Toutanova, K.: BERT: pre-training of deep bidirectional transformers for language understanding. CoRR. http://arxiv.org/abs/1810.04805 (2018)

  6. Mehtab, S., Sen, J.: Stock price prediction using CNN and LSTM-based deep learning models. In: Proceedings of the 2020 International Conference on Decision Aid Sciences and Application (DASA), pp. 447–453 (2020)

    Google Scholar 

  7. Ghosh, P., Neufeld, A., Sahoo, J.K.: Forecasting directional movements of stock prices for intraday trading using LSTM and random forests. CoRR. https://arxiv.org/abs/2004.10178 (2020)

  8. Kamalov, F., Smail, L., Gurrib, I.: Stock price forecast with deep learning. In: Proceedings of the 2020 International Conference on Decision Aid Sciences and Application (DASA), pp. 1098–1102 (2020)

    Google Scholar 

  9. Liao, S., Chen, J., Ni, H.: Forex Trading Volatility Prediction Using NeuralNetwork Models. arXiv preprint arXiv:2112.01166 (2021)

  10. Markowitz, H.: Portfolio selection. J. Fin. 7(1), 77–91 (1952). https://doi.org/10.2307/2975974

    Article  Google Scholar 

  11. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9, 1735–1780 (1997). https://doi.org/10.1162/neco.1997.9.8.1735

    Article  Google Scholar 

  12. Dolphin, R., Smyth, B., Dong R.: Stock Embeddings: Learning Distributed Representations for Financial Assets. arXiv preprint arXiv:2202.08968 (2022)

  13. Pennington, J., Socher, R., Manning, C.: GloVe: global vectors for word representation. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543 (2014). https://doi.org/10.3115/v1/D14-1162

  14. Mikolov, T., Chen, K., Corrado, G.S., Dean, J.: Efficient estimation of word representations in vector space. In: Proceedings of Workshop at ICLR (2013)

    Google Scholar 

  15. Rahimikia, E., Zohren, S., Poon, S.H.: Realised Volatility Forecasting: Machine Learning Via Financial Word Embedding. arXiv preprint arXiv:2108.00480 (2021)

  16. Guo, C., Berkhahn, F.: Entity embeddings of categorical variables. CoRR. http://arxiv.org/abs/1604.06737 (2016)

  17. Bengio, Y., Yao, L., Alain, G., Vincent, P.: Generalized denoising auto-encoders as generative models. CoRR. http://arxiv.org/abs/1305.6663 (2013)

  18. Ladjal, S., Newson, A., Pham, C.H.: A PCA-like autoencoder. CoRR. http://arxiv.org/abs/1904.01277 (2019)

  19. Fournier, Q., Aloise, D.: Empirical comparison between autoencoders and traditional dimensionality reduction methods. CoRR. https://arxiv.org/abs/2103.04874 (2021)

  20. Pinapatruni, R., Shoba Bindu, C.: Learning image representation from image reconstruction for a content-based medical image retrieval. SIViP 14, 1319–1326 (2020)

    Article  Google Scholar 

  21. Pinapatruni, R., Chigarapalle, S.B.: Adversarial image reconstruction learning framework for medical image retrieval. SIViP 16, 1197–1204 (2022)

    Article  Google Scholar 

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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rohini Pinapatruni .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Pinapatruni, R., Mohammed, F. (2023). A Novel Deep Learning Approach to Find Similar Stocks Using Vector Embeddings. In: Bhateja, V., Yang, XS., Ferreira, M.C., Sengar, S.S., Travieso-Gonzalez, C.M. (eds) Evolution in Computational Intelligence. FICTA 2023. Smart Innovation, Systems and Technologies, vol 370. Springer, Singapore. https://doi.org/10.1007/978-981-99-6702-5_53

Download citation

Publish with us

Policies and ethics