In this paper, we present a stock market forecasting framework that integrates sentiment analysis of news headlines associated with individual stocks performed by Large Language Models (LLMs) with economic indicators. Specifically, we infer multi-class labels and continuous polarity scores by using LLMs (i.e., Llama, Vicuna, and Mistral) under zero-shot settings from news content. These sentiment signals are combined with historical price data and economic indicators and fed as input to different deep learning models (i.e., Long Short-Term Memory (LSTM) networks, Generative Adversarial Networks (GANs), and Transformers) for predicting stock closing prices. We evaluate the proposed framework on a dataset comprising historical financial time series and 8652 news articles related to 47 meme stocks listed on major stock exchanges, covering the period from January 2019 to December 2021. While Vicuna delivers the quickest sentiment processing (around faster than Llama), it achieves the greatest hallucination rate ( ). Among the forecasting models, Transformer architectures offer improved Mean Absolute Percentage Error (MAPE) scores ( – ) while LSTM requires minimal computational resources for training (up to ).
Officioso et al. (Mon,) studied this question.