A Study on Stock Price Forecasting Based on LSTM and Cross-Modal Adaptation

Authors

  • Ronghua Zhang Macau University of Science and Technology, Macao, Macao SAR, China

Keywords:

Stock Price Forecasting, LSTM, Sentiment Analysis, Multimodal Fusion, Gating Mechanism

Abstract

Stock price forecasting is an important topic in financial engineering and intelligent computing. Traditional price-only models often fail to reflect market sentiment, public opinion shocks, and changes in investor expectations. To address this problem, this study uses three A-share stocks as cases: Ping An Bank (000001), BYD (002594), and Kweichow Moutai (600519). It builds a daily-level alignment framework for stock price data and stock forum comments. On the text side, the comments are cleaned, scored for sentiment, and aggregated by trading day. An influence-weighted sentiment representation is also constructed. At the model level, Logistic Regression, Price-only LSTM, Price + Sentiment LSTM, and Gating-LSTM are compared. The results show that sentiment features are difficult to use when price data and comments are not aligned by time. After the dataset was expanded to three stocks, the linear model and the standard LSTM still showed limited improvement from direct sentiment concatenation. The All-Stocks Gating-LSTM achieved a test accuracy of 0.7647. Its F1 score was 0.3333, and its mean gate value was 0.5958. These results suggest that the gating module participates in the prediction process. They also show that the gating mechanism changes the classification tendency of the model. Overall, the study supports the value of temporal alignment and provides a basis for further testing of text sentiment features and cross-modal gating in stock prediction.

Downloads

Published

2026-09-30

How to Cite

Zhang, R. (2026). A Study on Stock Price Forecasting Based on LSTM and Cross-Modal Adaptation. CPS Digital Library - Series of Conferences, (1), 59–63. Retrieved from https://seriesofconference.com/index.php/SCJ/article/view/486