Research Article
BibTex RIS Cite

Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis

Year 2021, , 18 - 27, 30.01.2021
https://doi.org/10.7240/jeps.683952

Abstract

Predicting the stock market instrument price is a valuable but challenging machine learning task. Researchers use advanced techniques to improve the generalization ability of stock prediction models. However, considering that the stock market highly depends on the political and macroeconomic developments as well as the mood of the related investors, the models that use only stock prices fail to cover all factors affecting the stock market. Therefore, to improve the prediction accuracy of stock market prediction, in this study, we first apply sentiment analysis to the news related with the market and related stock, and then combine the sentiment labels of the news with stock prices and commonly used technical indicators. The obtained cumulative dataset is used to train a long short-term memory recurrent neural network, and the output of this regression model is used in the prediction of the closing price movement to decide whether the closing price next day will be higher. The experiments performed on 8-year data showed that while the f1 score of the model built without sentiment analysis was around 0.56, it has increased to 0.65 when stock prices are combined with sentiment labels. The results show that the model with sentiment labels fits better to the actual prices especially when there is a high volatility in the stock price.

References

  • [1] Henrique, B.M., Sobreiro, V.A. and Kimura, H., “Literature review: Machine learning techniques applied to financial market prediction”, Expert Systems with Applications, 124: 226-251, (2019).
  • [2] Gandhmal, D.P. and Kumar, K., “Systematic analysis and review of stock market prediction techniques”, Computer Science Review, 34: 100190, (2019).
  • [3] Akita, R., Yoshihara, A., Matsubara, T. and Uehara, K., “Deep learning for stock prediction using numerical and textual information”, IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS), Okayama, Japan, 1-6, (2016).
  • [4] Chong, E., Han, C. and Park, F.C., “Deep learning networks for stock market analysis and prediction: Methodology, data representations, and case studies”, Expert Systems with Applications, 83: 87-205, (2017).
  • [5] Yoshihara, A., Fujikawa, K., Seki, K. and Uehara, K., “Predicting stock market trends by recurrent deep neural networks”, Pacific Rim International Conference on Artificial Intelligence, Gold Coast, QLD, Australia, 759-769, (2014).
  • [6] Nguyen, T.H., Shirai, K. and Velcin, J., “Sentiment analysis on social media for stock movement prediction”, Expert Systems with Applications, 42(24): 9603-9611, (2015).
  • [7] Vargas, M.R., De Lima, B.S. and Evsukoff, A.G., “Deep learning for stock market prediction from financial news articles”, IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA), Annecy, France, 60-65, (2017).
  • [8] Pagolu, V.S., Reddy, K.N., Panda, G. and Majhi, B., “Sentiment analysis of Twitter data for predicting stock market movements”, International Conference on Signal Processing, Communication, Power and Embedded System (SCOPES), Paralakhemundi, India, 1345-1350, (2016).
  • [9] Liu, Y., Qin, Z., Li, P. and Wan, T., “Stock volatility prediction using recurrent neural networks with sentiment analysis”, International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems, Arras, France, 192-201, (2017).
  • [10] Bojanowski, P., Grave, E., Joulin, A. and Mikolov, T., “Enriching word vectors with subword information”, Transactions of the Association for Computational Linguistics, 5: 135-146, (2016).
  • [11] Hövelmann, L., Allee, S. and Friedrich, C.M., “Fasttext and gradient boosted trees at GermEval-2017 on relevance classification and document-level polarity”, GermEval-2017 Shared Task on Aspect-based Sentiment in Social Media Customer Feedback, Berlin, Germany, 30-15, (2017).
  • [12] Lin, J.W., Gao, Y.C. and Chang, R.G., “Chinese Story Generation with FastText Transformer Network”, International Conference on Artificial Intelligence in Information and Communication (ICAIIC), Okinawa, Japan, 395-398, (2019).
  • [13] Santos, I., Nedjah, N. and de Macedo Mourelle, L., “Sentiment analysis using convolutional neural network with fastText embeddings”, IEEE Latin American Conference on Computational Intelligence (LA-CCI), Arequipa, Peru, 1-5, (2017).
  • [14] Kuyumcu, B., Aksakalli, C. and Delil, S., An automated new approach in fast text classification (fastText): A case study for Turkish text classification without pre-processing. In Proceedings of the 2019 3rd International Conference on Natural Language Processing and Information Retrieval, Tokushima, Japan, 1-4, (2019).
  • [15] Li, J., Bu, H. and Wu, J., “Sentiment-aware stock market prediction: A deep learning method”, International Conference on Service Systems and Service Management, 1-6, Dalian, China, (2017).
  • [16] Zhuge, Q., Xu, L. and Zhang, G., “LSTM Neural Network with Emotional Analysis for Prediction of Stock Price,” Engineering Letters, 25(2): 167-175, (2017).
  • [17] Day, M.Y. and Lee, C.C., 2016, August. Deep learning for financial sentiment analysis on finance news providers. IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM), San Francisco, CA, USA, 1127-1134, (2016).
  • [18] Weng, B., Ahmed, M.A. and Megahed, F.M., “Stock market one-day ahead movement prediction using disparate data sources,” Expert Systems with Applications, 79: 153-163, (2017).
  • [19] Welles Wilder, J., The Relative Strength Index. New concepts in technical trading systems, 63-70, (1978).
  • [20] Mikolov, T., Grave, E., Bojanowski, P., Puhrsch, C. and Joulin, A., “Advances in pre-training distributed word representations”, arXiv preprint arXiv, 1712.09405, (2017).
  • [21] Hochreiter, S. and Schmidhuber, J., “Long short-term memory”, Neural computation, 9(8): 1735-1780, (1997).
  • [22] Bengio, Y., Simard, P. and Frasconi, P., “Learning long-term dependencies with gradient descent is difficult”, IEEE transactions on neural networks, 5(2): 157-166, (1994).
  • [23] Hochreiter, S., Bengio, Y., Frasconi, P., and Schmidhuber, J., “Gradient flow in recurrent nets: the difficulty of learning long-term dependencies”, In Kremer, S. C. and Kolen, J. F., editors, A Field Guide to Dynamical Recurrent Neural Networks. IEEE Press, (2011a).
  • [24] Ruder, S., "An overview of gradient descent optimization algorithms”, arXiv preprint arXiv, 1609.04747, (2016).

Duygu Analizi ve Hisse Fiyat Bilgisinin Birleştirilmesiyle Hisse Senedi Piyasası Tahmini

Year 2021, , 18 - 27, 30.01.2021
https://doi.org/10.7240/jeps.683952

Abstract

Pay piyasasındaki bir enstrümanın fiyatını tahmin etmek, oldukça değerli ve aynı zamanda oldukça zor yapay öğrenme görevlerinden biridir. Araştırmacılar hisse fiyat tahmin modellerinin genellenebilirlik kabiliyetlerinin arttırılması için ileri teknikler kullanmaktadır. Ancak, hisse senedi piyasasının politik ve makroekonomik haberler ve yatırımcıların duygu durumu ile yakından ilişkili olduğu düşünüldüğünde, yalnızca hisse fiyat bilgisini kullanan modeller hisse senedi piyasasını etkileyen tüm faktörleri kapsama konusunda yetersiz kalmaktadır. Bu nedenle, bu çalışmada, hisse senedi tahmin başarısının arttırılması için piyasa ve ilgili hisse haberlerini duygu analizi uygulanmakta ve daha sonra duygu etiketleri ile hisse fiyatları ve en sık kullanılan teknik indikatörleri birleştirilmektedir. Elde edilen kümülatif veri kümesi bir kısa uzun-hafızalı bir özyinelemeli sinir ağının eğitilmesinde kullanılmış ve bu regresyon modelinin çıktısı bir sonraki günün kapanış fiyatının daha yukarıda olup olmayacağını tahmin etmek için kullanılmıştır. Sekiz yıllık hisse senedi verisi üzerinde yapılan deneyler, duygu analizi olmadan kurulan modelin f1 skoru 0,56 civarında iken, hisse fiyatı duygu etiketleri ile birlikte kullanıldığında bu değerin 0,65 civarına yükseldiğini göstermiştir. Elde edilen sonuçlar, özellikle piyasada yüksek volatilite olduğunda, duygu etiketini kullanan modelin gerçek hisse fiyatlarına daha yakın olduğunu göstermektedir.

References

  • [1] Henrique, B.M., Sobreiro, V.A. and Kimura, H., “Literature review: Machine learning techniques applied to financial market prediction”, Expert Systems with Applications, 124: 226-251, (2019).
  • [2] Gandhmal, D.P. and Kumar, K., “Systematic analysis and review of stock market prediction techniques”, Computer Science Review, 34: 100190, (2019).
  • [3] Akita, R., Yoshihara, A., Matsubara, T. and Uehara, K., “Deep learning for stock prediction using numerical and textual information”, IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS), Okayama, Japan, 1-6, (2016).
  • [4] Chong, E., Han, C. and Park, F.C., “Deep learning networks for stock market analysis and prediction: Methodology, data representations, and case studies”, Expert Systems with Applications, 83: 87-205, (2017).
  • [5] Yoshihara, A., Fujikawa, K., Seki, K. and Uehara, K., “Predicting stock market trends by recurrent deep neural networks”, Pacific Rim International Conference on Artificial Intelligence, Gold Coast, QLD, Australia, 759-769, (2014).
  • [6] Nguyen, T.H., Shirai, K. and Velcin, J., “Sentiment analysis on social media for stock movement prediction”, Expert Systems with Applications, 42(24): 9603-9611, (2015).
  • [7] Vargas, M.R., De Lima, B.S. and Evsukoff, A.G., “Deep learning for stock market prediction from financial news articles”, IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA), Annecy, France, 60-65, (2017).
  • [8] Pagolu, V.S., Reddy, K.N., Panda, G. and Majhi, B., “Sentiment analysis of Twitter data for predicting stock market movements”, International Conference on Signal Processing, Communication, Power and Embedded System (SCOPES), Paralakhemundi, India, 1345-1350, (2016).
  • [9] Liu, Y., Qin, Z., Li, P. and Wan, T., “Stock volatility prediction using recurrent neural networks with sentiment analysis”, International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems, Arras, France, 192-201, (2017).
  • [10] Bojanowski, P., Grave, E., Joulin, A. and Mikolov, T., “Enriching word vectors with subword information”, Transactions of the Association for Computational Linguistics, 5: 135-146, (2016).
  • [11] Hövelmann, L., Allee, S. and Friedrich, C.M., “Fasttext and gradient boosted trees at GermEval-2017 on relevance classification and document-level polarity”, GermEval-2017 Shared Task on Aspect-based Sentiment in Social Media Customer Feedback, Berlin, Germany, 30-15, (2017).
  • [12] Lin, J.W., Gao, Y.C. and Chang, R.G., “Chinese Story Generation with FastText Transformer Network”, International Conference on Artificial Intelligence in Information and Communication (ICAIIC), Okinawa, Japan, 395-398, (2019).
  • [13] Santos, I., Nedjah, N. and de Macedo Mourelle, L., “Sentiment analysis using convolutional neural network with fastText embeddings”, IEEE Latin American Conference on Computational Intelligence (LA-CCI), Arequipa, Peru, 1-5, (2017).
  • [14] Kuyumcu, B., Aksakalli, C. and Delil, S., An automated new approach in fast text classification (fastText): A case study for Turkish text classification without pre-processing. In Proceedings of the 2019 3rd International Conference on Natural Language Processing and Information Retrieval, Tokushima, Japan, 1-4, (2019).
  • [15] Li, J., Bu, H. and Wu, J., “Sentiment-aware stock market prediction: A deep learning method”, International Conference on Service Systems and Service Management, 1-6, Dalian, China, (2017).
  • [16] Zhuge, Q., Xu, L. and Zhang, G., “LSTM Neural Network with Emotional Analysis for Prediction of Stock Price,” Engineering Letters, 25(2): 167-175, (2017).
  • [17] Day, M.Y. and Lee, C.C., 2016, August. Deep learning for financial sentiment analysis on finance news providers. IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM), San Francisco, CA, USA, 1127-1134, (2016).
  • [18] Weng, B., Ahmed, M.A. and Megahed, F.M., “Stock market one-day ahead movement prediction using disparate data sources,” Expert Systems with Applications, 79: 153-163, (2017).
  • [19] Welles Wilder, J., The Relative Strength Index. New concepts in technical trading systems, 63-70, (1978).
  • [20] Mikolov, T., Grave, E., Bojanowski, P., Puhrsch, C. and Joulin, A., “Advances in pre-training distributed word representations”, arXiv preprint arXiv, 1712.09405, (2017).
  • [21] Hochreiter, S. and Schmidhuber, J., “Long short-term memory”, Neural computation, 9(8): 1735-1780, (1997).
  • [22] Bengio, Y., Simard, P. and Frasconi, P., “Learning long-term dependencies with gradient descent is difficult”, IEEE transactions on neural networks, 5(2): 157-166, (1994).
  • [23] Hochreiter, S., Bengio, Y., Frasconi, P., and Schmidhuber, J., “Gradient flow in recurrent nets: the difficulty of learning long-term dependencies”, In Kremer, S. C. and Kolen, J. F., editors, A Field Guide to Dynamical Recurrent Neural Networks. IEEE Press, (2011a).
  • [24] Ruder, S., "An overview of gradient descent optimization algorithms”, arXiv preprint arXiv, 1609.04747, (2016).
There are 24 citations in total.

Details

Primary Language English
Subjects Engineering
Journal Section Research Articles
Authors

Adnan Gumus This is me 0000-0002-4020-5954

C. Okan Sakar 0000-0003-0639-4867

Publication Date January 30, 2021
Published in Issue Year 2021

Cite

APA Gumus, A., & Sakar, C. O. (2021). Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis. International Journal of Advances in Engineering and Pure Sciences, 33(1), 18-27. https://doi.org/10.7240/jeps.683952
AMA Gumus A, Sakar CO. Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis. JEPS. January 2021;33(1):18-27. doi:10.7240/jeps.683952
Chicago Gumus, Adnan, and C. Okan Sakar. “Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis”. International Journal of Advances in Engineering and Pure Sciences 33, no. 1 (January 2021): 18-27. https://doi.org/10.7240/jeps.683952.
EndNote Gumus A, Sakar CO (January 1, 2021) Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis. International Journal of Advances in Engineering and Pure Sciences 33 1 18–27.
IEEE A. Gumus and C. O. Sakar, “Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis”, JEPS, vol. 33, no. 1, pp. 18–27, 2021, doi: 10.7240/jeps.683952.
ISNAD Gumus, Adnan - Sakar, C. Okan. “Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis”. International Journal of Advances in Engineering and Pure Sciences 33/1 (January 2021), 18-27. https://doi.org/10.7240/jeps.683952.
JAMA Gumus A, Sakar CO. Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis. JEPS. 2021;33:18–27.
MLA Gumus, Adnan and C. Okan Sakar. “Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis”. International Journal of Advances in Engineering and Pure Sciences, vol. 33, no. 1, 2021, pp. 18-27, doi:10.7240/jeps.683952.
Vancouver Gumus A, Sakar CO. Stock Market Prediction by Combining Stock Price Information and Sentiment Analysis. JEPS. 2021;33(1):18-27.