Paper: arXiv 2405.09747

Abstract

We introduce and make publicly available the NIFTY Financial News Headlines dataset, designed to facilitate and advance research in financial market forecasting using large language models (LLMs). This dataset comprises two distinct versions tailored for different modeling approaches: (i) NIFTY-LM, which targets supervised fine-tuning (SFT) of LLMs with an auto-regressive, causal language-modeling objective, and (ii) NIFTY-RL, formatted specifically for alignment methods (like reinforcement learning from human feedback (RLHF)) to align LLMs via rejection sampling and reward modeling. Each dataset version provides curated, high-quality data incorporating comprehensive metadata, market indices, and deduplicated financial news headlines systematically filtered and ranked to suit modern LLM frameworks. We also include experiments demonstrating some applications of the dataset in tasks like stock price movement and the role of LLM embeddings in information acquisition/richness. The NIFTY dataset along with utilities (like truncating prompt’s context length systematically) are available on Hugging Face at https://huggingface.co/datasets/raeidsaqur/NIFTY.

Complexity vs Empirical Score

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

Why this score: The paper introduces a publicly available, structured dataset with accompanying experiments and code for training LLMs, demonstrating a practical focus on implementation and data utility. While the methodology involves complex LLM training paradigms (SFT/RLHF), the mathematics is primarily algorithmic and architectural rather than theoretically dense, with no heavy derivations or novel proofs.

Research Flowchart

  flowchart TD
  A["Research Goal:<br>Forecast Markets using LLMs"] --> B["Data Curation<br>NIFTY Dataset Creation"]
  B --> C["Model Alignment Methods"]
  C --> D["Supervised Fine-Tuning SFT<br>NIFTY-LM"]
  C --> E["Alignment via RLHF<br>NIFTY-RL"]
  D --> F["Computational Process:<br>Embedding Extraction &<br>Market Prediction"]
  E --> F
  F --> G["Key Findings:<br>Dataset Efficacy &<br>LLM Embedding Utility"]

Cited References (284)

  1. GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding (2019)
  2. SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systems (2019)
  3. CLUES: few-shot learning evaluation in natural language understanding (2021)
  4. Measuring Massive Multitask Language Understanding (2021)
  5. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models (2022)
  6. Holistic evaluation of language models (2022)
  7. GlobalBench : A Benchmark for Global Progress in Natural Language Processing (2023)
  8. Stable-baselines3: Reliable reinforcement learning implementations (2021)
and 276 more
  1. Proximal policy optimization algorithms (2017) — link
  2. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor (2018)
  3. Learning robust rewards with adversarial inverse reinforcement learning (2017) — link
  4. Adversarial Motion Priors Make Good Substitutes for Complex Reward Functions (2022) — link
  5. Variational discriminator bottleneck: Improving imitation learning, inverse rl, and gans by constraining information flow (2018) — link
  6. Generative adversarial imitation learning (2016) — link
  7. f-irl: Inverse reinforcement learning via state marginal matching (2020) — link
  8. Scalable bayesian inverse reinforcement learning (2021) — link
  9. Guided cost learning: Deep inverse optimal control via policy optimization (2016)
  10. Learning agents for uncertain environments (1998)
  11. Algorithms for inverse reinforcement learning. (2000)
  12. Apprenticeship learning via inverse reinforcement learning (2004)
  13. Learning Goal Conditioned Socially Compliant Navigation From Demonstration Using Risk-Based Features (2021)
  14. A survey of inverse reinforcement learning (2022)
  15. A survey of inverse reinforcement learning: Challenges, methods and progress (2021)
  16. Imitation learning: A survey of learning methods (2017)
  17. Information theory and statistical mechanics. II (1957)
  18. Tabu search (1998)
  19. Maximum Entropy Inverse Reinforcement Learning. (2008) — link
  20. Maximum Entropy Deep Inverse Reinforcement Learning (2016) — link
  21. Maximum entropy deep inverse reinforcement learning (2015) — link
  22. Inverse reinforcement learning in partially observable environments (2011)
  23. Inverse reinforcement learning in partially observable environments
  24. A survey of robot learning from demonstration (2009)
  25. Action understanding as inverse planning (2009)
  26. An application of inverse reinforcement learning to medical records of diabetes treatment (2013)
  27. Reinforcement learning: An introduction (2018)
  28. OpenAI gym (2016) — link
  29. Mujoco: A physics engine for model-based control (2012)
  30. Using Reward Machines for High-Level Task Specification and Decomposition in Reinforcement Learning (2018) — link
  31. Learning Reward Machines for Partially Observable Reinforcement Learning (2019) — link
  32. Reward Machines: Exploiting Reward Function Structure in Reinforcement Learning (2020) — link
  33. Reward machines: Exploiting reward function structure in reinforcement learning (2022)
  34. The 37 Implementation Details of Proximal Policy Optimization (2022) — link
  35. An automata-theoretic approach to linear temporal logic (1996)
  36. Automata-theoretic approach to planning for temporally extended goals (1999)
  37. Inverse reinforcement learning using expectation maximization in mixture models (2015)
  38. OptionGAN : Learning joint reward-policy options using generative adversarial inverse reinforcement learning (2018)
  39. Quadratic optimization (1995)
  40. A general class of coefficients of divergence of one distribution from another (1966)
  41. Understanding the Kalman filter (1983)
  42. Deep kalman filters (2015) — link
  43. Stochastic processes and filtering theory (2007)
  44. A survey of large language models (2023)
  45. Emergent abilities of large language models (2022)
  46. On the opportunities and risks of foundation models (2021)
  47. Attention is All you Need (2017)
  48. Deep Contextualized Word Representations (2018) — link
  49. BERT : Pre-training of Deep Bidirectional Transformers for Language Understanding (2019) — link
  50. Roberta: A robustly optimized bert pretraining approach (2019)
  51. XLNet: Generalized Autoregressive Pretraining for Language Understanding (2019)
  52. BART : Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension (2020) — link
  53. Language Models are Few-Shot Learners (2020)
  54. GPT-4 Technical Report (2023)
  55. Learning Word Vectors for 157 Languages (2018)
  56. BPE mb: Tokenization-free Pre-trained Subword Embeddings in 275 Languages (2018)
  57. Text Embeddings by Weakly-Supervised Contrastive Pre-training (2022)
  58. MPNet: Masked and Permuted Pre-training for Language Understanding (2020)
  59. Training language models to follow instructions with human feedback (2022)
  60. Megatron-lm: Training multi-billion parameter language models using model parallelism (2019)
  61. Finetuned Language Models are Zero-Shot Learners (2022)
  62. Bloom: A 176b-parameter open-access multilingual language model (2022)
  63. OPT : Open pre-trained transformer language models (2022)
  64. PaLM : Scaling language modeling with pathways. 2022 (2022)
  65. LLaMA : Open and efficient foundation language models (2023)
  66. Llama 2: Open foundation and fine-tuned chat models (2023) — link
  67. Code llama: Open foundation models for code (2023) — link
  68. GLaM: Efficient Scaling of Language Models with Mixture-of-Experts (2022)
  69. Data Contamination: From Memorization to Exploitation (2022) — link
  70. Stop Uploading Test Data in Plain Text: Practical Strategies for Mitigating Data Contamination by Evaluation Benchmarks (2023)
  71. Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled Corpus (2021) — link
  72. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer (2020)
  73. Quality at a Glance: An Audit of Web-Crawled Multilingual Datasets (2022) — link
  74. Multimodal datasets: misogyny, pornography, and malignant stereotypes (2021)
  75. Deduplicating Training Data Makes Language Models Better (2022) — link
  76. What In-Context Learning “Learns” In-Context: Disentangling Task Recognition and Task Learning (2023) — link
  77. Challenges and Applications of Large Language Models (2023) — link
  78. Chain-of-thought prompting elicits reasoning in large language models (2022)
  79. A framework for few-shot language model evaluation (2021) — link
  80. Self-instruct: Aligning language model with self generated instructions (2022) — link
  81. Alpaca: A strong, replicable instruction-following model (2023)
  82. GPT-NeoX-20B : An Open-Source Autoregressive Language Model (2022) — link
  83. Prefix-tuning: Optimizing continuous prompts for generation (2021) — link
  84. Parameter-efficient transfer learning for NLP (2019)
  85. Lora: Low-rank adaptation of large language models (2021) — link
  86. Qlora: Efficient finetuning of quantized llms (2023) — link
  87. Gpt3. int8 (): 8-bit matrix multiplication for transformers at scale (2022)
  88. Bartscore: Evaluating generated text as text generation (2021)
  89. Bertscore: Evaluating text generation with bert (2019) — link
  90. Efficient Memory Management for Large Language Model Serving with PagedAttention (2023)
  91. Billion-scale similarity search with GPUs (2019)
  92. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer (2020) — link
  93. Fine-tuning language models from human preferences (2019) — link
  94. Learning to summarize with human feedback (2020)
  95. Training language models to follow instructions with human feedback, 2022 (2022)
  96. Training a helpful and harmless assistant with reinforcement learning from human feedback (2022) — link
  97. A general language assistant as a laboratory for alignment (2021) — link
  98. Mistral 7B (2023) — link
  99. Zephyr: Direct distillation of lm alignment (2023) — link
  100. Direct preference optimization: Your language model is secretly a reward model (2023) — link
  101. Teacher Guided Training: An Efficient Framework for Knowledge Transfer (2022) — link
  102. LlamaIndex (2022) — link
  103. Retrieval-augmented generation for large language models: A survey (2023) — link
  104. Sparks of artificial general intelligence: Early experiments with GPT-4 (2023)
  105. GPT-4 Technical Report (2023) — link
  106. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding (2019)
  107. Llama: Open and efficient foundation language models (2023) — link
  108. Stanford Alpaca: An Instruction-following LLaMA model (2023)
  109. Self-Instruct: Aligning Language Model with Self Generated Instructions (2022) — link
  110. Vicuna: An Open-Source Chatbot Impressing GPT-4 with 90%* ChatGPT Quality (2023) — link
  111. Exploring the Impact of Instruction Data Scaling on Large Language Models: An Empirical Study on Real-World Use Cases (2023) — link
  112. Individual choice behavior: A theoretical analysis (2005)
  113. The analysis of permutations (1975)
  114. FinRL-Meta: Market environments and benchmarks for data-driven financial reinforcement learning (2022)
  115. Natural language based financial forecasting: a survey (2018)
  116. Parrondo’s paradox (1999)
  117. Is all that talk just noise? The information content of internet stock message boards (2004)
  118. Investor sentiment and the near-term stock market (2004)
  119. An introduction to evolutionary computation in finance (2008)
  120. Bayesian portfolio analysis (2010)
  121. Twitter mood predicts the stock market (2011)
  122. Probabilistic topic models (2012)
  123. Connected stocks (2014)
  124. Jumping NLP curves: A review of natural language processing research (2014)
  125. Computational intelligence and financial markets: A survey and future directions (2016)
  126. Affective computing and sentiment analysis (2017)
  127. Domain randomization for transferring deep neural networks from simulation to the real world (2017)
  128. Sim-to-real transfer of robotic control with dynamics randomization (2018)
  129. Sim-to-real: Learning agile locomotion for quadruped robots (2018) — link
  130. Learning agile and dynamic motor skills for legged robots (2019)
  131. Advances in real-world applications for legged robots (2018)
  132. Probabilistic terrain mapping for mobile robots with uncertain localization (2018)
  133. Learning agile and dynamic motor skills for legged robots (2019)
  134. Learning to walk via deep reinforcement learning (2018) — link
  135. Learning locomotion skills for cassie: Iterative design and sim-to-real (2020)
  136. Learning agile robotic locomotion skills by imitating animals (2020) — link
  137. Learning quadrupedal locomotion over challenging terrain (2020)
  138. Learning by cheating (2020)
  139. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling (2018) — link
  140. Adapting rapid motor adaptation for bipedal robots (2022)
  141. Learning robust perceptive locomotion for quadrupedal robots in the wild (2022)
  142. Development of quadruped walking robots: A review (2021)
  143. Predictive representations of state (2001)
  144. Planning and acting in partially observable stochastic domains (1998)
  145. Solving POMDPs by searching the space of finite policies (2013) — link
  146. Learning Belief Representations for Partially Observable Deep RL (2023)
  147. Champion-level drone racing using deep reinforcement learning (2023)
  148. Nonparametric belief propagation (2010)
  149. Learning Task Automata for Reinforcement Learning using Hidden Markov Models (2022) — link
  150. Dynamic asset allocation for varied financial markets under regime switching framework (2014)
  151. Language models are few-shot learners (2020)
  152. The Wall Street Neophyte: A Zero-Shot Analysis of ChatGPT Over MultiModal Stock Movement Prediction Challenges — → 2304.05351
  153. Can ChatGPT Forecast Stock Price Movements? Return Predictability and Large Language Models — → 2304.07619
  154. Select and Trade: Towards Unified Pair Trading with Hierarchical Reinforcement Learning — → 2301.10724
  155. Finbert: Financial sentiment analysis with pre-trained language models (2019) — link
  156. WHEN FLUE MEETS FLANG: Benchmarks and Large Pre-trained Language Model for Financial Domain (2022) — link
  157. Bloomberggpt: A large language model for finance (2023) — link
  158. Finetuned language models are zero-shot learners (2021) — link
  159. Multitask Prompted Training Enables Zero-Shot Task Generalization (2022)
  160. The flan collection: Designing data and methods for effective instruction tuning (2023) — link
  161. Finbert: A pretrained language model for financial communications (2020) — link
  162. Mengzi: Towards lightweight yet ingenious pre-trained models for chinese (2021) — link
  163. BBT-Fin: Comprehensive Construction of Chinese Financial Domain Pre-trained Language Model, Corpus and Benchmark (2023) — link
  164. Are ChatGPT and GPT-4 General-Purpose Solvers for Financial Text Analytics? An Examination on Several Typical Tasks (2023) — link
  165. Electra: Pre-training text encoders as discriminators rather than generators (2020) — link
  166. Domain adaption of named entity recognition to support credit risk assessment (2015)
  167. Www'18 open challenge: financial opinion mining and question answering (2018)
  168. Convfinqa: Exploring the chain of numerical reasoning in conversational finance question answering (2022) — link
  169. FinQA: A Dataset of Numerical Reasoning over Financial Data (2021)
  170. Decoupled weight decay regularization (2017) — link
  171. Solving quantitative reasoning problems with language models (2022) — link
  172. Training verifiers to solve math word problems (2021) — link
  173. Accurate Stock Movement Prediction with Self-supervised Learning from Sparse Noisy Tweets (2022)
  174. Stock movement prediction from tweets and historical prices (2018)
  175. BELLE: Be Everyone’s Large Language model Engine (2023)
  176. Select and Trade: Towards Unified Pair Trading with Hierarchical Reinforcement Learning (2023)
  177. Mastering the game of Go with deep neural networks and tree search (2016)
  178. Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm (2017) — link
  179. Grandmaster level in StarCraft II using multi-agent reinforcement learning (2019)
  180. Highly accurate protein structure prediction with AlphaFold (2021)
  181. Solving olympiad geometry without human demonstrations (2024)
  182. Learning Paraphrastic Sentence Embeddings from Back-Translated Bitext (2017) — link
  183. GraphCast: Learning skillful medium-range global weather forecasting (2022) — link
  184. ImageNet Classification with Deep Convolutional Neural Networks (2012) — link
  185. Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm (2017) — link
  186. Highly accurate protein structure prediction with AlphaFold (2021)
  187. Self-Instruct: Aligning Language Models with Self-Generated Instructions (2023) — link
  188. OpenAI API (2024)
  189. Visualizing data using t-SNE. (2008)
  190. Visualizing data using t-SNE (2008)
  191. LIII. On lines and planes of closest fit to systems of points in space (1901)
  192. UMAP: Uniform manifold approximation and projection for dimension reduction (2018) — link
  193. UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction (2018) — link
  194. Density-based clustering based on hierarchical density estimates (2013)
  195. A Mathematical Theory of Communication (1948)
  196. The Elements of Statistical Learning: Data Mining, Inference, and Prediction (2009)
  197. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (2019) — link
  198. TF–IDF (2010) — link
  199. Transformers Documentation (2024)
  200. Reuters Dataset at TREC (2024)
  201. ShareGPT (2024)
  202. Good debt or bad debt: Detecting semantic orientations in economic texts (2014)
  203. Financial Trading as a Game: A Deep Reinforcement Learning Approach (2017)
  204. True Knowledge Comes from Practice: Aligning LLMs with Embodied Environments via Reinforcement Learning (2024) — link
  205. Temporal Data Meets LLM – Explainable Financial Time Series Forecasting (2023) — link
  206. LLM-Informed Multi-Armed Bandit Strategies for Non-Stationary Environments (2023) — link
  207. Unveiling the Potential of Sentiment: Can Large Language Models Predict Chinese Stock Price Movements? (2023) — link
  208. Reinforcement Learning for Optimizing RAG for Domain Chatbots (2024) — link
  209. TradingGPT: Multi-Agent System with Layered Memory and Distinct Characters for Enhanced Financial Trading Performance (2023) — link
  210. Scaling Sentence Embeddings with Large Language Models (2023) — link
  211. Unnatural language processing (2023) — link
  212. ConES: Concept Embedding Search for Parameter Efficient Tuning Large Vision Language Models (2023) — link
  213. Rcv1: A new benchmark collection for text categorization research (2004)
  214. OpenAI Baselines (2017)
  215. An empirical investigation of the challenges of real-world reinforcement learning (2020)
  216. Reinforcement learning in financial markets - a survey (2018)
  217. Advances in financial machine learning (2018)
  218. SENTiVENT: enabling supervised information extraction of company-specific events in economic and financial news (2022)
  219. Good debt or bad debt: Detecting semantic orientations in economic texts (2014)
  220. Www'18 open challenge: financial opinion mining and question answering (2018)
  221. Impact of news on the commodity market: Dataset and results (2021)
  222. PIXIU: A Large Language Model, Instruction Data and Evaluation Benchmark for Finance (2023) — link
  223. Hybrid deep sequential modeling for social text-driven stock prediction (2018)
  224. Stock movement prediction from tweets and historical prices (2018)
  225. Accurate Stock Movement Prediction with Self-supervised Learning from Sparse Noisy Tweets (2022)
  226. What teaches robots to walk, teaching them to trade too - Regime Adaptation Execution (2024)
  227. A deep reinforcement learning framework for the financial portfolio management problem (2017) — link
  228. Good debt or bad debt: Detecting semantic orientations in economic texts (2014)
  229. Finbert: Financial sentiment analysis with pre-trained language models (2019) — link
  230. Portfolio Transformer for Attention-Based Asset Allocation (2022) — link
  231. Sentiment analysis of financial news articles using performance indicators (2018)
  232. Evaluating Sentiment Analysis in the Context of Securities Trading. (2016)
  233. An analysis of verbs in financial news articles and their impact on stock price (2010)
  234. Textual analysis in accounting and finance: A survey (2016)
  235. PrivySense: Price Volatility based Sentiment Estimation from Financial News using Machine Learning (2017) — link
  236. Decision support from financial disclosures with deep neural networks and transfer learning (2017)
  237. Adaptive quantitative trading: An imitative deep reinforcement learning approach (2020)
  238. The Sharpe Ratio (1994)
  239. Foundations of portfolio theory (1991)
  240. Mean-variance investing (2012)
  241. Passive investment strategies and efficient markets (2003)
  242. Profitable momentum trading strategies for individual investors (2015)
  243. Is domain adaptation worth your investment? Comparing BERT and FinBERT on financial tasks (2021)
  244. The Future of Financial Analysis (1963)
  245. A random walk down wall street [by] burton G. Malkiel (1973)
  246. Efficient market hypothesis (1989)
  247. Efficient capital markets: A review of theory and empirical work (1970)
  248. Efficient capital markets: reply (1976)
  249. Efficient capital markets: II (1991)
  250. Market efficiency, long-term returns, and behavioral finance (1998)
  251. Regime changes and financial markets (2012)
  252. Size and value anomalies under regime shifts (2008)
  253. Markov switching models in empirical finance (2011)
  254. A new approach to the economic analysis of nonstationary time series and the business cycle (1989)
  255. Analysis of time series subject to changes in regime (1990)
  256. Regime switching models (2010)
  257. A hybrid learning approach to detecting regime switches in financial markets (2020)
  258. Clustering market regimes using the wasserstein distance (2021) — link
  259. OpenAI gym (2016) — link
  260. Reinforcement learning for robots using neural networks (1992)
  261. Policy gradient methods for reinforcement learning with function approximation (1999)
  262. Asynchronous methods for deep reinforcement learning (2016)
  263. Scalable trust-region method for deep reinforcement learning using kronecker-factored approximation (2017)
  264. Asynchronous methods for deep reinforcement learning (2016)
  265. Trust Region Policy Optimization (2015) — link
  266. Proximal policy optimization algorithms (2017) — link
  267. Continuous control with deep reinforcement learning (2015) — link
  268. Addressing function approximation error in actor-critic methods (2018)
  269. High-dimensional continuous control using generalized advantage estimation (2015) — link
  270. On the theory of the Brownian motion (1930)
  271. Asymptotics of maximum likelihood parameter estimates for gaussian processes: The ornstein–uhlenbeck prior (2019)
  272. Can we trust Bayesian uncertainty quantification from Gaussian process priors with squared exponential covariance kernel? (2021)
  273. Gradient estimation using stochastic computation graphs (2015)
  274. Optimizing expectations: From deep reinforcement learning to stochastic computation graphs (2016)
  275. A natural policy gradient (2001)
  276. Reinforcement learning and optimal control (2019)

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