Adaptive Financial Sentiment Analysis for NIFTY 50 via Instruction-Tuned LLMs , RAG and Reinforcement Learning Approaches
Chaithra, Kamesh Kadimisetty, Biju R Mohan
TL;DR
This work tackles adaptive financial sentiment analysis for Indian markets by linking textual sentiment to market responses. It combines instruction-tuned LLaMA 3.2 3B, a retrieval-augmented generation pipeline for multi-source context, a market-feedback mechanism, and a PPO-based reinforcement learner to optimize source weighting. Using SentiFin for fine-tuning and a RAG dataset of 8,000 NIFTY 50 headlines with market-grounded labels, the approach is evaluated on 2024–2025 headlines and shows improvements in accuracy and alignment with next-day returns over baselines. The results demonstrate the viability of market-aware sentiment modeling and suggest avenues for extending to broader markets with richer signals such as fundamentals and peer-stock context.
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.
