ALFFLLM·FINANCE

The List / Foundation and Domain Language Models / paper

FinGPT: Open-Source Financial Large Language Models

Hongyang Yang; Xiao-Yang Liu; Chris Wang

2023Social Science Research Networkcites 380P0arXiv ↗DOI ↗Semantic Scholar ↗Source ↗

Abstract

Large language models (LLMs) have shown the potential of revolutionizing natural language processing tasks in diverse domains, sparking great interest in finance. Accessing high-quality financial data is the first challenge for financial LLMs (FinLLMs). While proprietary models like BloombergGPT have taken advantage of their unique data accumulation, such privileged access calls for an open-source alternative to democratize Internet-scale financial data. In this paper, we present an open-source large language model, FinGPT, for the finance sector. Unlike proprietary models, FinGPT takes a data-centric approach, providing researchers and practitioners with accessible and transparent resources to develop their FinLLMs. We highlight the importance of an automatic data curation pipeline and the lightweight low-rank adaptation technique in building FinGPT. Furthermore, we showcase several potential applications as stepping stones for users, such as robo-advising, algorithmic trading, and low-code development. Through collaborative efforts within the open-source AI4Finance community, FinGPT aims to stimulate innovation, democratize FinLLMs, and unlock new opportunities in open finance. Two associated code repos are https://github.com/AI4Finance-Foundation/FinGPT and https://github.com/AI4Finance-Foundation/FinNLP

In one sentence

FinGPT introduces an open-source, data-centric framework for financial LLMs that utilizes lightweight LoRA fine-tuning and market-driven reinforcement learning to achieve superior financial sentiment analysis compared to proprietary and baseline models.

Summary

The paper addresses the critical need for accessible, transparent, and cost-effective financial large language models (FinLLMs) by introducing FinGPT, an open-source framework. It highlights the unique challenges of the financial domain, including high temporal sensitivity, constant dynamism, and low signal-to-noise ratios, which make proprietary models like BloombergGPT inaccessible to many researchers. FinGPT democratizes access by providing a full-stack, data-centric pipeline that emphasizes rigorous data curation, real-time processing, and lightweight adaptation techniques, aiming to foster innovation within the open-source AI4Finance community. The methodology centers on a five-layer architecture: data source, data engineering, LLMs, tasks, and applications. The data engineering layer implements a real-time pipeline for cleaning, tokenization, and embedding financial text from news, social media, and filings. For model adaptation, FinGPT employs Low-Rank Adaptation (LoRA) to fine-tune base models like Llama-3.1-8B with minimal trainable parameters, significantly reducing costs. It further introduces Reinforcement Learning on Stock Prices (RLSP), using short-term stock price movements as objective feedback signals to align model outputs with actual market reactions, replacing traditional human feedback with market-driven rewards. Experiments on financial sentiment analysis demonstrate that FinGPT outperforms baselines such as FinBERT, ChatGPT, and zero-shot Llama-3. The model achieves an accuracy of 82.1% and a Macro-F1 of 80.9%, significantly higher than FinBERT's 71.2% accuracy. Ablation studies confirm that LoRA provides substantial gains over base models, while RLSP further enhances market alignment. The paper showcases applications including robo-advising, quantitative trading signals, and risk management, while noting limitations in real-time deployment latency and the need for continuous data pipeline maintenance to handle market dynamism.

Research problem

The paper addresses the lack of accessible, transparent, and cost-effective financial large language models (FinLLMs). It highlights the challenges of high temporal sensitivity, market dynamism, and low signal-to-noise ratios in financial data, which make proprietary models like BloombergGPT inaccessible to most researchers and practitioners. The goal is to democratize FinLLMs through an open-source, data-centric framework.

Core contributions

  • Introduction of FinGPT, an end-to-end open-source framework for building and customizing FinLLMs.
  • Development of a real-time data curation pipeline that handles diverse financial data sources (news, social media, filings) with noise reduction and entity-aware embedding.
  • Implementation of lightweight fine-tuning using Low-Rank Adaptation (LoRA) to drastically reduce computational costs compared to full pre-training.
  • Proposal of Reinforcement Learning on Stock Prices (RLSP) as a novel alignment technique using market price movements as objective feedback signals.
  • Creation of a comprehensive benchmarking suite of fundamental financial NLP tasks, including sentiment analysis, NER, and numerical reasoning.

Method

  • Data Source Layer: Aggregates data from news APIs, social media, SEC filings, and trend platforms.
  • Data Engineering: Real-time cleaning, tokenization, and entity-aware vector embedding into a vector database.
  • LLM Layer: Utilizes base models (e.g., Llama-3.1-8B) with LoRA/QLoRA for parameter-efficient fine-tuning.
  • RLSP Alignment: Uses stock price changes as reward signals in a reinforcement learning loop to align sentiment predictions with market impact.
  • RAG Integration: Incorporates Retrieval-Augmented Generation for context-aware responses.
  • Task Layer: Executes sentiment analysis, NER, summarization, and numerical reasoning.

Results & findings

  • FinGPT (SFT+RLSP) achieves 82.1% accuracy and 80.9% Macro-F1, outperforming FinBERT (71.2% Acc, 69.9% Macro-F1).
  • LoRA fine-tuning reduces trainable parameters from 6.17 billion to ~8.3 million, cutting adaptation costs by approximately 1000x compared to full fine-tuning.
  • RLSP alignment improves Macro-F1 from 77.3% (LoRA only) to 80.9%, demonstrating the value of market-driven feedback.
  • Case study shows FinGPT correctly identifies negative sentiment in 'Tesla cuts prices' news, whereas base Llama-3 predicts neutral.
  • The self-labeled dataset aligns sentiment with true market reactions, avoiding costly manual annotation.
  • FinGPT supports multiple base models including Llama, ChatGPT, and Claude via APIs.

Data & experiments

  • Dataset: Over 620,000 cleaned financial news headlines from sources like CNBC, Reuters, and Yahoo Finance (2016-2024).
  • Labeling: Market-driven self-labeling using short-term stock price changes to determine positive, negative, or neutral sentiment.
  • Baselines: Comparison against FinBERT, BloombergGPT, ChatGPT (zero-shot), and Llama-3.1-8B (zero-shot).
  • Metrics: Accuracy, Precision, Recall, F1-score, Macro-F1, and AUC for binary subsets.
  • Ablation Study: Isolating the impact of LoRA fine-tuning and RLSP alignment on model performance.

Limitations & caveats

  • Reliance on market price movements for labeling may introduce noise if prices are driven by non-news factors.
  • Real-time pipeline requires significant infrastructure for low-latency data ingestion and processing.
  • Performance is evaluated primarily on sentiment analysis; other tasks like numerical reasoning are less detailed.
  • Open-source models may lack the proprietary data depth of BloombergGPT.
  • Disclaimer notes that the code is for academic purposes and not financial advice.

Curator notes

Emphasizes data-centric pipelines and Low-Rank Adaptation fine-tuning.