Adaptive Financial Sentiment Analysis for NIFTY 50 via Instruction-Tuned LLMs , RAG and Reinforcement Learning Approaches DOI: XXXXXXX.XXXXXXX Conference: Research Track, CODS; December 17–20, 2025; Pune, India ISBN: 978-1-4503-XXXX-X/2018/06 CCS: Computing methodologies Sentiment Analysis
Chaithra, Kamesh Kadimisetty, Biju R Mohan · 2025
Read Adaptive Financial Sentiment Analysis for NIFTY 50 via Instruction-Tuned LLMs , RAG and Reinforcement Learning Approaches DOI: XXXXXXX.XXXXXXX Conference: Research Track, CODS; December 17–20, 2025; Pune, India ISBN: 978-1-4503-XXXX-X/2018/06 CCS: Computing methodologies Sentiment Analysis by Chaithra, Kamesh Kadimisetty, Biju R Mohan (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-20082.txt.
Introduction
Chaithra, Kamesh Kadimisetty, and Biju Mohan build a stock-sentiment system that listens to the market's reply. Sentiment tools tend to score news text in a vacuum. They skip whether prices agreed the next day. Their frame targets India's NIFTY 50 index. It fine-tunes a three-billion-parameter LLaMA model on the SentiFin data set. Feedback loops are layered on top of that base.
A retrieval pipeline pulls in context from many sources. It picks by embedding similarity. A feedback module checks each call against the next day's returns. It then recalibrates how far each source is trusted. A reinforcement agent learns source-weight policies over time. On NIFTY 50 headlines from 2024 and 2025, the system beat baselines. It won on accuracy, F1 score, and fit with the market.
Catalog record
| CREATOR | Chaithra, Kamesh Kadimisetty, Biju R Mohan |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 30 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2512-20082
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Adaptive Financial Sentiment Analysis for NIFTY 50 via Instruction-Tuned LLMs , RAG and Reinforcement Learning Approaches DOI: XXXXXXX.XXXXXXX Conference: Research Track, CODS; December 17–20, 2025; Pune, India ISBN: 978-1-4503-XXXX-X/2018/06 CCS: Computing methodologies Sentiment Analysis Chaithra, Kamesh Kadimisetty, Biju R Mohan Abstract . Financial sentiment analysis plays a crucial role in informing investment decisions, assessing market risk, and predicting stock price trends. Existing works in financial sentiment analysis have not considered the impact of stock prices or market feedback on sentiment analysis. In this paper, we propose an adaptive framework that integrates large language models (LLMs) with real-world stock market feedback to improve sentiment classification in the context of the Indian stock market. The proposed methodology fine-tunes the LLaMA 3.2 3B model using instruction-based learning on the SentiFin dataset. To enhance sentiment predictions, a retrieval-augmented generation (RAG) pipeline is employed that dynamically selects multi-source contextual information based on the cosine similarity of the sentence embeddings. Furthermore, a feedback-driven module is introduced that adjusts the reliability of the source by comparing predicted sentiment with actual next-day stock returns, allowing the system to iteratively adapt to market behavior. To generalize this adaptive mechanism across temporal data, a reinforcement learning agent trained using proximal policy optimization (PPO) is incorporated. The PPO agent learns to optimize source weighting policies based on cumulative reward signals from sentiment-return alignment. Experimental results on NIFTY 50 news headlines collected from 2024 to 2025 demonstrate that the proposed system significantly improves classification accuracy, F1-score, and market alignment over baseline models and static retrieval methods. The results validate the potential of combining instruction-tuned LLMs with dynamic feedback and reinforcement learning for robust, market-aware financial sentiment modeling. 1. Introduction In financial markets, investor behavior is often influenced by qualitative information, including news headlines, corporate disclosures, and economic prospects 4 ; 20 . Extracting sentiment from such textual data provides valuable information for understanding stock movements, guiding portfolio decisions, and developing algorithmic trading strategies. The analysis of sentiment in financial text is a challenging task due to the domain-specific language and the dynamic nature of the market 5 . Large language models (LLMs) have shown good performance in various natural language tasks, but they often fall short in the finance domain 11 ; 10 ; 21 . This is because models typically lack exposure to domain-specific semantics and are not linked to real-world financial feedback; as a result, the sentiment classifications often diverge from actual market responses. News headlines are widely used for sentiment-driven prediction tasks 7 ; 2 ; 6 . Headlines generally capture the core event and provide stronger, more concentrated sentiment signals than full articles. Although full articles offer detailed background information, they often introduce noise that can dilute predictive performance. However, headlines from certain sources may be extremely brief and lack sufficient contextual information. Therefore, aggregating news from multiple trusted sources is essential to obtain a more comprehensive understanding of the underlying events. The existing approaches have not considered the financial contexts from multiple sources and the reliability of news sources over time. To address the above issues, we proposed an adaptive sentiment analysis framework that integrates instruction-tuned LLMs with multi-source news data retrieval and a feedback mechanism. We fine-tuned the LLaMA 3.2 3B model using instruction-formatted financial data. We then augmented each input news query with dynamically retrieved context news from trusted financial sources using a retrieval-augmented generation (RAG) approach. The reliability of these sources, determined by source weightage, is adjusted based on the alignment of stock returns. We also employed a reinforcement learning agent using proximal policy optimization (PPO) to learn weighting strategies that evolve in response to news patterns and stock market behavior. We created a news dataset comprising NIFTY 50 companies.The sentiment labels are derived from market-adjusted return movements. Our feedback-aware system outperforms traditional LLMs and static RAG pipelines in both accuracy and alignment with market trends. Through this approach, we tried to bridge the gap between LLM capabilities and financial domain requirements, thereby offering an approach to sentiment analysis that is both context-sensitive and feedback-driven. This approach can be integrated with more powerful LLMs or domain-specific architectures in the future. The key contributions made by our work can be summarized as follows: • We fine-tuned the LLaMA 3.2 3B model using an instruction-based prompt with domain-specific sentiment data to enable the LLM to understand financial sentiment in an Indian market context. • We constructed a test dataset for NIFTY 50 companies from multiple financial sources, where ground-truth sentiment labels assignment is based on next-day stock returns relative to rolling mean and volatility. • We designed a retrieval-augmented generation (RAG) pipeline that incorporates multi-source contextual evidence, and the top k relevant news articles were retrieved based on cosine similarity of the sentence embeddings. • We implemented a direct feedback mechanism that updates the source weights by comparing sentiment predictions with actual next-day stock returns, allowing the system to align more closely with market behavior. • We developed a reinforcement learning agent using proximal policy optimization (PPO) to optimize context source weights over time, thereby learning a feedback-aware retrieval strategy that generalizes across days. The remainder of the paper is structured as follows: Section 2 reviews the literature on financial sentiment analysis and large language models (LLMs). Section 3 describes the datasets used in the study. The section 4 discusses the fine-tuning process, retrieval-augmented generation (RAG), and reinforcement learning. Section 5 explains the evaluation metrics and strategy. Section 6 presents the experimental results and analysis. Finally, Section 7 concludes the paper and highlights directions for future research. 2. Literature Review Financial sentiment analysis has been performed using dictionary-based evaluations, machine learning (ML), deep learning (DL), transformer models like FinBERT, and, more recently, large language models (LLMs). This section surveys key contributions from each phase. 2.1. Dictionary-Based Approaches The earliest sentiment analysis was performed using manually curated sentiment lexicons. Tools like SentiWordNet, VADER, and the Loughran-McDonald Financial Sentiment Dictionary 12 provided word-level polarity scores, enabling straightforward sentiment classification by counting positive and negative tokens. While these methods were interpretable and domain-specific to some extent, they lacked contextual understanding and failed in the presence of sarcasm, negations, or complex sentence structures. Their inability to adapt to new language patterns and lack of feedback integration limited their effectiveness in financial domains. 2.2. Machine Learning Techniques Dictionary-based methods often do not consider the context and ignore domain-specific meanings 13 ; therefore, to improve generalization, classical ML models that are trained with sentence label pairs, such as Naive Bayes, support vector machines (SVM), and logistic regression, were employed 15 . These models relied on handcrafted features, such as n-grams, POS tags, and TF-IDF vectors, and outperformed lexicon-based techniques in many scenarios. However, they still struggled with long-range dependencies and syntactic structure. Moreover, these models were typically static post-training and did not incorporate time-evolving market behavior. 2.3. Deep Learning Techniques The deep learning models enabled the automatic extraction and modeling of complex linguistic structures 17 . Models such as CNNs, RNNs, and LSTMs 14 have been widely used for sentiment classification, as they can capture sequential dependencies in text, making them well-suited for analyzing financial reports and news articles. But these models require more data for training, are domain-agnostic, and tend to