Open Access

LLM-Driven Stock Prediction: Capturing Market Trends with LLaMA

 and   
Jul 24, 2025

Cite
Download Cover

Stock price forecasting remains a challenging task due to the dynamic nature of financial markets and the influence of external factors such as investor sentiment and macroeconomic events. Traditional time series statistical models often struggle to capture complex nonlinear dependencies and market signals embedded in unstructured data. With advancements in Large Language Models (LLMs), it is now possible to integrate textual information from financial news, social media, and earnings reports to enhance predictive accuracy. In this study, we leverage the LLaMA family of LLMs to improve stock price forecasting by combining historical price with news. We evaluate the performance of LLaMA 3.3 against LLaMA 3.1 and the benchmark ARIMA model to assess its effectiveness in capturing time series patterns and textual signals. Our results indicate that LLaMA 3.3 outperforms both LLaMA 3.1 and ARIMA, demonstrating its superior capability in modeling complex financial relationships. Additionally, our analysis confirms that market sentiment has an impact on stock returns, with sentiments influencing short-term price fluctuations. By incorporating news sentiment in LLMs prompt, we achieve improved forecasts compared to models without news. This highlights the importance of integrating both structured (numerical time series) and unstructured (news sentiment) data for enhanced financial modeling. Our findings suggest that LLM-driven forecasting methods hold substantial promise for traders, analysts, and financial institutions seeking more accurate market predictions. Future work will explore fine-tuning LLaMA models for domain-specific financial tasks and improving interpretability in decision making processes.