Table of Contents
Fetching ...

Enhancing Few-Shot Stock Trend Prediction with Large Language Models

Yiqi Deng, Xingwei He, Jiahao Hu, Siu-Ming Yiu

TL;DR

This work tackles stock trend prediction under limited labeled data by leveraging large language models in a few-shot setting. It identifies two core issues with prior approaches—noise from merged news and input-length limits—and proposes a two-step denoising-then-voting pipeline that classifies each news item into Up, Down, or Irrelevant and then aggregates predictions via majority voting using a threshold rule. The method yields consistent gains over standard and voting few-shot prompts and reaches performance on par with state-of-the-art supervised methods across the S&P 500, CSI-100, and HK stock datasets. The findings demonstrate the practical viability of LLM-based, label-efficient stock forecasting and highlight the utility of explicit noise filtering and per-item aggregation in financial text analysis.

Abstract

The goal of stock trend prediction is to forecast future market movements for informed investment decisions. Existing methods mostly focus on predicting stock trends with supervised models trained on extensive annotated data. However, human annotation can be resource-intensive and the annotated data are not readily available. Inspired by the impressive few-shot capability of Large Language Models (LLMs), we propose using LLMs in a few-shot setting to overcome the scarcity of labeled data and make prediction more feasible to investors. Previous works typically merge multiple financial news for predicting stock trends, causing two significant problems when using LLMs: (1) Merged news contains noise, and (2) it may exceed LLMs' input limits, leading to performance degradation. To overcome these issues, we propose a two-step method 'denoising-then-voting'. Specifically, we introduce an `Irrelevant' category, and predict stock trends for individual news instead of merged news. Then we aggregate these predictions using majority voting. The proposed method offers two advantages: (1) Classifying noisy news as irrelevant removes its impact on the final prediction. (2) Predicting for individual news mitigates LLMs' input length limits. Our method achieves 66.59% accuracy in S&P 500, 62.17% in CSI-100, and 61.17% in HK stock prediction, outperforming the standard few-shot counterparts by around 7%, 4%, and 4%. Furthermore, our proposed method performs on par with state-of-the-art supervised methods.

Enhancing Few-Shot Stock Trend Prediction with Large Language Models

TL;DR

This work tackles stock trend prediction under limited labeled data by leveraging large language models in a few-shot setting. It identifies two core issues with prior approaches—noise from merged news and input-length limits—and proposes a two-step denoising-then-voting pipeline that classifies each news item into Up, Down, or Irrelevant and then aggregates predictions via majority voting using a threshold rule. The method yields consistent gains over standard and voting few-shot prompts and reaches performance on par with state-of-the-art supervised methods across the S&P 500, CSI-100, and HK stock datasets. The findings demonstrate the practical viability of LLM-based, label-efficient stock forecasting and highlight the utility of explicit noise filtering and per-item aggregation in financial text analysis.

Abstract

The goal of stock trend prediction is to forecast future market movements for informed investment decisions. Existing methods mostly focus on predicting stock trends with supervised models trained on extensive annotated data. However, human annotation can be resource-intensive and the annotated data are not readily available. Inspired by the impressive few-shot capability of Large Language Models (LLMs), we propose using LLMs in a few-shot setting to overcome the scarcity of labeled data and make prediction more feasible to investors. Previous works typically merge multiple financial news for predicting stock trends, causing two significant problems when using LLMs: (1) Merged news contains noise, and (2) it may exceed LLMs' input limits, leading to performance degradation. To overcome these issues, we propose a two-step method 'denoising-then-voting'. Specifically, we introduce an `Irrelevant' category, and predict stock trends for individual news instead of merged news. Then we aggregate these predictions using majority voting. The proposed method offers two advantages: (1) Classifying noisy news as irrelevant removes its impact on the final prediction. (2) Predicting for individual news mitigates LLMs' input length limits. Our method achieves 66.59% accuracy in S&P 500, 62.17% in CSI-100, and 61.17% in HK stock prediction, outperforming the standard few-shot counterparts by around 7%, 4%, and 4%. Furthermore, our proposed method performs on par with state-of-the-art supervised methods.
Paper Structure (29 sections, 9 figures, 8 tables)

This paper contains 29 sections, 9 figures, 8 tables.

Figures (9)

  • Figure 1: Comparison between state-of-the-art supervised methods and our proposed LLM-based 'denoising-then-voting'method.
  • Figure 2: An overview of three prompts used by LLMs in stock trend prediction. On the right, we display our 'denoising-then-voting' paradigm. The heavy green part is the denoising strategy, where we introduce an ‘Irrelevant’ category and process each news individually. The blue part is the majority voting strategy where we reuse the predicted label of each individual news from the denoising stage and obtain the final predicted result through a majority voting mechanism. The standard and voting prompts are respectively displayed on the left and in the middle for comparison.
  • Figure 3: Comparison between the voting and 'denoising-then-voting' (D+V) methods on S&P 500, CSI-100 and HK across different LLMs.
  • Figure 4: The prediction accuracy of S&P 500 index when aggregating various numbers of news titles with three few-shot methods.
  • Figure 5: The voting prompt w/o 'Irrelevant' category in S&P 500 index prediction.
  • ...and 4 more figures