Hong Kong University of Science and Technology
Fine-tuning pretrained language models with time series and textual data for stock movement prediction
Abstract
dc:description<p>Predicting stock movement, rise or fall, is a challenging task with high practical impact. Traditional methods, ranging from statistical time-series models and regression analysis to neural networks, rely on numerical features extracted from historical stock price data. Recent efforts have also taken into consideration non-numeric factors, such as stock events, industry trends, or political issues, summarized from textual data. Nevertheless, as a dynamic event in the open world, stock price movement remains a hard problem for prediction.</p> <p>News articles and social media posts are important information for stock prediction. Traditionally, it is not easy to combine them because of the hardness of natural language understanding and numerical reasoning. The rise of LLMs makes this task doable and promising. Large Language Models (LLMs) have demonstrated impressive performance on sentiment analysis of financial news and social media posts. However, their performance on numerical data sources is under-explored. Therefore, in this thesis, we study stock movement prediction by utilizing the stock market time series data and the news/tweets textual data. Specifically, we use GPT-4 to identify news relevant to stocks and summarize these news as well as stock descriptions as supplementary data. We then add low-rank adaptation (LoRA) to the pre-trained open-source Large Language Model Llama2 and fine-tune it with news/tweets data and previous day stock price movement as prompts. Furthermore, we add a stock processing block to our modified Llama? to take into past 30-days of stock market price embedding. Our prompts give the LLM background information and clear question instructions for prediction, whereas the stock price block together with LoRA enables the model to train with the stock time-series data. The result shows that our method utilizes the reasoning ability of LLMs and makes predictions that can outperform the baseline models. This result indicates that LLMs can learn both textual and numerical information to facilitate time series forecast.</p>
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Liu, Yixin
- Contributors dc:contributor
-
- Luo, Qiong
- Tang, Nan
Rights
- Language dc:language
- English
Identifiers
dc:identifier.*- Repository record dc:identifier
- http://repository.hkust.edu.hk/ir/Record/1783.1-150219