Language Model Trading Strategy

Artificial intelligence continues to disrupt traditional investing, and one of the more intriguing applications is using large language models (LLMs) to analyze market sentiment. A recent study titled “Does Sentiment Help in Asset Pricing?” explores exactly that. Can we make a language model trading strategy?

Here’s a breakdown of what the researchers discovered and how it leads to a surprisingly effective trading strategy.

Related reading: –Best trading indicators

The Research Question:

Can Machine-Analyzed Sentiment Predict Stock Returns?

The study investigates whether sentiment extracted by large language models from textual data can aid in forecasting short-term stock performance.

The dataset comprises U.S. stocks from the CRSP universe between 2012 and 2019, with a specific focus on ordinary shares.

To capture market sentiment across different types of investors, the researchers pulled data from three key sources:

  1. Earnings call transcripts (from Seeking Alpha)
  2. News headlines and subheadlines (via Bloomberg and newsfilter.io)
  3. Social media posts (real-time chatter from StockTwits)

How Sentiment Was Used

The researchers used language models to classify sentiment from each of these sources into three buckets:

  • Low Sentiment
  • Middle Sentiment
  • High Sentiment

Stocks were then grouped accordingly into low and high sentiment portfolios. From there, the next-day excess returns were analyzed to see if sentiment provided any predictive edge.

The Surprising Findings

  • Low sentiment stocks showed a significant negative return the next day.
  • High sentiment stocks also had slightly negative returns—about -0.04%.
  • However, the losses in low sentiment stocks were worse, creating a spread between the two groups.

The trading implication?

Go long high-sentiment stocks and short low-sentiment stocks, a classic long/short strategy based on language model sentiment.

Performance of the Strategy

Using an equal-weighted portfolio, the strategy produced:

  • 35.56% average annualized return
  • Sharpe ratio of 2.21

Even when accounting for transaction costs, the performance remained strong.

Language model trading strategy
Language model trading strategy

However, when the strategy was tested using value-weighted portfolios (i.e., giving more weight to larger companies), the return advantage disappeared. This suggests the sentiment effect is concentrated in small-cap stocks.

Key Takeaways

  • Large language models can extract sentiment that is statistically and economically significant for short-term trading.
  • The edge is not universal; it seems limited to smaller stocks where inefficiencies are more likely.
  • A simple long/short portfolio based on sentiment classification can be highly profitable under the right conditions.

Want more trading strategies powered by AI and data? Subscribe to our newsletter, follow us on YouTube, and stay tuned for more insights.

Similar Posts