Paper: arXiv 2503.04873
Authors: Xinyu Wei, Luojia Liu
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 — empirical and applied, lower math complexity
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"]
Evidence Card
What the authors claim, on what data, and who has checked it. Read from the paper's own text by a language model: every quote is verbatim, nothing was re-run. How to read this card
Proposes
The paper proposes to explore in-context learning for financial sentiment analysis using modern large language models.
Source sentence
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.
Assumes 3
- The temperature of LLMs is set to 1 for all experiments. model
Source sentence
The temperature of LLMs is set to 1.
- A default number of shots (6) is used for in‑context learning comparisons. model
Source sentence
we first compare various in-context learning strategies with a default number of shots as 6 with the zero-shot LLMs.
- Fine‑tuning LLMs on finance‑specific data is difficult or impossible, motivating the use of in‑context learning. data
Source sentence
given that finetuning these models on finance-specific data is difficult, if not impossible at all.
Data
- FiQA2 text-news public
Source sentence
We adopt two real‑world datasets—FiQA2 and Twitter3.
- Twitter text-news public
Source sentence
We adopt two real‑world datasets—FiQA2 and Twitter3.
FiQA Twitter / X
Costs
Not applicable
Finds 5
- In‑context learning methods almost consistently enhance LLM performance for financial sentiment analysis. performance
Source sentence
in‑context learning methods almost consistently enhance the LLMs for FSA, which demonstrates that LLMs are indeed effective in‑context learners for FSA.
- Clustering‑based sample selection often outperforms other in‑context learning methods, especially on the Twitter dataset. performance
Source sentence
we find that the clustering‑based selection often outperforms other in‑context learning methods, particularly on the Twitter dataset.
- Performance of in‑context learning does not fluctuate much with varying numbers of shots, indicating few demonstrations suffice. performance
Source sentence
we observe that the performance of in‑context learning does not fluctuate a lot when the number of shots varies.
- Zero‑shot LLMs often yield the worst performance compared to in‑context methods across multiple models and datasets. performance
Source sentence
the zero‑shot LLM has the worst performance by Gemini 2.0 Flash, Llama 3.1 405B, GPT‑4 Turbo, GPT‑4o mini, and Claude 3.5 Sonnet on FiQA.
- In‑context learning improves classification of neutral financial samples, which are the most ambiguous. predictive-accuracy
Source sentence
in‑context learning methods yield better performance on neutral samples, while the results of positive and negative samples do not diminish.
Checked by others
No other paper in the archive has been found to support or contradict these findings (compared with 52 related papers). Coverage is partial, so this is neither replication nor refutation.
1 paper in the archive
Code
No repository by the authors found in the paper.
Extracted 2026-11-14 · same card as JSON · A language model chose these items: check the source sentence before relying on one.
Cited References (56)
- Financial sentiment analysis: Techniques and applications (2024)
- Enhancing investment analysis: Optimizing AI-Agent collaboration in financial research — → 2411.04788
- Knowledge editing for large language models: A survey (2024)
- Improving language understanding by generative pre-training (2018)
- Collaborative Retrieval for Large Language Model-based Conversational Recommender Systems (2025)
- An Evaluation of Large Language Models in Financial Sentiment Analysis (2024)
- Findkg: Dynamic knowledge graphs with large language models for detecting global trends in financial markets — → 2407.10909
- A survey of large language models (2023) — link
and 48 more
- Adaptive and explainable margin trading via large language models on portfolio management (2024)
- Mechanistic interpretability of large language models with applications to the financial services industry (2024)
- Financial Forecasting from Textual and Tabular Time Series (2024)
- FinRL: Deep reinforcement learning framework to automate trading in quantitative finance (2021)
- 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 — → 2309.00638
- Findiff: Diffusion models for financial tabular data generation — → 2309.01472
- Enhancing financial sentiment analysis via retrieval augmented large language models — → 2310.04027
- Instruct-fingpt: Financial sentiment analysis by instruction tuning of general-purpose large language models — → 2306.12659
- Enhanced Financial Sentiment Analysis and Trading Strategy Development Using Large Language Models (2024)
- Large Language Model Adaptation for Financial Sentiment Analysis (2024) — link
- BERT-based approach to arabic hate speech and offensive language detection in Twitter: exploiting emojis and sentiment analysis (2022)
- Harnessing artificial intelligence to combat online hate: Exploring the challenges and opportunities of large language models in hate speech detection (2024) — link
- Sentiment Analysis of Product Reviews Using Machine Learning and Pre-Trained LLM (2024)
- Enhancing product design through AI-driven sentiment analysis of Amazon reviews using BERT (2024)
- FinLlama: LLM-Based Financial Sentiment Analysis for Algorithmic Trading (2024)
- Llama 2: Open foundation and fine-tuned chat models (2023) — link
- Designing heterogeneous llm agents for financial sentiment analysis (2024)
- Finbert: A pre-trained financial language representation model for financial text mining (2021)
- Bert: Pre-training of deep bidirectional transformers for language understanding (2019)
- Finetuned Language Models are Zero-Shot Learners (2022)
- Stock market sentiment lexicon acquisition using microblogging data and statistical measures (2016)
- A survey on in-context learning (2024)
- Calibrate before use: Improving few-shot performance of language models (2021)
- When is a liability not a liability? Textual analysis, dictionaries, and 10-Ks (2011)
- Twitter sentiment analysis using machine learning techniques (2015)
- Big Data: Deep Learning for financial sentiment analysis (2018)
- Generative AI Agents for Knowledge Work Augmentation in Finance (2024)
- CVA Hedging by Risk-Averse Stochastic-Horizon Reinforcement Learning — → 2312.14044
- Predicting the direction of US stock prices using effective transfer entropy and machine learning techniques (2020)
- Decision-informed Neural Networks with Large Language Model Integration for Portfolio Optimization — → 2502.00828
- Autocast++: Enhancing world event prediction with zero-shot ranking-based context retrieval (2023) — link
- CoDi-2: In-Context Interleaved and Interactive Any-to-Any Generation (2024)
- Selective annotation makes language models better few-shot learners (2023)
- Www'18 open challenge: financial opinion mining and question answering (2018)
- Gemini: a family of highly capable multimodal models (2023) — link
- The llama 3 herd of models (2024) — link
- Deepseek-v3 technical report (2024) — link
- Gpt-4 technical report (2023) — link
- Graph attention network for financial aspect-based sentiment classification with contrastive learning (2022)
- An optimal deep learning-based LSTM for stock price prediction using twitter sentiment analysis (2022)
- Stock market trend prediction with sentiment analysis based on LSTM neural network (2019)
- DP-LSTM: Differential privacy-inspired LSTM for stock prediction using financial news (2019) — link
- Aspect-based financial sentiment analysis using deep learning (2018)
- SARF: Enhancing Stock Market Prediction with Sentiment-Augmented Random Forest — → 2410.07143
- Exploiting financial news and social media opinions for stock market analysis using MCMC Bayesian inference (2016)
- Support vector machine for sentiment analysis of Nigerian banks financial tweets (2019)
- Mixture of Demonstrations for In-Context Learning (2025)
- FastGAS: Fast Graph-based Annotation Selection for In-Context Learning (2024)
9 of 56 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2596 linked papers.