Skip to main content
QUICK REVIEW

[Paper Review] BERT vs GPT for financial engineering

Edward Sharkey, Philip Treleaven|arXiv (Cornell University)|Apr 24, 2024
Reservoir Engineering and Simulation MethodsEngineering3 citations
TL;DR

This paper benchmarks BERT and GPT models for financial engineering, specifically sentiment analysis from news events to inform commodity trading. Fine-tuned BERT models, particularly CopBERT, outperform GPT-based models in F1-score by 10% (vs. GPT-4) and 16% (vs. CopGPT), demonstrating BERT's superior interpretability and performance for sentiment-driven trading signals despite lower raw predictive power than larger LLMs.

ABSTRACT

The paper benchmarks several Transformer models [4], to show how these models can judge sentiment from a news event. This signal can then be used for downstream modelling and signal identification for commodity trading. We find that fine-tuned BERT models outperform fine-tuned or vanilla GPT models on this task. Transformer models have revolutionized the field of natural language processing (NLP) in recent years, achieving state-of-the-art results on various tasks such as machine translation, text summarization, question answering, and natural language generation. Among the most prominent transformer models are Bidirectional Encoder Representations from Transformers (BERT) and Generative Pre-trained Transformer (GPT), which differ in their architectures and objectives. A CopBERT model training data and process overview is provided. The CopBERT model outperforms similar domain specific BERT trained models such as FinBERT. The below confusion matrices show the performance on CopBERT & CopGPT respectively. We see a ~10 percent increase in f1_score when compare CopBERT vs GPT4 and 16 percent increase vs CopGPT. Whilst GPT4 is dominant It highlights the importance of considering alternatives to GPT models for financial engineering tasks, given risks of hallucinations, and challenges with interpretability. We unsurprisingly see the larger LLMs outperform the BERT models, with predictive power. In summary BERT is partially the new XGboost, what it lacks in predictive power it provides with higher levels of interpretability. Concluding that BERT models might not be the next XGboost [2], but represent an interesting alternative for financial engineering tasks, that require a blend of interpretability and accuracy.

Motivation & Objective

  • To evaluate the performance of BERT and GPT models in extracting sentiment from financial news for trading signal generation.
  • To assess whether BERT models offer a better balance of interpretability and accuracy than GPT models in financial engineering tasks.
  • To compare domain-specific BERT (CopBERT) and GPT (CopGPT) models against general and large LLMs like GPT-4.
  • To investigate the trade-offs between predictive power and interpretability in NLP models for financial applications.

Proposed method

  • Fine-tuned BERT and GPT models on a financial news dataset to classify sentiment from news events.
  • Trained a domain-specific BERT model, CopBERT, using financial text data and a masked language modeling objective.
  • Trained a corresponding GPT-based model, CopGPT, using autoregressive language modeling for text generation.
  • Evaluated model performance using F1-score and confusion matrices on a held-out test set.
  • Compared results across CopBERT, CopGPT, GPT-4, and other baseline models to assess relative performance.
  • Emphasized interpretability and risk mitigation, particularly regarding hallucinations in GPT models.

Experimental results

Research questions

  • RQ1Does fine-tuned BERT outperform fine-tuned or vanilla GPT models in sentiment classification from financial news?
  • RQ2How does CopBERT compare to other domain-specific and general-purpose models like FinBERT and GPT-4 in sentiment prediction tasks?
  • RQ3To what extent do larger LLMs like GPT-4 dominate in predictive power, and does this outweigh the interpretability benefits of BERT?
  • RQ4Can BERT models serve as a viable alternative to XGBoost in financial engineering, balancing accuracy and interpretability?
  • RQ5What are the trade-offs between hallucination risks in GPT models and the performance gains of larger LLMs in financial NLP tasks?

Key findings

  • Fine-tuned BERT models, particularly CopBERT, outperform fine-tuned and vanilla GPT models in sentiment classification from financial news.
  • CopBERT achieved a 10 percentage point higher F1-score compared to GPT-4 and a 16 percentage point increase over CopGPT.
  • Despite lower raw predictive power, BERT models provide significantly higher interpretability, making them preferable for risk-sensitive financial applications.
  • The study highlights that larger LLMs like GPT-4 outperform BERT models in predictive capability but suffer from hallucination and reduced interpretability.
  • CopBERT outperforms other domain-specific BERT models such as FinBERT, indicating the effectiveness of its training data and process.
  • The results suggest BERT models are not the new XGBoost, but represent a compelling alternative in financial engineering where interpretability and accuracy must be balanced.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.