Sentiment Analysis in Finance: From Transformers Back to eXplainable Lexicons (XLex) (2306.03997v3)
Abstract: Lexicon-based sentiment analysis (SA) in finance leverages specialized, manually annotated lexicons created by human experts to extract sentiment from financial texts. Although lexicon-based methods are simple to implement and fast to operate on textual data, they require considerable manual annotation efforts to create, maintain, and update the lexicons. These methods are also considered inferior to the deep learning-based approaches, such as transformer models, which have become dominant in various NLP tasks due to their remarkable performance. However, transformers require extensive data and computational resources for both training and testing. Additionally, they involve significant prediction times, making them unsuitable for real-time production environments or systems with limited processing capabilities. In this paper, we introduce a novel methodology named eXplainable Lexicons (XLex) that combines the advantages of both lexicon-based methods and transformer models. We propose an approach that utilizes transformers and SHapley Additive exPlanations (SHAP) for explainability to learn financial lexicons. Our study presents four main contributions. Firstly, we demonstrate that transformer-aided explainable lexicons can enhance the vocabulary coverage of the benchmark Loughran-McDonald (LM) lexicon, reducing the human involvement in annotating, maintaining, and updating the lexicons. Secondly, we show that the resulting lexicon outperforms the standard LM lexicon in SA of financial datasets. Thirdly, we illustrate that the lexicon-based approach is significantly more efficient in terms of model speed and size compared to transformers. Lastly, the XLex approach is inherently more interpretable than transformer models as lexicon models rely on predefined rules, allowing for better insights into the results of SA and making the XLex approach a viable tool for financial decision-making.
- M. Hasan, J. Popp, J. Oláh et al., “Current landscape and influence of big data on finance,” Journal of Big Data, vol. 7, no. 1, pp. 1–17, 2020.
- I. Goldstein, C. S. Spatt, and M. Ye, “Big data in finance,” The Review of Financial Studies, vol. 34, no. 7, pp. 3213–3225, 2021.
- N. Mohamed and J. Al-Jaroodi, “Real-time big data analytics: Applications and challenges,” in 2014 international conference on high performance computing & simulation (HPCS). IEEE, 2014, pp. 305–310.
- V. Ravi and S. Kamaruddin, “Big data analytics enabled smart financial services: opportunities and challenges,” in Big Data Analytics: 5th International Conference, BDA 2017, Hyderabad, India, December 12-15, 2017, Proceedings 5. Springer, 2017, pp. 15–39.
- M. Cao, R. Chychyla, and T. Stewart, “Big data analytics in financial statement audits,” Accounting Horizons, vol. 29, no. 2, pp. 423–429, 2015.
- J. Smailović, M. Grčar, N. Lavrač, and M. Žnidaršič, “Predictive sentiment analysis of tweets: A stock market application,” in Human-Computer Interaction and Knowledge Discovery in Complex, Unstructured, Big Data: Third International Workshop, HCI-KDD 2013, Held at SouthCHI 2013, Maribor, Slovenia, July 1-3, 2013. Proceedings. Springer, 2013, pp. 77–88.
- A. Derakhshan and H. Beigy, “Sentiment analysis on stock social media for stock price movement prediction,” Engineering Applications of Artificial Intelligence, vol. 85, pp. 569–578, 2019.
- R. Ren, D. D. Wu, and T. Liu, “Forecasting stock market movement direction using sentiment analysis and support vector machine,” IEEE Systems Journal, vol. 13, no. 1, pp. 760–770, 2018.
- R. Yang, L. Yu, Y. Zhao, H. Yu, G. Xu, Y. Wu, and Z. Liu, “Big data analytics for financial market volatility forecast based on support vector machine,” International Journal of Information Management, vol. 50, pp. 452–462, 2020.
- F.-T. Tsai, H.-M. Lu, and M.-W. Hung, “The effects of news sentiment and coverage on credit rating analysis,” 2010.
- S. Gül, Ö. Kabak, and I. Topcu, “A multiple criteria credit rating approach utilizing social media data,” Data & Knowledge Engineering, vol. 116, pp. 80–99, 2018.
- H.-M. Lu, F.-T. Tsai, H. Chen, M.-W. Hung, and S.-H. Li, “Credit rating change modeling using news and financial ratios,” ACM Transactions on Management Information Systems (TMIS), vol. 3, no. 3, pp. 1–30, 2012.
- D. Zhang, W. Xu, Y. Zhu, and X. Zhang, “Can sentiment analysis help mimic decision-making process of loan granting? a novel credit risk evaluation approach using gmkl model,” in 2015 48th Hawaii International Conference on System Sciences. IEEE, 2015, pp. 949–958.
- B. Yoon, Y. Jeong, and S. Kim, “Detecting a risk signal in stock investment through opinion mining and graph-based semi-supervised learning,” IEEE Access, vol. 8, pp. 161 943–161 957, 2020.
- J. R. McColl-Kennedy, M. Zaki, K. N. Lemon, F. Urmetzer, and A. Neely, “Gaining customer experience insights that matter,” Journal of service research, vol. 22, no. 1, pp. 8–26, 2019.
- L. Ziora, “The sentiment analysis as a tool of business analytics in contemporary organizations,” Studia Ekonomiczne, vol. 281, pp. 234–241, 2016.
- H. Mili, I. Benzarti, M.-J. Meurs, A. Obaid, J. Gonzalez-Huerta, N. Haj-Salem, and A. Boubaker, “Context aware customer experience management: A development framework based on ontologies and computational intelligence,” Sentiment Analysis and Ontology Engineering: An Environment of Computational Intelligence, pp. 273–311, 2016.
- X. Tian, J. S. He, and M. Han, “Data-driven approaches in fintech: a survey,” Information Discovery and Delivery, 2021.
- C.-C. Chen, H.-H. Huang, and H.-H. Chen, “Fintech applications,” in From Opinion Mining to Financial Argument Mining. Springer, 2021, pp. 73–87.
- H. Liu, I. Chatterjee, M. Zhou, X. S. Lu, and A. Abusorrah, “Aspect-based sentiment analysis: A survey of deep learning methods,” IEEE Transactions on Computational Social Systems, vol. 7, no. 6, pp. 1358–1375, 2020.
- F. Benedetto and A. Tedeschi, “Big data sentiment analysis for brand monitoring in social media streams by cloud computing,” Sentiment Analysis and Ontology Engineering: An Environment of Computational Intelligence, pp. 341–377, 2016.
- D. Alessia, F. Ferri, P. Grifoni, and T. Guzzo, “Approaches, tools and applications for sentiment analysis implementation,” International Journal of Computer Applications, vol. 125, no. 3, 2015.
- M. Taboada, J. Brooke, M. Tofiloski, K. Voll, and M. Stede, “Lexicon-based methods for sentiment analysis,” Computational linguistics, vol. 37, no. 2, pp. 267–307, 2011.
- S. Taj, B. B. Shaikh, and A. F. Meghji, “Sentiment analysis of news articles: a lexicon based approach,” in 2019 2nd international conference on computing, mathematics and engineering technologies (iCoMET). IEEE, 2019, pp. 1–5.
- M. Wankhade, A. C. S. Rao, and C. Kulkarni, “A survey on sentiment analysis methods, applications, and challenges,” Artificial Intelligence Review, vol. 55, no. 7, pp. 5731–5780, 2022.
- T. Loughran and B. McDonald, “When is a liability not a liability? textual analysis, dictionaries, and 10-ks,” The Journal of finance, vol. 66, no. 1, pp. 35–65, 2011.
- E. Boiy and M.-F. Moens, “A machine learning approach to sentiment analysis in multilingual web texts,” Information retrieval, vol. 12, pp. 526–558, 2009.
- A. Sharma and S. Dey, “A comparative study of feature selection and machine learning techniques for sentiment analysis,” in Proceedings of the 2012 ACM research in applied computation symposium, 2012, pp. 1–7.
- S. Malviya, A. K. Tiwari, R. Srivastava, and V. Tiwari, “Machine learning techniques for sentiment analysis: A review,” SAMRIDDHI: A Journal of Physical Sciences, Engineering and Technology, vol. 12, no. 02, pp. 72–78, 2020.
- M. Neethu and R. Rajasree, “Sentiment analysis in twitter using machine learning techniques,” in 2013 fourth international conference on computing, communications and networking technologies (ICCCNT). IEEE, 2013, pp. 1–5.
- L. Zhang, S. Wang, and B. Liu, “Deep learning for sentiment analysis: A survey,” Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, vol. 8, no. 4, p. e1253, 2018.
- A. Yadav and D. K. Vishwakarma, “Sentiment analysis using deep learning architectures: a review,” Artificial Intelligence Review, vol. 53, no. 6, pp. 4335–4385, 2020.
- N. C. Dang, M. N. Moreno-García, and F. De la Prieta, “Sentiment analysis based on deep learning: A comparative study,” Electronics, vol. 9, no. 3, p. 483, 2020.
- D. Tang, B. Qin, and T. Liu, “Deep learning for sentiment analysis: successful approaches and future challenges,” Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, vol. 5, no. 6, pp. 292–303, 2015.
- A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, “Attention is all you need,” Advances in neural information processing systems, vol. 30, 2017.
- J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “Bert: Pre-training of deep bidirectional transformers for language understanding,” arXiv preprint arXiv:1810.04805, 2018.
- K. Mishev, A. Gjorgjevikj, I. Vodenska, L. T. Chitkushev, and D. Trajanov, “Evaluation of sentiment analysis in finance: from lexicons to transformers,” IEEE Access, vol. 8, pp. 131 662–131 682, 2020.
- X. S. Huang, F. Perez, J. Ba, and M. Volkovs, “Improving transformer optimization through better initialization,” in International Conference on Machine Learning. PMLR, 2020, pp. 4475–4483.
- S. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions,” arXiv preprint arXiv:1705.07874, 2017.
- T. Loughran and B. McDonald, “Textual analysis in accounting and finance: A survey,” Journal of Accounting Research, vol. 54, no. 4, pp. 1187–1230, 2016.
- P. C. Tetlock, “Giving content to investor sentiment: The role of media in the stock market,” The Journal of finance, vol. 62, no. 3, pp. 1139–1168, 2007.
- C. Dougal, J. Engelberg, D. Garcia, and C. A. Parsons, “Journalists and the stock market,” The Review of Financial Studies, vol. 25, no. 3, pp. 639–679, 2012.
- U. G. Gurun and A. W. Butler, “Don’t believe the hype: Local media slant, local advertising, and firm value,” The Journal of Finance, vol. 67, no. 2, pp. 561–598, 2012.
- L. Dodevska, V. Petreski, K. Mishev, A. Gjorgjevikj, I. Vodenska, L. Chitkushev, and D. Trajanov, “Predicting companies stock price direction by using sentiment analysis of news articles,” in Proceedings of the 15th Annual International Conference on Computer Science and Education in Computer Science, 2019, pp. 37–42.
- T. Loughran and B. McDonald, “Measuring readability in financial disclosures,” the Journal of Finance, vol. 69, no. 4, pp. 1643–1671, 2014.
- S. Krishnamoorthy, “Sentiment analysis of financial news articles using performance indicators,” Knowledge and Information Systems, vol. 56, no. 2, pp. 373–394, 2018.
- P. J. Stone, D. C. Dunphy, and M. S. Smith, “The general inquirer: A computer approach to content analysis.” 1966.
- S. M. Mohammad, S. Kiritchenko, and X. Zhu, “Nrc-canada: Building the state-of-the-art in sentiment analysis of tweets,” arXiv preprint arXiv:1308.6242, 2013.
- D. T. Vo and Y. Zhang, “Don’t count, predict! an automatic approach to learning sentiment lexicons for short text,” in Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), 2016, pp. 219–224.
- F. Viegas, M. S. Alvim, S. Canuto, T. Rosa, M. A. Gonçalves, and L. Rocha, “Exploiting semantic relationships for unsupervised expansion of sentiment lexicons,” Information Systems, vol. 94, p. 101606, 2020.
- T. Bos and F. Frasincar, “Automatically building financial sentiment lexicons while accounting for negation,” Cognitive Computation, pp. 1–19, 2021.
- H. Saif, Y. He, M. Fernandez, and H. Alani, “Adapting sentiment lexicons using contextual semantics for sentiment analysis of twitter,” in European Semantic Web Conference. Springer, 2014, pp. 54–63.
- N. Kaji and M. Kitsuregawa, “Building lexicon for sentiment analysis from massive collection of html documents,” in Proceedings of the 2007 joint conference on empirical methods in natural language processing and computational natural language learning (EMNLP-CoNLL), 2007, pp. 1075–1083.
- H. Kanayama and T. Nasukawa, “Fully automatic lexicon expansion for domain-oriented sentiment analysis,” in Proceedings of the 2006 conference on empirical methods in natural language processing, 2006, pp. 355–363.
- N. Kaji and M. Kitsuregawa, “Automatic construction of polarity-tagged corpus from html documents,” in Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions, 2006, pp. 452–459.
- W. L. Hamilton, K. Clark, J. Leskovec, and D. Jurafsky, “Inducing domain-specific sentiment lexicons from unlabeled corpora,” in Proceedings of the conference on empirical methods in natural language processing. conference on empirical methods in natural language processing, vol. 2016. NIH Public Access, 2016, p. 595.
- O. Araque, G. Zhu, and C. A. Iglesias, “A semantic similarity-based perspective of affect lexicons for sentiment analysis,” Knowledge-Based Systems, vol. 165, pp. 346–359, 2019.
- W. Zhao, T. Joshi, V. N. Nair, and A. Sudjianto, “Shap values for explaining cnn-based text classification models,” arXiv preprint arXiv:2008.11825, 2020.
- K. E. Mokhtari, B. P. Higdon, and A. Başar, “Interpreting financial time series with shap values,” in Proceedings of the 29th Annual International Conference on Computer Science and Software Engineering, 2019, pp. 166–172.
- X. Xiaomao, Z. Xudong, and W. Yuanfang, “A comparison of feature selection methodology for solving classification problems in finance,” in Journal of Physics: Conference Series, vol. 1284, no. 1. IOP Publishing, 2019, p. 012026.
- M. Rizinski, H. Peshov, K. Mishev, L. T. Chitkushev, I. Vodenska, and D. Trajanov, “Ethically responsible machine learning in fintech,” IEEE Access, vol. 10, pp. 97 531–97 554, 2022.
- E. Kokalj, B. Škrlj, N. Lavrač, S. Pollak, and M. Robnik-Šikonja, “Bert meets shapley: Extending shap explanations to transformer-based classifiers,” in Proceedings of the EACL Hackashop on News Media Content Analysis and Automated Report Generation, 2021, pp. 16–21.
- S. Consoli, L. Barbaglia, and S. Manzan, “Fine-grained, aspect-based sentiment analysis on economic and financial lexicon,” Knowledge-Based Systems, vol. 247, p. 108781, 2022.
- A. Moreno-Ortiz, J. Fernández-Cruz, and C. P. C. Hernández, “Design and evaluation of sentiecon: A fine-grained economic/financial sentiment lexicon from a corpus of business news,” in Proceedings of The 12th Language Resources and Evaluation Conference, 2020, pp. 5065–5072.
- M. Yekrangi and N. Abdolvand, “Financial markets sentiment analysis: Developing a specialized lexicon,” Journal of Intelligent Information Systems, vol. 57, pp. 127–146, 2021.
- J. Fang and B. Chen, “Incorporating lexicon knowledge into svm learning to improve sentiment classification,” in Proceedings of the workshop on sentiment analysis where AI meets psychology (SAAIP 2011), 2011, pp. 94–100.
- R. Catelli, S. Pelosi, and M. Esposito, “Lexicon-based vs. bert-based sentiment analysis: A comparative study in italian,” Electronics, vol. 11, no. 3, p. 374, 2022.
- A. H. Huang, H. Wang, and Y. Yang, “Finbert: A large language model for extracting information from financial text,” Contemporary Accounting Research, vol. 40, no. 2, pp. 806–841, 2023.
- P. Malo, A. Sinha, P. Takala, O. Ahlgren, and I. Lappalainen, “Learning the roles of directional expressions and domain concepts in financial news analysis,” in 2013 IEEE 13th International Conference on Data Mining Workshops. IEEE, 2013, pp. 945–954.
- K. Cortis, A. Freitas, T. Daudert, M. Huerlimann, M. Zarrouk, S. Handschuh, and B. Davis, “Semeval-2017 task 5: Fine-grained sentiment analysis on financial microblogs and news.” Association for Computational Linguistics (ACL), 2017.
- S. Mazzanti, “Shap values explained exactly how you wished someone explained to you,” https://towardsdatascience.com/shap-explained-the-way-i-wish-someone-explained-it-to-me-ab81cc69ef30, 2020, [Online; accessed 05-July-2021].
- S. Lundberg, “SHapley Additive exPlanations,” https://github.com/slundberg/shap, 2018, [Online; accessed 29-Jan-2023].
- M. Honnibal and I. Montani, “spaCy meets Transformers: Fine-tune BERT, XLNet and GPT-2,” https://explosion.ai/blog/spacy-transformers, 2019, [Online; accessed 10-February-2023].
- N. Lathia, “When is a neural net too big for production?” https://neal-lathia.medium.com/when-is-a-neural-net-too-big-for-production-4315452193ef, 2019, [Online; accessed 10-March-2023].
Collections
Sign up for free to add this paper to one or more collections.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.