FinGPT 研究

大型语言模型(LLMS)向金融领域的转型整合带来了独特的复杂性和巨大的机遇。要应对高时间敏感性、动态金融景观以及金融数据中的低信噪比等挑战,就需要高效的解决方案。FinGPT通过利用预先存在的LLM并根据特定的金融应用对其进行微调,做出了创新性的回应。与BloombergGPT等模型相比,这种方法大大降低了适应成本和计算要求,为金融语言建模提供了一种更方便、更灵活、更经济的解决方案。因此,它可以实现一致的更新,以确保模型的准确性和相关性,这是动态和时间敏感的金融界的一个关键方面。

为什么是微调而不是重新训练

尽管BloombergGPT在金融方面的能力非常出色,但它的计算量非常大。它花了大约130万GPU小时进行培训,按AWScloud2.3美元的费率计算,相当于每次培训花费约300万美元。与BloombergGPT之类模型的高计算成本形成对比的是,FinGPT通过关注顶级开源LLMs的轻量级适配,提供了一个更易于访问的解决方案。适应费用大幅下降,估计每次培训不到300美元。这种方法确保了及时更新和适应性,特别是在动态金融领域。开源的FinGPT不仅提升了透明度,还允许用户定制,迎合了个性化金融咨询服务的兴起趋势。最终,FinGPT的经济高效、灵活的框架有可能让金融语言建模不再通用,并促进以用户为中心的金融服务。

通过低秩自适应(LoRA)进行微调

在FinGPT中,我们利用一个新颖的金融数据集对预训练的LLM进行微调。众所周知,高质量的标记数据是许多成功的LLMs(包括ChatGPT)的关键决定因素。然而,获得这样的顶级标记数据往往在时间和资源方面成本高昂,并且通常需要金融专业人士的专业知识。

如果我们的目标是利用LLMs分析与金融相关的文本数据并协助量化交易,那么利用市场固有的标注能力似乎是明智的选择。因此,我们使用每个新闻项目的相对股票价格变动百分比作为输出标签。我们根据新闻项目的情感将这些标签划分为三个类别:正面、负面和中性

在相应的提示工程步骤中,我们还提示模型从正面、负面和中性输出中选择一个。这种策略确保了预先训练信息的最佳利用。通过使用LLMs的Low-Rank Adaptation (LoRA) [Hu et al., 2021; Dettmers et al., 2023],我们设法将可训练参数的数量从61.7亿减少到仅仅367万。

通过强化学习对股价进行微调(RLSP)

同样地,我们可以将基于股票价格的强化学习(RLSP)替换为ChatGPT所使用的基于人类反馈的强化学习。这种替代的原因是,股票价格提供了一个可量化、客观的度量标准,反映了市场对新闻和事件的情绪。这使得它成为了训练模型的强大实时反馈机制。

强化学习(RL)允许模型通过与环境的交互和反馈学习。在RLSP的情况下,环境是股票市场,反馈以股票价格变化的形式出现。这种方法使FinGPT能够完善其对金融文本的理解和解释,提高其预测市场对各种金融事件的反应的能力。

通过将新闻情绪与相关股票的后续表现联系起来,RLSP为微调FinGPT提供了一种有效的方法。本质上,RLSP允许模型推断市场对不同新闻事件的反应,并相应地调整其理解和预测。

因此,将RLSP集成到FinGPT的微调过程中,提供了一个强大的工具来改善模型对金融市场的理解和预测准确性。通过使用实际股票价格变动作为反馈,我们直接利用市场智慧来使我们的模型更加有效。

端到端架构

image.png
整个框架分为五个层次

  • _Data source layer:确保全面的市场数据覆盖和时间敏感性问题 _The starting point of the FinGPT pipeline is the Data Source Layer, which orchestrates the acquisition of extensive financial data from a wide array of online sources. This layer ensures comprehensive market coverage by integrating data from news websites, social media platforms, financial statements, market trends, and more. The goal is to capture every nuance of the market, thereby addressing the inherent temporal sensitivity of financial data.
  • _Data engineering layer:为实时NLP数据处理做准备,处理金融数据中的高时间灵敏性和噪声问题 _This layer focuses on the realtime processing of NLP data to tackle the challenges of _high temporal sensitivity _and _low signal-to-noise ratio _inherent in financial data. It incorporates state-of-the-art NLP techniques to filter noise and highlight the most salient pieces of information.
  • _LLMs layer:关注于 一系列的微调方法论,减轻了金融数据自带的高度动态性,保证了模型的相关性和准确性 _Lying at the heart, it encompasses various fine-tuning methodologies, with a priority on lightweight adaptation, to keep the model updated and pertinent. By maintaining an updated model, FinGPT can deal with the highly dynamic nature of financial data, ensuring its responses are in sync with the current financial climate
  • _Application layer:实际应用和demo示例,_The final component of FinGPT is the Applications Layer, designed to demonstrate the practical applicability of FinGPT. It offers hands-on tutorials and demo applications for financial tasks, including roboadvisory services, quantitative trading, and low-code development. These practical demonstrations not only serve as a guide to potential users but also underscore the transformative potential of LLMs in finance.

猜你喜欢

转载自blog.csdn.net/qq_44089890/article/details/131755731
今日推荐