Transforming Sentiment Analysis in the Financial Domain with ChatGPT

Georgios Fatouros,John Soldatos,Kalliopi Kouroumali,Georgios Makridis,Dimosthenis Kyriazis
DOI: https://doi.org/10.1016/j.mlwa.2023.100508
2023-08-13
Abstract:Financial sentiment analysis plays a crucial role in decoding market trends and guiding strategic trading decisions. Despite the deployment of advanced deep learning techniques and language models to refine sentiment analysis in finance, this study breaks new ground by investigating the potential of large language models, particularly ChatGPT 3.5, in financial sentiment analysis, with a strong emphasis on the foreign exchange market (forex). Employing a zero-shot prompting approach, we examine multiple ChatGPT prompts on a meticulously curated dataset of forex-related news headlines, measuring performance using metrics such as precision, recall, f1-score, and Mean Absolute Error (MAE) of the sentiment class. Additionally, we probe the correlation between predicted sentiment and market returns as an additional evaluation approach. ChatGPT, compared to FinBERT, a well-established sentiment analysis model for financial texts, exhibited approximately 35\% enhanced performance in sentiment classification and a 36\% higher correlation with market returns. By underlining the significance of prompt engineering, particularly in zero-shot contexts, this study spotlights ChatGPT's potential to substantially boost sentiment analysis in financial applications. By sharing the utilized dataset, our intention is to stimulate further research and advancements in the field of financial services.
Computation and Language,Artificial Intelligence,Computational Engineering, Finance, and Science,Information Retrieval
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the effectiveness and potential of using large - language models (such as ChatGPT) for sentiment analysis in the financial field, especially in the foreign exchange market. Specifically, the research focuses on the following aspects: 1. **Evaluating ChatGPT's performance in financial sentiment analysis**: - Through the zero - shot prompting method, the paper evaluates ChatGPT's ability to classify the sentiment of financial news headlines without being fine - tuned in a specific domain. - The research uses multiple different prompts to test ChatGPT's performance in sentiment classification and sentiment score estimation for single and multiple news headlines. 2. **Creating and sharing a public dataset**: - The researchers collected and labeled a dataset containing 2,291 foreign - exchange - related news headlines from well - known foreign - exchange news platforms. - The dataset not only contains news headlines but also comes with relevant foreign - exchange currency pairs, timestamps, sources, authors, URLs, and the full text of the articles. - This dataset is publicly released, aiming to provide a valuable resource for future research and promote further development in the financial field. 3. **Comparison with existing models**: - The paper compares ChatGPT's performance with that of the existing financial sentiment analysis model FinBERT. - The results show that ChatGPT's performance in the sentiment classification task is improved by about 35% compared to FinBERT, and its correlation with market returns is also improved by about 36%. 4. **Exploring the importance of prompt engineering**: - The research emphasizes the importance of prompt engineering in the zero - shot situation, especially in optimizing ChatGPT's performance. - Through carefully designed prompts, the accuracy and adaptability of ChatGPT in processing complex financial texts can be significantly improved. In conclusion, this paper aims to explore and verify the potential of large - language models (especially ChatGPT) in financial sentiment analysis. Through practical experiments and dataset sharing, it provides new perspectives and tools for research and application in the financial field.