[论文解读] FinLlama: Financial Sentiment Classification for Algorithmic Trading Applications
FinLlama 在金融数据上对 Llama 2 7B 进行 LoRA 微调,以对交易情感强度进行分类,从而在资源有限的情况下推动面向金融的投资组合改进。
There are multiple sources of financial news online which influence market movements and trader's decisions. This highlights the need for accurate sentiment analysis, in addition to having appropriate algorithmic trading techniques, to arrive at better informed trading decisions. Standard lexicon based sentiment approaches have demonstrated their power in aiding financial decisions. However, they are known to suffer from issues related to context sensitivity and word ordering. Large Language Models (LLMs) can also be used in this context, but they are not finance-specific and tend to require significant computational resources. To facilitate a finance specific LLM framework, we introduce a novel approach based on the Llama 2 7B foundational model, in order to benefit from its generative nature and comprehensive language manipulation. This is achieved by fine-tuning the Llama2 7B model on a small portion of supervised financial sentiment analysis data, so as to jointly handle the complexities of financial lexicon and context, and further equipping it with a neural network based decision mechanism. Such a generator-classifier scheme, referred to as FinLlama, is trained not only to classify the sentiment valence but also quantify its strength, thus offering traders a nuanced insight into financial news articles. Complementing this, the implementation of parameter-efficient fine-tuning through LoRA optimises trainable parameters, thus minimising computational and memory requirements, without sacrificing accuracy. Simulation results demonstrate the ability of the proposed FinLlama to provide a framework for enhanced portfolio management decisions and increased market returns. These results underpin the ability of FinLlama to construct high-return portfolios which exhibit enhanced resilience, even during volatile periods and unpredictable market events.
研究动机与目标
- 将金融文本中的情感信号桥接为可执行的交易决策。
- 使用通用大模型在极少资源下开发面向金融的情感分析器。
- 将情感输出整合到多头/空头投资组合中以评估现实世界指标。
- 表明有针对性的微调在有限计算能力下可超越金融领域基线。
提出的方法
- 在四个标注的金融文本数据集上对 Llama 2 7B 模型进行微调,总样本量为 34,180,用 SoftMax 分类器对正面、负面、中性进行分类。
- 应用参数高效微调(LoRA),使可训练参数约为 4.2M(占模型的 0.0638%)。
- 使用 AdamW,较小的学习率和正则化(预热、权重衰减)进行 5 个时期训练。
- 将训练量化/简化,以在单张 A100 GPU 上运行。
- 通过将情感信号整合到 35% 的多头/空头投资组合中来评估,并使用真实世界指标与 FinBERT 和基于词汇表的方法进行比较。
- 对 417 公司宇宙和 1,672 个交易日,在五种情感方法之间进行基准测试。
实验结果
研究问题
- RQ1能否通过 LLM 有效定制面向金融的情感分析以用于算法交易?
- RQ2参数高效微调能否在不牺牲性能的前提下,在中等硬件上实现面向金融的 LLM?
- RQ3来自 FinLlama 的情感信号是否相对于现有方法提升现实世界的投资组合指标?
主要发现
| 累计回报率 (%) | 年化回报率 (%) | 夏普比率 | 年化波动率 (%) |
|---|---|---|---|
| 204.6 | 29.1 | 1.5 | 19.5 |
| 100.4 | 13.5 | 0.7 | 18.9 |
| 130.6 | 17.9 | 0.9 | 19.6 |
| 213.0 | 30.3 | 1.5 | 20.3 |
| 308.2 | 45.0 | 2.4 | 18.6 |
| 83.1 | 11.3 | 0.62 | 18.5 |
- FinLlama 在累计回报和夏普比率上均高于所有对比基线,包括 FinBERT。
- FinLlama 相较于 FinBERT 和基于词典的方法,年化回报更高,年化波动率更低。
- 深度学习方法在累计回报方面优于词典方法,波动期(如 2020 年初)表现最强。
- 使用 FinLlama 的 35% 多头/空头投资组合的累计回报率为 308.2%,对比 FinBERT 的 213.0% 和 标普 500 的 83.1%。
- FinLlama 的夏普比率为 2.4,年化波动率为 18.6%,超越 FinBERT(夏普 1.5;波动 20.3%)。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。