Enhancing Trading Performance Through Sentiment Analysis with Large Language Models: Evidence from the S&P 500

—

Enhancing Trading Performance Through Sentiment Analysis with Large Language Models: Evidence from the S&P 500

Haojie Liu
Zihan Lin
Randall R. Rojas
Published on 7/13/2025
Equities
United States (US)
Stocks
AI
LLM
Sentiment
Sentiment trading
Machine learning
Momentum
Trend-following

This study investigates the integration of real-time sentiment analysis from financial news using large language models (GPT-2 and FinBERT) with traditional technical indicators (MACD, SAR, VW MACD, Dual MACD) and time-series forecasting models (ARIMA, Prophet, ETS) to enhance S&P 500 trading strategies. The authors collect daily financial news from major outlets and S&P 500 price data from 2019 to 2024, aligning news sentiment with next-day returns using a one-day lag to respect market close. Sentiment scores are derived from fine-tuned GPT-2 and FinBERT, while technical indicators capture momentum and trend patterns. Time-series models forecast price movements based on historical data. A comprehensive set of trading strategies is evaluated, including a benchmark buy-and-hold, sentiment-only, technical-only, and hybrid approaches that combine all components. Results demonstrate that hybrid strategies significantly outperform benchmarks, achieving higher cumulative returns and better adaptability to volatile market conditions. The study highlights the complementary nature of sentiment and technical analysis, with FinBERT providing more precise financial sentiment due to its domain-specific pre-training. The findings suggest that integrating diverse data sources and models can lead to more robust and profitable trading systems, offering practical insights for quantitative traders and financial analysts.

Highlights

  • 1Integrates real-time sentiment analysis from GPT-2 and FinBERT with technical indicators and time-series models to optimize S&P 500 trading strategies.
  • 2Demonstrates that combining sentiment-driven insights with traditional models improves trading performance and adapts to volatile market conditions.
  • 3Uses a lag structure aligning news sentiment with next-day returns, achieving best out-of-sample accuracy with a one-day lag.
  • 4Evaluates multiple trading strategies including buy-and-hold, sentiment-based, and hybrid approaches, showing superior returns for combined models.

Methods

  • M
    Sentiment analysis using fine-tuned GPT-2 and FinBERT on financial news articles from WSJ, Barron, Benzinga, MarketWatch, and Dow Jones.
  • M
    Technical indicators: MACD, SAR, Volume-Weighted MACD, and Dual MACD for trend and momentum detection.
  • M
    Time-series forecasting models: ARIMA, Prophet, and ETS for predicting stock price movements.
  • M
    Hybrid strategy combining sentiment scores with technical indicators and time-series forecasts to generate trading signals.

Results

  • R
    Combining sentiment analysis with technical indicators and time-series models yields higher cumulative returns than benchmark buy-and-hold strategies.
  • R
    GPT-2 and FinBERT sentiment scores provide complementary signals, with FinBERT showing higher precision due to financial domain pre-training.
  • R
    The one-day lag specification (news today → return tomorrow) delivers the best out-of-sample accuracy.
  • R
    Hybrid strategies outperform pure sentiment-based or pure technical strategies in volatile market periods.
  • R
    Integration of sentiment with MACD and ARIMA improves prediction accuracy and trading performance.
0/5

Analyze Paper

Generate insights from "Enhancing Trading Performance Through Sentiment Analysis wit...".

Suggested Actions