Paper: arXiv 2503.04873

Abstract

Recently, large language models (LLMs) with hundreds of billions of parameters have demonstrated the emergent ability, surpassing traditional methods in various domains even without fine-tuning over domain-specific data. However, when it comes to financial sentiment analysis (FSA)$\unicode{“x2013”}$a fundamental task in financial AI$\unicode{“x2013”}$these models often encounter various challenges, such as complex financial terminology, subjective human emotions, and ambiguous inclination expressions. In this paper, we aim to answer the fundamental question: whether LLMs are good in-context learners for FSA? Unveiling this question can yield informative insights on whether LLMs can learn to address the challenges by generalizing in-context demonstrations of financial document-sentiment pairs to the sentiment analysis of new documents, given that finetuning these models on finance-specific data is difficult, if not impossible at all. To the best of our knowledge, this is the first paper exploring in-context learning for FSA that covers most modern LLMs (recently released DeepSeek V3 included) and multiple in-context sample selection methods. Comprehensive experiments validate the in-context learning capability of LLMs for FSA.

Complexity vs Empirical Score

  • Math Complexity: 1.0/10
  • Empirical Rigor: 9.0/10
  • Quadrant: Street Traders — practical and empirical, lighter on theory

Why this score: The paper uses almost no advanced mathematics, relying instead on empirical experiments with multiple real-world datasets, 10 different LLMs, and various sample selection methods to validate in-context learning performance, making it highly practical and implementation-focused.

Research Flowchart

  flowchart TD
  A["Research Goal: Are LLMs good in-context learners for Financial Sentiment Analysis?"] --> B["Methodology Setup"]
  B --> C{"Prepare Data: Financial Documents + Sentiment Labels"}
  B --> D["Select In-context Samples"]
  
  C --> E["Compute Process: Prompt LLMs with In-context Examples"]
  D --> E
  
  E --> F["LLMs Analyze Sentiment of New Documents<br/>*Without Fine-tuning*"]
  
  F --> G["Key Findings/Outcomes:<br/>- LLMs demonstrate strong in-context learning<br/>- Performance varies by model size & selection method<br/>- Validated across multiple modern LLMs"]

Cited References (56)

  1. Financial sentiment analysis: Techniques and applications (2024)
  2. Enhancing investment analysis: Optimizing AI-Agent collaboration in financial research (2024)
  3. Knowledge editing for large language models: A survey (2024)
  4. Improving language understanding by generative pre-training (2018)
  5. Collaborative Retrieval for Large Language Model-based Conversational Recommender Systems (2025)
  6. An Evaluation of Large Language Models in Financial Sentiment Analysis (2024)
  7. Findkg: Dynamic knowledge graphs with large language models for detecting global trends in financial markets (2024)
  8. A survey of large language models (2023) — link
and 48 more
  1. Adaptive and explainable margin trading via large language models on portfolio management (2024)
  2. Mechanistic interpretability of large language models with applications to the financial services industry (2024)
  3. Financial Forecasting from Textual and Tabular Time Series (2024)
  4. FinRL: Deep reinforcement learning framework to automate trading in quantitative finance (2021)
  5. Generative ai for end-to-end limit order book modelling: A token-level autoregressive generative model of message flow using a deep state space network (2023)
  6. Findiff: Diffusion models for financial tabular data generation (2023)
  7. Enhancing financial sentiment analysis via retrieval augmented large language models — → 2310.04027
  8. Instruct-fingpt: Financial sentiment analysis by instruction tuning of general-purpose large language models — → 2306.12659
  9. Enhanced Financial Sentiment Analysis and Trading Strategy Development Using Large Language Models (2024)
  10. Large Language Model Adaptation for Financial Sentiment Analysis (2024) — link
  11. BERT-based approach to arabic hate speech and offensive language detection in Twitter: exploiting emojis and sentiment analysis (2022)
  12. Harnessing artificial intelligence to combat online hate: Exploring the challenges and opportunities of large language models in hate speech detection (2024) — link
  13. Sentiment Analysis of Product Reviews Using Machine Learning and Pre-Trained LLM (2024)
  14. Enhancing product design through AI-driven sentiment analysis of Amazon reviews using BERT (2024)
  15. FinLlama: LLM-Based Financial Sentiment Analysis for Algorithmic Trading (2024)
  16. Llama 2: Open foundation and fine-tuned chat models (2023) — link
  17. Designing heterogeneous llm agents for financial sentiment analysis (2024)
  18. Finbert: A pre-trained financial language representation model for financial text mining (2021)
  19. Bert: Pre-training of deep bidirectional transformers for language understanding (2019)
  20. Finetuned Language Models are Zero-Shot Learners (2022)
  21. Stock market sentiment lexicon acquisition using microblogging data and statistical measures (2016)
  22. A survey on in-context learning (2024)
  23. Calibrate before use: Improving few-shot performance of language models (2021)
  24. When is a liability not a liability? Textual analysis, dictionaries, and 10-Ks (2011)
  25. Twitter sentiment analysis using machine learning techniques (2015)
  26. Big Data: Deep Learning for financial sentiment analysis (2018)
  27. Generative AI Agents for Knowledge Work Augmentation in Finance (2024)
  28. CVA Hedging by Risk-Averse Stochastic-Horizon Reinforcement Learning — → 2312.14044
  29. Predicting the direction of US stock prices using effective transfer entropy and machine learning techniques (2020)
  30. Decision-informed Neural Networks with Large Language Model Integration for Portfolio Optimization — → 2502.00828
  31. Autocast++: Enhancing world event prediction with zero-shot ranking-based context retrieval (2023) — link
  32. CoDi-2: In-Context Interleaved and Interactive Any-to-Any Generation (2024)
  33. Selective annotation makes language models better few-shot learners (2023)
  34. Www'18 open challenge: financial opinion mining and question answering (2018)
  35. Gemini: a family of highly capable multimodal models (2023) — link
  36. The llama 3 herd of models (2024) — link
  37. Deepseek-v3 technical report (2024) — link
  38. Gpt-4 technical report (2023) — link
  39. Graph attention network for financial aspect-based sentiment classification with contrastive learning (2022)
  40. An optimal deep learning-based LSTM for stock price prediction using twitter sentiment analysis (2022)
  41. Stock market trend prediction with sentiment analysis based on LSTM neural network (2019)
  42. DP-LSTM: Differential privacy-inspired LSTM for stock prediction using financial news (2019) — link
  43. Aspect-based financial sentiment analysis using deep learning (2018)
  44. SARF: Enhancing Stock Market Prediction with Sentiment-Augmented Random Forest — → 2410.07143
  45. Exploiting financial news and social media opinions for stock market analysis using MCMC Bayesian inference (2016)
  46. Support vector machine for sentiment analysis of Nigerian banks financial tweets (2019)
  47. Mixture of Demonstrations for In-Context Learning (2025)
  48. FastGAS: Fast Graph-based Annotation Selection for In-Context Learning (2024)

5 of 56 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2518 linked papers.