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.
翻译:在线金融新闻来源众多,这些新闻会影响市场走势和交易者的决策。因此,除了采用合适的算法交易技术外,还需要进行准确的情感分析,以做出更明智的交易决策。基于标准词典的情感方法在辅助金融决策方面已展现出其强大能力,但这类方法存在对上下文敏感性和词序处理不足的问题。大型语言模型(LLMs)也可用于此场景,然而它们并非金融领域专用模型,且往往需要大量的计算资源。为构建金融领域专用的大语言模型框架,我们提出了一种基于Llama 2 7B基础模型的新方法,旨在利用其生成式特性和全面的语言处理能力。具体方法是对Llama 2 7B模型使用少量有监督的金融情感分析数据进行微调,使其能够联合处理金融词汇的复杂性和上下文信息,并进一步配备基于神经网络的决策机制。这种生成器-分类器方案被称为FinLlama,它不仅能够对情感倾向进行分类,还能量化情感强度,从而为交易者提供对金融新闻文章的细致洞察。此外,通过LoRA实现的参数高效微调优化了可训练参数数量,在不牺牲准确性的前提下最大化地降低了计算和内存需求。仿真结果表明,所提出的FinLlama能够为增强投资组合管理决策和提高市场回报提供有效框架。这些结果证明了FinLlama能够在波动时期和不可预测的市场事件中构建具有更高韧性的高回报投资组合。