Abstract
This paper is an analysis of investor sentiment in the stock market based on the bidirectional encoder representations from transformers (BERT) model. First, we extracted the sentiment value from online information published by stock investor, using the Bert model. Second, these sentiment values were weighted by attention for computing the investor sentiment indicator. Finally, the relationship between investor sentiment and stock yield was analyzed through a two-step cross-sectional regression validation model. The experiments found that investor sentiment in online reviews had a significant impact on stock yield. The experiments show that the Bert model used in this paper can achieve an accuracy of 97.35% for the analysis of investor sentiment, which is better than both LSTM and SVM methods.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
De Gooijer JG, Hyndman RJ (2005) 25 years of IIF time series forecasting: a selective review. Soc Sci Electron Publ 22(3):443–473
Farina L, Rinaldi S (2000) Positive linear systems. Theory and applications. J Vet Med Sci 63(9):945–948
Fisher KL, Statman M (2000) Investor sentiment and stock returns. Financ Anal J 56(2):16–23
Jin Z, Yang Y, Liu Y (2019) Stock closing price prediction based on sentiment analysis and LSTM. Neural Comput Appl 32:9713–9729. https://doi.org/10.1007/s00521-019-04504-2
Zweig ME (1973) An investor expectations stock price predictive model using closed-end fund premiums. J Finance 28:67–78
Lee CMC, Shleifer A, Thaler RH (1991) Investor sentiment and the closed-end fund puzzle. J Finance 46:75–109
Swaminathan B (1996) Time-varying expected small firm returns and closed-end fund discounts. Rev Financ Stud 9:845–887
Kurov A (2010) Investor sentiment and the stock market's reaction to monetary policy. J Banking Finance 34:139–149. https://doi.org/10.1016/j.jbankfin.2009.07.010
Yueqin L, Yong H, Chao Y (2020) Investor sentiment and stock price: empirical evidence from Chinese SEOs. Econ Model. https://doi.org/10.1016/j.econmod.2020.02.012
Riloff E, Wiebe J, Wilson T (2003) Learning subjective nouns using extraction pattern bootstrapping. In: Proceedings of the seventh conference on natural language learning at HLT-NAACL 2003, Morristown, NJ, USA. Association for Computational Linguistics, pp 25–32
Zhang D (2017) High-speed train control system big data analysis based on the fuzzy rdf model and uncertain reasoning. Int J Comput Commun Control 12(4):577–591
Kim SM, Hovy E (2006) Automatic identification of pro and con reasons in online reviews. In: Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions, pp 483–490
Banea C, Mihalcea R, Wiebe J (2010) Multilingual subjectivity: are more languages better?. In: Proceedings of the 23rd International Conference on Computational Linguistics (Coling 2010), pp 28–36
Wan X (2009) Co-training for cross-lingual sentiment classification. In: Proceedings of the joint conference of the 47th annual meeting of the ACL and the 4th international joint conference on natural language processing of the AFNLP. Association for Computational Linguistics, Suntec, Singapore, pp 235–243
Boyd-Graber J, Resnik P (2010). Holistic sentiment analysis across languages: Multilingual supervised latent Dirichlet allocation. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, pp 45–55
Lu B (2010) Identifying opinion holders and targets with dependency parser in Chinese news texts. In Proceedings of the NAACL HLT 2010 student research workshop pp 46–51
Mihalcea R, Banea C, Wiebe J (2007) Learning multilingual subjective language via cross-lingual projections. In: Proceedings of the 45th annual meeting of the association of computational linguistics, Prague, Czech Republic. Stroudsburg, PA: Association for Computational Linguistics, pp 976–983
Barsky RB, Sims ER (2012) Information, animal spirits, and the meaning of innovations in consumer confidence. Am Econ Rev Am Econ Assoc 102(4):343–177
Schmeling M (2009) Investor sentiment and stock returns: some international evidence. J Empir Finance 16(3):394–408
Chung SL, Hung CH, Yeh CY (2012) When does investor sentiment predict stock returns? J Empir Finance 19(2):217–240
Zhiqing M, Guojie Z, Yunwen Z (2018) Research on the relationship between internet investor sentiment and stock market price——based on analysis of text mining technology. Price Theory Practice 8:127–130. https://doi.org/10.19851/j.cnki.cn11-1010/f.2018.08.031
Brown GW, Cliff MT (2004) Investor sentiment and the near-term stock market. J Empir Finance 11(1):1–27
Bin L, Tan C, Cardie C, Tsou BK (2011) Joint bilingual sentiment classification with unlabeled parallel corpora. In: Proceedings of the 49th annual meeting of the association for computational linguistics: human language technologies. Association for Computational Linguistics, Stroudsburg, pp 320–330
Baker M, Wurgler J (2006) Investor sentiment and the cross-section of stock returns. J Finance 61(4):1645–1680
So WG, Kim HK (2020) The influence of drama viewing on online purchasing intention: an empirical study. J Syst Manag Sci 10(2):69–81
Horvat D, Wydra S, Lerch CM (2018) Modelling and simulating the dynamics of the european demand for bio-based plastics. Int J Simul Model 17(3):419–430
Moon KS, Kim H (2019) Performance of deep learning in prediction of stock market volatility. Econ Comput Econ Cybern Stud Res 53(2):77–92. https://doi.org/10.24818/18423264/53.2.19.05
He Z, He L, Wen F (2019) Risk compensation and market returns: the role of investor sentiment in the stock market. Emerg Mark Finance Trade 55(3):704–718
Fama EF, MacBeth JD (1973) Risk, return, and equilibrium: empirical tests. J Political Econ 113(3):607–636
Acknowledgments
This research is supported by the R&D Program of Beijing Municipal Education commission (Grant No. KJZD20191000401). This research is also supported by the Program of the Co-Construction with Beijing Municipal Commission of Education of China (Grant Nos. B20H100020, B19H100010) and funded by the Key Project of Beijing Social Science Foundation Research Base (Grant No. 19JDYJA001).
Author information
Authors and Affiliations
Corresponding authors
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Li, M., Li, W., Wang, F. et al. Applying BERT to analyze investor sentiment in stock market. Neural Comput & Applic 33, 4663–4676 (2021). https://doi.org/10.1007/s00521-020-05411-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00521-020-05411-7