Stock Price Prediction with LLM-Guided Market Movement Signals and Transformer Model
Accurate stock price prediction is difficult because financial markets are complex and affected by various factors. Traditional methods often fail to analyze financial news and market trends effectively. Recent improvements in large language models (LLMs) allow better extraction of insights from text and stock data. Motivated by these advances, this paper introduces a new approach that combines LLM-generated stock predictions with a Transformer model to forecast prices. Specifically, a structured prompt fed with financial news and stock features is designed. Then, the prompt-based LLM approach is used to generate the predicted trend in the form of a one-hot vector and its corresponding probability. Finally, the LLM-generated output, together with historical closing prices, is used as input to a Transformer model to predict the stock price for the next day. To examine the effectiveness of the proposed framework, models such as Long Short Term Memory (LSTM), Temporal Convolutional Network, Convolutional Neural Network (CNN), CNN-LSTM, Random Forest, support vector regressor, XGBoost, and vanilla Transformer are chosen for comparison. In addition, an ablation study is conducted under several configurations. The findings indicate that the proposed framework exhibits superior performance compared to all the baseline models. Moreover, the ablation study demonstrates that integrating LLM-predicted features has the potential to improve stock price prediction performance.
Authors
- Qizhao Chen
Institutions
- University of Hyogo (JP)
Publication Details
- Journal
- FinTech and Sustainable Innovation
- Published
- 2025-01-01
- DOI
- https://doi.org/10.47852/bonviewfsi52025703
- Citations
- 4
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 8.43