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,需要专家为训练集中每次股票波动标注解释样本,这既昂贵又难以规模化。为应对这些问题,我们提出总结-解释-预测(SEP)框架,该框架利用自反思智能体与近端策略优化(PPO),让LLM以完全自主方式学习生成可解释股票预测。反思智能体通过自我推理学习解释历史股票波动,而PPO训练器训练模型从输入文本中生成最可能的解释。PPO训练器的训练样本同样来自反思过程中生成的响应,从而消除了对人工标注者的需求。采用SEP框架微调的LLM,在股票分类任务的预测精度和马修斯相关系数上均优于传统深度学习和LLM方法。为验证框架的泛化能力,我们进一步在投资组合构建任务上进行测试,并通过多种投资组合指标证明了其有效性。