Thanaphat Sriboonma and Sumalee Sangamuang
Published in Data Science and Engineering (DSE) Record 2025 Vol. 6 No. 1 pp. 531-565
Abstract
Herding behavior, where investors mimic the trading actions of others, is a critical phenomenon in financial markets, often exacerbating volatility and leading to mispricing and systemic risk. Traditional econometric models like the Cross-Sectional Absolute Deviation (CSAD) have been widely used to detect such behavior, yet they fall short in capturing the nonlinear, dynamic nature of market sentiment. This study integrates behavioral finance with deep learning to enhance the prediction of herding behavior by estimating the CSAD-based herding coefficient (γ₂) using advanced time-series models. Daily stock data from the S&P 500,spanning January 2000 to December 2024, is analyzed using four deep learning architectures: Recurrent Neural Network (RNN), Gated Recurrent Unit (GRU), Long Short-Term Memory (LSTM), and Time-Series BERT (TST-BERT). The models are evaluated using Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the Coefficient of Determination (R²). Among them, the GRU model outperformed the others, achieving the lowest prediction error and highest R² value of 0.8785, indicating its superior capability in modeling temporal dependencies in financial data. The results affirm that deep learning, particularly GRU, provides a more accurate and robust framework for detecting herding behavior, offering valuable insights for investors, regulators, and policymakers aiming to enhance market stability and risk assessment.