Dynamic Representation and Evolutionary Characteristics of Social Media Sentiment in Stock Markets Based on Large Language Models A Case Study of Twitter Financial Corpus

Authors

  • Chuqing Wang Diablo Valley College, Pleasant Hill, United States Author
  • Yanbo Hu Innovation Investment Bank Headquarters, Xiangcai Securities Co., Ltd., Changsha, China Author

Keywords:

large language models, stock market, social media, sentiment analysis, time series

Abstract

The rapid development of social media has generated massive amounts of timely and sentiment-rich textual data, which provides a new perspective for studying investor psychology and market behaviors in the stock market. Existing studies mostly rely on lexicon-based methods or shallow machine learning models, which are insufficient to capture complex semantics in financial contexts. Meanwhile, static sentiment analysis dominates current research, while the dynamic evolution of investor sentiment over time is largely overlooked. To address these limitations, this study adopts large language models (LLMs) to conduct fine-grained sentiment representation modeling on Twitter financial corpus. Using the publicly available Twitter Financial News Sentiment Dataset containing 500,000 annotated tweets related to the stock market, we design dedicated prompt templates to extract discrete sentiment labels and continuous sentiment scores ranging from -1 to 1. We further construct a multi-dimensional sentiment indicator system including mean sentiment index, sentiment volatility, and sentiment distribution entropy. Time-series analysis methods such as sliding window analysis, trend detection, and anomaly detection are employed to explore the evolutionary patterns of investor sentiment. Empirical results show that social media sentiment exhibits significant periodic fluctuations, distinct sentiment peaks around major market events, and heterogeneous evolutionary characteristics across different stocks. Compared with traditional approaches, the LLM-based method demonstrates stronger contextual understanding and higher accuracy in financial domain adaptation. This study enriches the methodology of financial text sentiment analysis and provides empirical evidence for behavioral finance research on investor sentiment dynamics.

Downloads

Published

2026-06-12