Explaining stock predictions is generally a difficult task for traditional non-generative deep learning models, where explanations are limited to visualizing the attention weights on important texts. Today, Large Language Models (LLMs) present a solution to this problem, given their known capabilities to generate human-readable explanations for their decision-making process. However, the task of stock prediction remains challenging for LLMs, as it requires the ability to weigh the varying impacts of chaotic social texts on stock prices. The problem gets progressively harder with the introduction of the explanation component, which requires LLMs to explain verbally why certain factors are more important than the others. On the other hand, to fine-tune LLMs for such a task, one would need expert-annotated samples of explanation for every stock movement in the training set, which is expensive and impractical to scale. To tackle these issues, we propose our Summarize-Explain-Predict (SEP) framework, which utilizes a self-reflective agent and Proximal Policy Optimization (PPO) to let a LLM teach itself how to generate explainable stock predictions in a fully autonomous manner. The reflective agent learns how to explain past stock movements through self-reasoning, while the PPO trainer trains the model to generate the most likely explanations from input texts. The training samples for the PPO trainer are also the responses generated during the reflective process, which eliminates the need for human annotators. Using our SEP framework, we fine-tune a LLM that can outperform both traditional deep-learning and LLM methods in prediction accuracy and Matthews correlation coefficient for the stock classification task. To justify the generalization capability of our framework, we further test it on the portfolio construction task, and demonstrate its effectiveness through various portfolio metrics.
翻译:对传统非生成式深度学习模型而言,解释股票预测通常是一项困难任务,其解释方式仅限于可视化重要文本上的注意力权重。如今,大语言模型(LLMs)凭借其在决策过程中生成人类可读解释的已知能力,为这一问题提供了解决方案。然而,股票预测任务对LLMs而言仍具挑战性,因为它需要模型具备衡量混乱社交文本对股票价格不同影响程度的能力。引入解释组件后问题难度进一步增加,这要求LLMs用自然语言阐述为何某些因素比其他因素更为重要。另一方面,为此类任务微调LLMs需要为训练集中每个股票变动配备专家标注的解释样本,这既昂贵又难以规模化。为解决这些问题,我们提出Summarize-Explain-Predict(SEP)框架,该框架利用自反思智能体与近端策略优化(PPO)算法,使LLM能够以完全自主的方式学会生成可解释的股票预测。反思智能体通过自我推理学习解释历史股票变动,而PPO训练器则训练模型根据输入文本生成最可能的解释。PPO训练器的训练样本也来自反思过程中生成的响应,从而消除了对人工标注员的需求。通过SEP框架微调的LLM,在股票分类任务的预测准确率和马修斯相关系数上均优于传统深度学习方法与LLM方法。为验证框架的泛化能力,我们进一步将其应用于投资组合构建任务,并通过多种投资组合指标证明了其有效性。