Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

SSE forecasts based on market–sentiment dual anchoring

  • Lei Yang,

    Roles Formal analysis, Methodology, Visualization, Writing – original draft

    Affiliation Department of Business Administration, Shandong Labor Vocational and Technical College, Jinan, China

  • Bo Gan,

    Roles Formal analysis, Validation, Writing – review & editing

    Affiliation Department of Business Administration, Shandong Labor Vocational and Technical College, Jinan, China

  • Xueyan Niu ,

    Roles Project administration, Supervision, Visualization

    253875986@qq.com (XN); liuqing@jdzu.edu.cn (QL)

    Affiliation Department of Business Administration, Shandong Labor Vocational and Technical College, Jinan, China

  • Qing Liu

    Roles Conceptualization, Data curation, Methodology, Supervision

    253875986@qq.com (XN); liuqing@jdzu.edu.cn (QL)

    Affiliations School of Economics and Management, Jingdezhen University, Jingdezhen City, Jiangxi Province, China, College of Economics and Management, Huainan Normal University, Huainan, China, Graduate School of Management of Technology, Pukyong National University, Busan, South Korea

Abstract

Anchoring is widely considered one of the most robust and consistently observed effects in experimental psychology. This study employs the highest and lowest indices of the Shanghai Stock Exchange (SSE) alongside the highest and lowest bullish sentiments over a 52-week period as anchors, in conjunction with Fibonacci retracement levels, to develop a dual market–sentiment anchoring multivariate feature matrix. Based on this feature matrix, we propose a forecasting model called Market Sentiment Dual Anchoring CNN2D-ABiLSTM (MSD-CNN2D-ABiLSTM). This model employs CNN2D to extract spatial features from market and sentiment data, utilizes BiLSTM networks to process and integrate temporal features, and incorporates an attention mechanism to emphasize essential spatial and temporal information. Experimental results indicate that this model achieves a prediction accuracy exceeding 90% and an R2 value greater than 95% for lags of 1–2 trading days, enabling precise forecasting of the SSE index. Additionally, the model demonstrates effective forecasting performance for up to 10 trading days ahead, significantly outperforming traditional baseline models. Furthermore, structural sensitivity tests reveal that the extraction of local spatial features by CNN2D provides a predictive advantage over the short-term temporal features captured by CNN1D in complex market structures.

1. Introduction

Forecasting future stock market movements has historically been regarded as a significant and formidable task [15]. Forecasting the movements of the Shanghai Stock Exchange (SSE) Composite Index is notably challenging owing to its lax regulatory standards, significant volatility, and recurrent instances of manipulative trading [6].

The Shanghai Stock Market, founded on November 26, 1990, was China’s first and most prominent stock market, in which many of the nation’s cornerstone enterprises, major industries, and high-tech corporations are listed after rigorous evaluation. The SSE Composite Index can be viewed as a barometer of the Chinese stock market [6]. The ability to accurately and effectively predict the swings of the SSE Composite Index is valuable to financial investors, researchers, and China’s financial regulators [4].

Econometricians have utilized diverse methodologies to forecast stock market trends, including time-series analysis, conventional machine learning models, and deep learning models [7]. The initial features employed for stock price forecasting were restricted to fundamental stock data and a select number of price indicators [8,9]. Advancements in Internet technology have rendered text-mining approaches more complex, integrating textual data, such as investor sentiment and news, into datasets. Researchers have progressively included non-financial data, such as environmental and climate information, in stock price forecasts [4]. Advanced model architectures and comprehensive datasets have emerged as essential tools for researchers aiming to achieve precise stock price forecasts. Nevertheless, “anchoring” elements, which are essential for predicting market patterns, are frequently overlooked by stock market predictors.

Anchoring is considered one of the most robust and well-documented cognitive effects in experimental psychology [10]. In the financial domain, anchoring often manifests when investors overly rely on previous prices, historical data, or psychological expectations when making decisions regarding stock prices or market trends. Even when new information becomes available, individuals tend to unconsciously use this initial information as a reference point, adjusting their judgments around this “anchor.” Although anchoring may merely constitute a cognitive bias, it does provide valuable information for forecasting [11].

Financial literature has documented extensive evidence of implicit trading signals associated with anchoring. For instance, one study utilized investors’ tendency to anchor to the 52-week high to explain price momentum [12], whereas another demonstrated that investors, managers, and boards often use past peak prices as reference points when determining the value of target companies [13]. It has also been suggested that investors’ limited attention is one reason why they rely on simple anchoring information when making investment decisions [14]. In conclusion, existing research has documented that anchoring prices carry significant investment signals that can, to some extent, explain market trends. However, stock price forecasting has rarely incorporated anchoring, primarily applying it to investment decision-making.

Moreover, anchoring is often tied to a specific price point and is rarely associated with investor sentiment. However, in the Chinese stock market, retail investors account for 80–90% of the trading volume, with a significant proportion being inexperienced newcomers to stock investment [6]. Consequently, the Chinese stock market is characterized by greater uncertainty and volatility, implying that investor sentiment plays a significant role in predicting the trends of the SSE Composite Index.

To address these issues, we propose an MSD-CNN2D-ABiLSTM model structure for predicting the SSE Composite Index: (1) We create more detailed technical features based on fundamental price indicators, using Fibonacci retracement levels as market price anchors to better capture price movements and patterns. (2) We create an effective sentiment index using 4.4095 million investor texts and then design sentiment-anchoring technical features to investigate the impact of market sentiment on stock price movements. (3) We use a cutting-edge CNN2D-ABiLSTM network design, in which the CNN2D component detects local spatial aspects in market and sentiment data while a bidirectional long short-term memory (BiLSTM) network processes temporal features. This combination enables the model to comprehensively recognize complex market patterns.

This study offers three main contributions:

  1. (1). We develop a more comprehensive feature matrix with dual anchoring in market and sentiment data. This matrix fully covers market price changes and mood influences, as well as market heterogeneity levels.
  2. (2). We create a neural network model using the CNN2D-ABiLSTM architecture, which combines the ability of CNN2D to extract spatial features with the ability of BiLSTM to process temporal features. By incorporating an attention mechanism, the model enhances its focus on critical information, achieving accurate predictions for the next 10 trading days of the SSE Composite Index.
  3. (3). Through structural sensitivity experiments, feature ablation studies, and sliding window sensitivity tests, we provide valuable guidance on network architecture, feature selection, and window choice, offering key references for future studies.

In conclusion, this study introduces a dual anchoring framework that integrates market and sentiment dimensions into SSE forecasting. By combining market- and sentiment-based anchoring within a unified methodological structure, the proposed approach attempts to capture both rational and emotional dynamics of market behavior. This framework seeks to improve the interpretability and robustness of forecasting models and provide potential insights into sentiment-driven market mechanisms.

The remainder of this paper is structured as follows: Section 2 examines the pertinent literature associated with this study. Section 3 delineates the dataset employed and elucidates the methodology used to create the sentiment index. Section 4 presents the features and model, providing an overview of the feature set and model architecture employed in this research. Section 5 presents the main experimental results. Section 6 explores the implications and significance of the findings. Finally, the conclusion summarizes the study.

2. Literature review

2.1. Methodology for forecasting stock prices

Research on stock price prediction is categorized into two primary approaches: fundamental and technical analyses [7,15]. Fundamental analysis attempts to forecast stock price movements by studying a company’s financial health, macroeconomic data, and industry development trends [16]. This technique focuses on determining a company’s intrinsic value, assuming that the market price of a stock will eventually reflect its genuine value [17]. Analysts must possess a deep understanding of financial statements, industry dynamics, and macroeconomic trends, as well as the ability to evaluate market trends and a company’s long-term growth prospects [18]. Fundamental analysis, in general, focuses on long-term patterns and is appropriate for medium- to long-term investors [7].

Technical analysis relies on historical price data to identify price trends and predict future market dynamics using graphical tools, mathematical methods, and econometric models [19]. This approach is predicated on three core assumptions: first, that market prices already reflect all available information, thus eliminating the need for additional fundamental analysis; second, that costs follow certain trends, implying that price movements in a given period will exhibit some directional bias; and third, that history tends to repeat itself, suggesting that past price behavior patterns may recur in the future [20]. The advantage of technical analysis lies in its ability to quickly identify short-term market opportunities, making it widely used in short-term trading and speculative activities. Technical analysis strategies are extensively applied in the field of stock price prediction, serving as a primary tool for many investors and researchers [7].

Researchers use various technical models for stock price prediction, which can be broadly categorized into time-series analysis, traditional machine learning models, and deep learning models [7]. Time-series analysis encompasses models such as autoregressive, moving average, autoregressive moving average, and autoregressive integrated moving average (ARIMA) models [21]. However, these models have limitations owing to their reliance on the assumptions of linearity and stationarity, which may not effectively capture the complex nonlinear relationships, volatility clustering, and non-stationary dynamics inherent in financial markets [22]. Similarly, traditional machine learning models, including regression analysis [23], support vector machines [24], random forests [25], and naive bayes [26], encounter challenges in dealing with the nonlinear and highly dynamic nature of financial markets. These models often struggle to adapt to rapidly changing market conditions and exhibit significant data dependency, limiting their applicability and predictive effectiveness.

To overcome the constraints of conventional models, numerous innovative machine learning methodologies, particularly neural network models, have been developed for forecasting financial time series. Neural networks possess robust nonlinear fitting capabilities, enabling them to identify concealed patterns in financial markets [27]. Deep learning methods are particularly adept at managing the non-stationarity and dynamic attributes of financial time series, yielding more precise and dependable models for stock price prediction [28]. The advent of recurrent neural networks (RNNs) and long short-term memory (LSTM) networks has markedly improved the comprehension and forecasting ability regarding intricate financial markets.

In recent years, BiLSTM, a novel variant of LSTM, has been extensively applied to both classification and regression tasks [1,29]. BiLSTM combines both forward and backward LSTM, enabling the model to not only leverage the ability of LSTM to capture long-term dependencies but also gather more comprehensive information by encoding the data in both directions [30]. Given that stock markets are inherently dynamic, nonlinear, volatile, noisy, and chaotic systems [31], the BiLSTM model is more adept than traditional LSTM models at handling nonlinear data, such as stock market trends. When BiLSTM integrates with attention mechanisms, it demonstrates a powerful ability to capture the nonlinear and complex characteristics of stock markets [29].

In addition, studies have shown that combining a CNN with BiLSTM not only facilitates the identification of spatial features in the market but also enhances the ability to discern both short- and long-term dependencies in time series using the BiLSTM model [1]. This integration enables the model to more comprehensively identify complex patterns in the market, significantly improving the accuracy and robustness of stock price predictions [8]. CNNs are particularly effective at capturing spatial features in the market and excel in handling high-dimensional data with complex interactions, such as price and market sentiment [1,32]. Therefore, this study combined a CNN, BiLSTM, and attention mechanisms to forecast the SSE Composite Index.

2.2. Market anchoring

It has been highlighted that investors’ limited attention partially accounts for their reliance on simple anchoring information when making investment decisions [14]. Numerous studies have confirmed the effectiveness of anchoring points as a tool for price prediction. Investors typically rely on past price anchors for investment decisions, a strategy that proves particularly effective during periods of market volatility [33].

Most stock price prediction research has focused on the impact of macroeconomic variables, technical indicators, or market sentiment on market trends. Despite the widespread use of anchoring prices in financial practice, their application in technical stock price forecasting has not received significant attention in academic research [33,34]. This is partly due to the simplicity of anchoring price features, which often consist of a single data point, such as the highest, lowest, or median price over a period, making it difficult to provide rich and robust data features [35].

Additionally, existing research shows that in addition to inherent market characteristics, market heterogeneity influences the relationship between technical features and stock price forecasting ability. These heterogeneous features include factors such as firm size [36], market volatility cycles [37], the proportion of retail investors [38], and price and return levels [39]. Therefore, this study seeks to link price anchoring with market heterogeneity by assessing the position of the current market price within Fibonacci levels over a given period while simultaneously evaluating market heterogeneity and price anchoring.

2.3. Sentiment anchoring

Historical research has demonstrated that investor sentiment plays a crucial role in stock price prediction, as emotions often influence investor decision-making, which, in turn, significantly impacts stock prices [37,4042]. When sentiment is high, investors are more likely to buy stocks, driving prices upward; conversely, when sentiment is low, traders tend to sell, causing costs to decline [43]. Consequently, sentiment indicators are considered effective in enhancing the accuracy of stock price predictions. For example, it was found that investor sentiment is a key driver of short-term stock price fluctuations [44]. By analyzing sentiment indicators, researchers can better capture market volatility and improve the precision of future stock price forecasts [45].

Moreover, compared with institutional investors, retail investors are generally more susceptible to emotional fluctuations owing to their lack of systematic investment strategies [36]. Retail investors dominate the Chinese stock market, which is one of its unique characteristics. According to [46], an estimated 80–90% of market participants in the Chinese stock market are retail investors. This leads to greater market volatility, which is heavily driven by sentiment [44]. Therefore, incorporating sentiment indicators in predicting the SSE Composite Index is crucial [47].

Furthermore, previous studies have shown that market heterogeneity shapes the relationship between sentiment and stock price predictability, rather than being solely determined by sentiment. Previous evidence indicates that sentiment-driven predictability is most evident under extreme emotional conditions, implying that investor sentiment interacts dynamically with market structure and volatility [39]. However, existing studies tend to analyze market anchoring and sentiment effects separately, lacking an integrated framework that captures their joint influence on stock price dynamics. Therefore, anchoring the current emotional state of the market has been recognized as critical for understanding stock index movements [48].

Considering the above research gap, this study introduces the concept of dual anchoring, extending the anchoring mechanism from market prices to sentiment features and unifying the two within a single methodological structure. By developing a composite feature matrix for the SSE Composite Index that integrates both market and sentiment indicators, this framework captures the combined effects of rational market signals and emotional fluctuations. The proposed model, based on a CNN, BiLSTM, and attention mechanisms, leverages this market–sentiment dual anchoring to improve interpretability and predictive robustness in SSE forecasting.

3. Data

The primary data included in this study were categorized into two segments:

  1. (1). Historical data of the SSE, which encompassed fundamental price indicators, such as daily opening prices, closing prices, and returns. These data were utilized to create the market feature matrix to forecast the SSE Composite Index.
  2. (2). Investor commentary, which encompassed written financial remarks and their dissemination attributes, such as text, reading, and comment volumes. These data were utilized to construct the sentiment feature matrix for forecasting the SSE Composite Index.

3.1. Market data

We gathered market data for the SSE Composite Index for 1,214 trading days from January 2019 to December 2023. The dataset comprised daily statistics, such as opening prices, closing prices, highest prices, lowest prices, and returns. All historical market data were obtained from the official financial interface of Sina Finance (https://quotes.sina.cn/hs/company/quotes/view/sh000001), which provides publicly accessible and verifiable data for the SSE Composite Index. The data were downloaded and processed using Python for cleaning and standardization. Stock returns were calculated based on daily closing prices. Following [49], the daily return was defined as

where and represent the closing prices of the SSE Composite Index on days and , respectively. We utilized these data to establish the essential price and technical attributes for forecasting the SSE Composite Index. Table 1 presents the pertinent statistical descriptions.

3.2. Text data

In the “SSE Bar” (https://guba.eastmoney.com/) of the “Stock Bar,” numerous investors and organizations exchange their perspectives and analyses of the SSE on a daily basis. Each message typically includes the title, author, posting time, readership count, comment count, and textual content. Using Python-based web crawler scripts developed with the BeautifulSoup and urllib libraries, we collected publicly available investor posts from the “SSE Bar” on Eastmoney’s Stock Bar platform (https://guba.eastmoney.com/list,sh000001.html). The collection covered a five-year period (January 2019–December 2023). To comply with ethical standards and privacy protection, we retrieved only non-personally identifiable information, including timestamp, post content, reading count, and comment count. User names, IP addresses, and other personal metadata were strictly excluded.

The dataset comprised 4,409,500 distinct posts, which generated approximately 2,481 million views and 1,033,800 comments. On average, each post was viewed approximately 563 times, indicating a strong level of information diffusion and attention intensity within the SSE investor community. The reading and commenting volumes not only capture the extent of sentiment exposure and dissemination but also reflect interactive feedback among investors.

Data cleaning and preprocessing were conducted in Python, involving text normalization, timestamp alignment, and removal of duplicate or invalid entries to ensure data integrity and analytical consistency.

According to the framework proposed by [50], investor activity on social media can be viewed as a multilayered sentiment communication system: posting volume represents attention generation, reading volume reflects sentiment diffusion and exposure, and commenting volume indicates sentiment reinforcement through feedback. Together, these behavioral variables depict the dissemination and resonance of investor sentiment within the SSE online community, providing a dynamic behavioral foundation for sentiment-based market forecasting. Table 2 presents the statistical analysis of the text data.

3.3. Bullish and agreement indices

After the investor commentary texts are acquired, they are used to construct an investor sentiment index, which generally involves two key steps: text sentiment classification and sentiment aggregation [51,52]. The first step involves assigning a sentiment orientation to each financial text, categorizing them as “positive,” “neutral,” or “negative.” The second step calculates the overall sentiment tendency of investors over a specific period by statistically counting the number of texts in each sentiment category. In this study, all 4,409,500 sentiment-classified text records—including original posts, readings, and comments from the SSE Bar—were incorporated into the computation of the investor sentiment (IS) and agreement (AG) indices.

Step 1. Text sentiment classification

Given the vast volume of investor social media posts (4,409,500), manual classification was impractical. Therefore, we adopted a supervised learning approach to assign sentiment labels—positive, neutral, or negative—to each post. The labeled dataset was manually constructed by the research team. Three team members independently annotated a randomly sampled subset of investor posts, and only the labels on which all three annotators agreed were considered valid. This procedure ensured labeling consistency and minimized subjective bias. In total, 60,000 posts were manually labeled, of which 50,000 were used for model training and 10,000 were reserved for independent accuracy validation. Labeled training data were used to teach the model how to detect relationships between textual content and sentiment categories [53].

Although the proportion of labeled data (approximately 1.36% of the total corpus) may appear relatively small, high-quality manual annotation in large-scale financial text corpora is inherently labor-intensive. Nonetheless, this labeling scale is consistent with benchmark studies in financial sentiment research, such as those conducted by [54,55], wherein a small yet carefully annotated dataset effectively supported robust model training and generalization. Hence, the sample size used in this study was considered sufficient and academically comparable for reliable sentiment modeling.

We developed a deep learning model that combines LSTM networks with self-attention mechanisms, both of which are widely used in sentiment classification tasks [29,56]. The model achieved an overall classification accuracy of 90.97% on the independent validation set, outperforming those of [57] at 89.14% and [54] at 88.1%. This result suggests the absence of systematic classification bias. The performance metrics are presented in Appendix A.

To enhance model reliability and address the potential for manipulation or misinformation in social media content, we implemented a structured text preprocessing pipeline prior to classification. Following [58,59], we removed extraneous characters, standardized usernames and URLs, and filtered out noisy expressions to improve semantic clarity. Rather than excluding potentially ambiguous or misleading texts, we allowed the model to classify them—typically into the neutral category—as suggested by [54]. This preserved the integrity of the dataset while enabling the model to handle information heterogeneity.

Fig 1 illustrates the complete process and architecture of the proposed text sentiment classification framework.

thumbnail
Fig 1. Flowchart of text sentiment classification.

Note: outlines the pipeline from raw text preprocessing to supervised classification. To address concerns regarding manipulation and semantic ambiguity in user-generated content, we adopted a robust preprocessing strategy and used a neutral category to accommodate texts with unclear or noisy expressions. This enhances both classification robustness and data quality transparency.

https://doi.org/10.1371/journal.pone.0339065.g001

Step 2. Sentiment aggregation

Following the advice of [52], we employed the approach suggested by [54] to develop the IS and AG indices. We specifically denoted the quantity of texts conveying positive sentiment during period t as and the quantity of texts conveying negative sentiment during period t as . This enabled us to construct the IS index as follows:

.

This index, also referred to as the “bullish” index, reflects investor confidence during a specific period.

Investor opinions in the st68ock market often exhibit significant divergence. To quantify this divergence, [54] introduced the AG index, defined as

.

When all financial texts express bullish or bearish sentiment, AG equals 1, indicating complete agreement among investors. Conversely, when 50% of investors are bullish and 50% are bearish, investor disagreement reaches its maximum, yielding AG = 0. Table 3 presents a statistical description of the IS and AG indices constructed in this study.

thumbnail
Table 3. Statistical description of sentiment and agreement indices.

https://doi.org/10.1371/journal.pone.0339065.t003

4. Feature and model development

4.1. Features description

This section delineates the procedure for creating a composite feature dimension that amalgamates essential market data with sentiment indicators, highlighting the dual anchoring properties of both market and sentiment elements.

4.1.1. Market features.

  1. A. Base price features

Studies on technical models for forecasting stock price trends indicated that market prices comprehensively incorporate all accessible information, making historical price data vital for understanding investor behavior and market conditions [7,15]. It has been identified that the opening price, closing price, highest price, lowest price, and return are the essential characteristic parameters for forecasting the trend of the SSE [9,30]. Furthermore, to evaluate the extent of intraday price volatility, we computed the difference between the intraday high and low values.

The historical price series of the SSE Composite Index can be described as follows:

An observation point can be represented as

(1)

where represent the opening price, highest price, lowest price, closing price, intraday volatility, and return characteristics at time t, respectively.

  1. B. Bollinger bands features

Fundamental price indicators offer only a basic understanding of market volatility patterns. Technical analysts believe that market trends are consistent and repeatable; thus, identifying technical indications may lead to more accurate forecasts of future prices [19]. Bollinger bands, developed by John Bollinger in 1980, are a technical analysis method that captures price patterns and generates trading signals by combining a middle band, an upper band, and a lower band [60]. Financial investors commonly employ Bollinger bands owing to their ability to clearly indicate market movements and identify trading opportunities [61].

Therefore, we constructed three sets of technical indicators: the Middle Band, Upper Band, and Lower Band. The Middle Band is typically represented by the simple moving average of the price series, calculated as follows:

where is the closing price at time point i and n is the calculation window for the smoothing curve. The Upper Band and Lower Band are constructed based on the Middle Band and the standard deviation of prices:

and

where k is a constant (usually set to 2) and Std represents the standard deviation of closing prices over the statistical period.

Fig 2 shows that the Middle Band mitigates price volatility and indicates the medium-term market trend. The Upper Band represents a high-pressure area, indicating the likelihood of overbought conditions when prices are near or beyond this threshold. Conversely, the Lower Band signifies a low support zone, suggesting possible oversold situations when prices approach or fall below this threshold. We can delineate the technical feature set of the Bollinger bands as follows:

thumbnail
Fig 2. Bollinger band simulation curve.

Note: illustrates the structure of Bollinger bands, where the upper and lower bands define dynamic price boundaries relative to the moving average. This visualization reveals potential overbought and oversold zones, reflecting short-term market volatility and trend shifts.

https://doi.org/10.1371/journal.pone.0339065.g002

(2)

where , and represent the observed values of the Middle Band, Upper Band, and Lower Band at time point t, respectively. These technical indicators provide deeper insights for our market analysis.

  1. C. Anchoring of market price levels

The Fibonacci sequence is an infinite mathematical sequence [62], defined as follows:

Initial definition: The first two numbers in the sequence are 0 and 1, i.e., .

Recursive relation: For , each number in the sequence is the sum of the two preceding numbers:

As the numbers in the Fibonacci sequence increase, the ratio of two consecutive numbers approaches the golden ratio (), the ratio of numbers spaced by one digit approaches the square of the golden ratio (), and the ratio of numbers spaced by two digits approaches the cube of the golden ratio (). The array [0,0.236,0.382,0.5,0.618,1] consists of the values , , , as well as the markers 0, 0.5, and 1. This array is often used to determine the trends in the stock market [63]. This technical analysis tool, known as Fibonacci retracement, helps traders identify probable support and resistance levels, enabling them to better capitalize on trading opportunities [64].

We achieve price anchoring and market-level assessment over the past 52 weeks by calculating the Fibonacci level of the current price relative to the price fluctuations during this period. We can determine the Fibonacci level (FL) of the current price within the 52-week high–low range using the following formula:

where represents the ratio of the current price relative to the 52-week high–low range:

An indicates that the current price is the lowest within the 52-week period, whereas an indicates that the current price is the highest within the 52-week period.

The Fibonacci levels provide multiple anchors for market price levels, including the lowest and highest stock prices within the 52-week period, as well as the current market level. The Fibonacci retracement level feature used to describe market price anchoring, can be expressed as

(3)

4.1.2. Sentiment features.

  1. A. Sentiment communication features

Financial text on social media exhibits two typical characteristics: user-generated content [65] and information communication [66]. User-generated content reflects investors’ attitudes toward investment, whereas content dissemination measures the spread of investor opinions within social networks. Research indicates that the volume of published text can directly reflect market sentiment and investor attention toward the market [51], whereas the volume of comments and replies serves as an effective indicator of the range of opinion dissemination.

Table 2 shows the distribution of daily investor texts. The significant differences in text, reading, and comment volumes on a given trading day reflect market sentiment dynamics, as well as the breadth and intensity of its communication. In this study, we employed investor text volume (), reading amount (), and reply comment volume () on trading days as the featured dimensions () to assess the communication of sentiment. These metrics were used in the SSE index prediction analysis. We define these communication feature dimensions as follows:

(4)
  1. B. Bullish index

Retail investors account for 80–90% of the turnover in the Chinese stock market [6], which makes the IS index an important feature for predicting the SSE. We dedicate a significant amount of time to measuring the IS index () for each trading day. This index depicts the overall bullish sentiment of investors toward the SSE [43].

To further quantify the stage level of investor sentiment, we follow the anchoring logic described in Section 4.1.1 and calculate the daily sentiment level () over a 52-week window using the Fibonacci retracement method. Specifically, we first identify the highest and lowest sentiment values during the past 52 weeks ( and ) and compute the relative position of the current sentiment within this range.

We then compare with the standard Fibonacci ratio set {0, 0.236, 0.382, 0.5, 0.618, 1} and assign the closest ratio f as the sentiment level :

This index anchors the investor sentiment stage within the annual fluctuation range and identifies potential turning points or heterogeneity in market sentiment.

The IS index () and the sentiment level () constitute the sentiment characterization dimension ():

(5)
  1. C. AG index

In social media, investor sentiment often exhibits divergence, which constitutes a component of overall sentiment [67]. Based on this premise, we propose the Agreement Features Group () to assess the contribution of investor sentiment divergence to the prediction of the SSE Composite Index. We describe this new feature group as follows:

(6)

where represents the consistency of investor sentiment at time t and denotes the Fibonacci-based level of investor sentiment consistency, calculated using the same method as above. This alignment allows to anchor the temporal phase of agreement levels within the 52-week range, ensuring methodological consistency with sentiment and market anchoring.

4.1.3. Problem formulation.

Table 4 shows the feature dimensions used in this study to forecast the SSE index. The first part of these feature dimensions originates directly from the stock market, which we call market features (). Another part originates from investors’ opinions, which we call the sentiment group (). This study predicts the SSE index based on market and sentiment dual feature anchoring.

Given a specific period, the feature dimension is defined as follows:

(7)

where represents the market feature set, comprising (price features), (Bollinger band features), and (price levels); and denotes the sentiment feature set, encompassing (sentiment propagation features), (investor sentiment features), and (AG index features). The feature collection used to predict the SSE can be represented as

We consider a time window of length w, spanning from time to time , which includes the feature vectors from the past days, expressed as

Our objective is to leverage this feature vector to predict the closing prices of the SSE index for the subsequent days, denoted as

4.2. Model

4.2.1. Overall structure.

Fig 3 illustrates the overall structure of the proposed model. In this section, we detail the logical framework of our model.

thumbnail
Fig 3. Overall structure of MSD-CNN2D-ABiLSTM.

Note: The architecture of the MSD-CNN2D-ABiLSTM model, which integrates two CNN2D blocks (64 filters, 3 × 3 kernel, ReLU activation, 20% dropout, max pooling), BiLSTM encoders and decoders (50 units each), and an attention mechanism to capture temporal dependencies and assign dynamic weights to the features. The final output is generated through two dense layers (50 and 1 units) using ReLU and linear activations. The model is trained using the Adam optimizer (learning rate = 0.001) and MSE loss, balancing accuracy, interpretability, and computational efficiency.

https://doi.org/10.1371/journal.pone.0339065.g003

We first employ two CNN2D networks to separately load market indicator data (CNN2D_1) and sentiment indicator data (CNN2D_2) to extract local holistic spatial features. CNN2D effectively reduces the feature dimensions and compresses the information through convolution and pooling operations, which helps reduce the computational complexity and eliminate noise.

The key reason for utilizing CNN2D is its robust capability to handle graphical data and spatial visual information. The various market indicators, such as prices, Bollinger bands, and sentiment, are not isolated entities; rather, they are interconnected, collectively influencing the current market and sentiment states. Using CNN2D, we can conceptualize these indicators as a unified “image,” capturing the complex dependencies among features in a spatial context. This approach lays a solid foundation for subsequent model analyses.

After CNN2D extracts the features, a BiLSTM network encodes and decodes them, capturing the temporal dependencies and long-term patterns of market features. Next, we combine the outputs of the and feature sets and apply an attention mechanism to score and weight each feature. This process enables the model to focus more accurately on the features that are most critical for prediction.

After the weighted scoring, the output features undergo further processing through two dense layers to enable deep learning on the integrated features. To prevent overfitting, we incorporate Dropout layers, enhancing the model’s generalization ability. Finally, the model outputs the predicted value of the SSE Index after applying a linear activation function.

To enhance transparency and reproducibility, we included all major hyperparameter settings in the caption of Fig 3. These parameters—including filter sizes, dropout rates, and LSTM units—were tuned based on preliminary experiments and previous studies to ensure robust learning and generalization.

The dataset used in this study was constructed strictly in chronological order to ensure that each input window contained only information from the preceding time steps. Samples were generated using a sliding-window approach, where the input features were drawn from past periods and the prediction target corresponded to a future lag. For data partitioning, a non-shuffled, time-based holdout method with an 80:20 ratio was adopted, ensuring that the training set contained only earlier time segments, whereas the testing set consisted exclusively of later, unseen data. No random shuffling was performed, thereby preventing any form of data leakage or look-ahead bias. To confirm robustness, the same chronological partitioning strategy was applied consistently across all experiments, including ablation and sensitivity analyses, and was further validated through multiple forecast horizons (lags 1–20), effectively serving as a rolling evaluation framework.

4.2.2. Module description.

  1. A. Feature matrix

The shape of the market feature matrix is given by , where 10 represents the number of features and w denotes the feature window size. The shape of the sentiment feature matrix is defined as , where 7 is the number of features and w is the feature window size. The overall feature matrix can be described as

Therefore, the shape of is determined by .

  1. B. CNN2D module

First, we perform 2D convolution operations separately on the market features and the sentiment features to extract their local spatial features in a graphical representation:

(8)

where

  1. •. W(M) and are the weight matrices of the convolution kernels for and , respectively.
  2. •. b(M) and are the bias terms.
  3. •. σ is a nonlinear activation function, for which this study adopts the rectified linear unit (ReLU) function.
  4. C. Pooling and dropout operations

After the convolution operations, the market features and sentiment features are passed through pooling layers for subsampling. This operation aims to reduce the spatial dimensions of the feature maps, thereby lowering the computational complexity and mitigating the risk of overfitting. We employ the Max Pooling operation with a pooling window size of :

(9)

The pooled market features and sentiment features are then passed to Dropout layers for regularization to prevent model overfitting. In the Dropout layer, each input neuron is retained with a probability and discarded with a probability :

(10)

where and represent independently sampled binary random variables that control the retention or dropping of neurons. The symbol denotes element-wise multiplication.

  1. D. BiLSTM encoding and decoding

After pooling and Dropout operations, the market feature and the sentiment feature are passed to the BiLSTM network for encoding and decoding the temporal features, respectively. The BiLSTM captures the feature sequence by simultaneously performing both forward and backward pass computations. The sequence has – temporal dependencies. Managing time-series patterns specific to market and sentiment data is crucial because a combination of past and future events may influence market fluctuations and sentiment changes.

For the market features , the forward and backward processes during the encoding phase can be represented as follows:

(11)

where

  1. •. and are the hidden states of the forward and backward LSTM units, respectively.
  2. •. and are the input weight matrices for the forward and backward LSTMs, respectively.
  3. •. and are the recurrent weight matrices.
  4. •. and are the bias terms.
  5. •. is the tanh activation function.

The forward and backward hidden states and are concatenated to form the encoding output of the BiLSTM layer:

.

Subsequently, the encoded output is input into another BiLSTM layer for decoding, extracting deeper temporal features. The forward and backward processes during the decoding phase are represented as follows:

(12)

The decoding process similarly merges the forward and backward hidden states and to form the decoded result for market features:

(13)

Similarly, we can obtain the decoded result for the sentiment features as follows:

(14)
  1. E. Attention mechanism

After the BiLSTM encoding and decoding process, the market features and sentiment features are merged into a single comprehensive feature vector:

(15)

where represents the combined temporal feature vector that integrates both market and sentiment features. This merged feature vector is then passed into an attention mechanism layer.

Attention score. The importance of each feature, or attention score, is calculated using a linear transformation followed by a nonlinear activation function:

(16)

where

  1. •. represents the unnormalized attention score.
  2. •. is the learnable weight matrix.
  3. •. is the bias vector.

Attention weights. We apply the SoftMax function to normalize the attention score , yielding the attention weights :

where is the normalized attention weight, satisfying , which represents the importance of each feature at time step t for the final prediction.

Attention-weighted feature representation. The attention weights are then applied to the merged feature vector , generating the final attention-weighted feature representation:

(17)

where is the feature vector weighted by the attention mechanism, which encapsulates critical information from both market and sentiment features, considering the temporal importance of each feature.

  1. F. Prediction module

In the prediction module, the feature vector , which has been processed by the attention mechanism, undergoes a series of transformations, including flattening, passage through two fully connected layers, dropout, and finally passage through the output layer to generate the final prediction.

Flatten. The feature vector , produced by the attention mechanism, is transformed into a one-dimensional vector via flattening as follows:

(18)

where is the flattened feature vector, which provides structured input data for subsequent fully connected layers.

Dense layer 1. The flattened vector is passed into the first fully connected layer:

(19)

where is the weight matrix of the first fully connected layer, is the bias vector, and is the activation function. In this study, we used the ReLU activation function.

Dropout. The output of the first fully connected layer undergoes dropout to further reduce the risk of overfitting:

(20)

where p is the dropout probability and represents the randomly sampled binary mask.

Dense layer 2. The dropout-processed vector is passed into the second fully connected layer:

(21)

where is the weight matrix of the second fully connected layer and is the bias vector.

Output layer. The output of the second fully connected layer h2h_2h2 is passed through a linear activation function to generate the final prediction :

(22)

where is the weight matrix and is the bias vector of the output layer.

This model integrates the optimal features of convolutional, BiLSTM, attention, and fully connected layers. It effectively combines market and sentiment data to facilitate short-term forecasting of the SSE index.

5. Experiments

5.1. Evaluation metrics

We utilize the root mean squared error (RMSE), mean absolute error (MAE), coefficient of determination (R2), and direction accuracy (DA) to thoroughly assess the prediction efficacy of the model for the SSE Composite Index. These metrics evaluate the divergence between the actual value () and projected value () from various perspectives:

The RMSE measures the square root of the average squared error between the predicted and actual values, making it sensitive to large deviations or outliers in the predictions. This metric is particularly useful for evaluating the model’s ability to handle extreme values. The formula is as follows:

The MAE quantifies the average absolute error between the actual and predicted values. Compared with the RMSE, the MAE is less sensitive to outliers, making it suitable for measuring the overall error level in balanced datasets. The formula is as follows:

R2 reflects the goodness of fit of the model, indicating how well the predicted values align with the actual data. Its value typically ranges from 0 to 1, with values closer to 1 suggesting stronger explanatory power of the model. The formula is as follows:

where is the mean of the actual values.

The DA measures the accuracy of the model in predicting the direction of price movements (upward or downward). This is particularly important in financial markets, where investors prioritize trend predictions over exact price estimations. The formula is as follows:

where is an indicator function that assumes a value of 1 when the condition is satisfied and 0 otherwise.

Together, these metrics provide a comprehensive evaluation of the model’s performance, encompassing the error magnitude, goodness of fit, and accuracy of trend predictions.

5.2. Comparison with baseline models

The performance of the proposed MSD-CNN2D-ABiLSTM model in predicting the trend of the SSE Composite Index was first compared with those of traditional baseline models. The baseline models include a wide range of classical machine learning and deep learning approaches commonly used in time-series forecasting and financial data analysis. These traditional models include statistical methods such as ARIMA; distance- and tree-based machine learning models such as KNN, decision trees, and random forests; and boosting techniques such as XGBoost. Deep learning models include RNNs, LSTM, and gated recurrent units (GRUs), along with more advanced models that integrate convolutional layers and attention mechanisms, such as Attention LSTM and spatio-temporal graph convolutional networks.

In forecasting the SSE index, we ensured robustness by fine-tuning the parameters of classical machine learning and time-series models through grid search. The feedforward neural network, which uses a three-layer architecture with ReLU activation to capture the nonlinear features of the data, was trained using the Adam optimizer in conjunction with the mean squared error loss function. Other deep learning models employ an encoder–decoder structure, incorporating Dropout operations to prevent overfitting, and are configured with relevant settings to preserve the temporal information inherent in time-series data.

Table 5 shows the baseline model’s prediction performance for the SSE after one day. The error metrics, specifically the RMSE and MAE, exhibit comparable performance across SVR, linear regression, decision tree, KNN, and random forest, indicating their effective data fitting capabilities. However, the accuracy of these models in predicting trend direction is relatively low, with most models having an accuracy range between 50% and 65%. The R² values for ARIMA and SVR are 0.8625 and 0.8604, respectively, indicating some degree of stability in accounting for market volatility; nevertheless, these models remain limited in their capacity for trend prediction.

thumbnail
Table 5. Comparison of the 1-day-ahead SSE forecasting performance of baseline models.

https://doi.org/10.1371/journal.pone.0339065.t005

In comparison, the deep learning models performed significantly better. Specifically, models such as CNN1D, CNN2D, LSTM, GRU, and BiLSTM outperformed the traditional models in both error metrics and trend direction prediction accuracy. Notably, LSTM and BiLSTM achieved R² values exceeding 0.9, with trend prediction accuracies above 80%, indicating that deep learning models can more effectively capture complex patterns in time-series data, resulting in stronger predictive capabilities.

Our proposed MSD-CNN2D-ABiLSTM model excelled in all evaluation metrics, surpassing the baseline models. The MSD-CNN2D-ABiLSTM predicted the 1-day-ahead trend of the SSE with an R2 value of 0.9705 and a trend direction prediction accuracy of 91.53%, demonstrating exceptional forecasting performance. Fig 4 compares the predicted and actual values of the SSE Composite Index for a 1–2-day lag, highlighting the model’s superior short-term predictive capability.

thumbnail
Fig 4. Forecasting curve of the MSD-CNN2D-ABiLSTM model for a 1- to 2-day lag SSE.

Note: Compares the predicted and actual values of the SSE Composite Index for 1- and 2-day forecast horizons. The close alignment between the two curves indicates that the proposed model effectively captures short-term market fluctuations and directional trends.

https://doi.org/10.1371/journal.pone.0339065.g004

5.3. Predicted performance over 20 days

Table 6 shows the predictive performance of the MSD-CNN2D-ABiLSTM model concerning closing prices (), with lags ranging from 1 to 20 trading days. Because each week includes five trading days, this analysis effectively evaluates the model’s ability to predict closing prices over a period of approximately one month.

thumbnail
Table 6. Predictive performance of MSD-CNN2D-ABiLSTM for lags of 1–20 trading days.

https://doi.org/10.1371/journal.pone.0339065.t006

  1. (1). Short-term predictive performance (Lag = 1–5)

As shown in Table 6, the model demonstrates excellent performance in short-term forecasts for the SSE. At a lag of 1, the RMSE is 0.0372, the MAE is 0.0312, and the R2 reaches 0.9705, with a DA of 91.53%. These results indicate that the MSD-CNN2D-ABiLSTM model effectively captures short-term market fluctuations and is well-suited for predicting short-term trends. As the lag increases from 2 to 4, the error remains within an acceptable range, although the RMSE and MAE slightly increase to 0.0674 and 0.0503, respectively. R2 remains above 0.93, and the DA remains between 82% and 90%, demonstrating the model’s robustness in short-term forecasting.

However, at a lag of 5, the predictive performance declines. Although the DA remains at 82.07%, the error increases, potentially reflecting biases in the model when weekend or holiday effects are considered, given that five trading days span a full trading week.

  1. (2). Mid-term predictive performance (Lag = 6–10)

As the lag increases further, the prediction error continues to increase. At a lag of 6, the RMSE rises to 0.0864, and the R2 drops to 0.8845. Despite the growing error, the R2 at a lag of 10 remains 0.8288, and the DA remains above 70%, suggesting that the model retains a certain level of predictive ability for mid-term forecasts.

  1. (3). Long-term predictive performance (Lag = 11–20)

Starting from a lag of 11, the model’s predictive performance deteriorates significantly. When the lag surpasses 15, the R2 approaches zero or even becomes negative, indicating the model’s limited capacity to explain market fluctuations during this period. At a lag of 17, the R2 is −0.5042, revealing potential systematic biases in the model’s long-term predictions. Additionally, the DA drops to the 50%–60% range, approaching the level of random predictions.

Fig 5 shows the forecast curves of MSD-CNN2D-ABiLSTM for the SSE with lags of 1–10 trading days. Overall, the MSD-CNN2D-ABiLSTM demonstrates strong predictive ability in the short- to mid-term (lags of 1–10 days), particularly showing high accuracy and robustness in the first five days.

thumbnail
Fig 5. Forecast curves with a lag of 1-10 trading days.

Note: Figure 5 shows the predicted versus actual values of the SSE Composite Index across forecast horizons ranging from 1 to 10 trading days. The close alignment in the early lags indicates high short-term accuracy, whereas the gradual divergence at longer horizons reflects an increasing uncertainty over time.

https://doi.org/10.1371/journal.pone.0339065.g005

5.4. Structural sensitivity analysis

Structured Sensitivity Analysis (SSA) is a method for evaluating the impact of different model designs on performance. SSA facilitates the identification of architectural choices that improve the prediction accuracy, generalization ability, and computational speed for a given task by comparing different structural designs. The objective of SSA is to identify the key structural parts that affect model performance, thereby enabling more effective optimization. In our experiments, we conducted two structural tests to show that the important design decisions implemented in our model are both logical and effective in enhancing overall performance.

5.4.1. Feature fusion test.

Change: Combine market measures (Mt) and sentiment metrics (St) into a single input set and transmit it directly to a CNN2D network.

Purpose: Determine whether separate handling of market and sentiment characteristics is required, and evaluate the usefulness of feature separation in improving model performance.

Tables 6 and 7 clearly show that the MSD-CNN2D-ABiLSTM model is better for short-term forecasting. For example, at a lag of 1, the model achieved a DA of 0.9153 and an R2 of 0. 0.9705, demonstrating its strong ability to capture short-term stock price trends. Although the feature fusion test performed reasonably well in the short term, its overall performance remained inferior to that of the MSD-CNN2D-ABiLSTM model.

thumbnail
Table 7. Performance statistics for the feature fusion test.

https://doi.org/10.1371/journal.pone.0339065.t007

The performance comparison curves shown in Fig 6 further clarify the performance shifts before and after feature fusion. Clearly, within the effective prediction timeframe of 10 trading days, the MSD-CNN2D-ABiLSTM model consistently outperformed the post-fusion model in terms of the RMSE and MAE, indicating lower prediction errors. Additionally, the R2 values for the MSD-CNN2D-ABiLSTM model were higher, reflecting a better fit to the dataset. Although the post-fusion model slightly outperformed the MSD-CNN2D-ABiLSTM model in mid-term DA, the advantage of the MSD-CNN2D-ABiLSTM model was more pronounced in short-term forecasts, specifically at lags of 1 and 2.

thumbnail
Fig 6. Comparative performance curves prior to and after feature fusion.

Note: Compares the model’s predictive performance before and after feature fusion. The results show that separating market and sentiment features yields lower prediction errors (RMSE and MAE) and higher R2 values, indicating that distinct feature processing more effectively captures the heterogeneous mechanisms that drive market movements.

https://doi.org/10.1371/journal.pone.0339065.g006

In conclusion, the feature grouping strategy significantly enhances the model’s ability to accurately identify and predict stock price movements, as market technical and sentiment indicators impact prices through different mechanisms. Market technical features primarily reflect historical price fluctuations and technical factors, whereas sentiment features provide a unique perspective on the psychological expectations and emotional fluctuations of market participants. By combining these two sets of features, the MSD-CNN2D-ABiLSTM model demonstrates superior short-term trend forecasting capabilities.

5.4.2. CNN type test.

Change: Without altering other aspects of the model structure, replace the CNN2D network with a CNN1D network.

Purpose: This modification will help determine whether local temporal features are more critical when handling complex multidimensional market data or whether the global dependencies between market and sentiment data play a more significant role in enhancing the model’s predictive performance.

Table 8 presents the comparative results of the convolution layer type test. Fig 7, presenting data from Tables 6 and 8, shows the differences in model performance before and after the change. The research shows that the MSD-CNN2D-ABiLSTM model exhibits lower RMSE and MAE than the model that replaces CNN1D. This implies that the original model is significantly more effective in making predictions. A comparison of the R² values further proves the superior efficacy of the MSD-CNN2D-ABiLSTM model in explaining market data. Notably, the transition to CNN1D resulted in a significant decline in the model’s accuracy in predicting market trends. This suggests that when handling complex multidimensional data, CNN2D has a marked advantage over CNN1D owing to its superior ability to process features within a two-dimensional feature space.

thumbnail
Fig 7. Comparative performance curves prior to and after CNN type change.

Note: Compares the model’s predictive performance when the CNN2D layer is replaced with a CNN1D layer. The results indicate that CNN2D achieves lower prediction errors and higher R2 values, confirming its superiority in capturing complex spatial dependencies within multidimensional feature spaces compared to CNN1D.

https://doi.org/10.1371/journal.pone.0339065.g007

In conclusion, although CNN1D has strengths in processing one-dimensional time-series data, its ability to identify intricate inter-feature relationships is limited, which ultimately limits its short-term prediction accuracy compared to that of CNN2D. This highlights the importance of using CNN2D for more complex, multidimensional market data to enhance predictive performance.

5.4.3. Model structure ablation experiments.

Model structure ablation experiments were conducted to evaluate the contributions of different temporal components to the overall performance. Three variants were designed: replacing the BiLSTM with a unidirectional LSTM, removing the attention mechanism, and introducing a Transformer-based encoder. All experiments used identical data and training settings to ensure comparability. This analysis helps reveal how each structural design—bidirectional recurrence, attention weighting, and transformer encoding—affects prediction accuracy and model stability.

  1. A. LSTM vs. BiLSTM test

In this test, the BiLSTM layers in the proposed MSD-CNN2D-ABiLSTM model were replaced with standard unidirectional LSTM layers to examine the role of bidirectional temporal modeling. The overall model structure, hyperparameters, and training procedures were maintained to ensure a fair comparison. All experiments were conducted under consistent settings, with a feature window length of 10 and forecast lags ranging from 1 to 20 trading days.

The results presented in Table 9 show that compared with the bidirectional model detailed in Table 6, the unidirectional LSTM model consistently yielded higher RMSE and MAE values, alongside lower R2 and DA metrics. These differences suggest that the bidirectional sequence learning mechanism plays a critical role in improving the model’s ability to capture temporal dependencies and enhance its predictive stability. By processing information from both past and future directions, the BiLSTM structure demonstrates a more comprehensive understanding of sequence dynamics, leading to stronger short-term forecasting performance.

thumbnail
Table 9. Performance statistics for the LSTM-based model.

https://doi.org/10.1371/journal.pone.0339065.t009

  1. B. Model without the attention mechanism

To assess the contribution of the attention mechanism to the overall predictive performance, the Attention layer in the MSD-CNN2D-ABiLSTM model was removed while maintaining all other structural and training settings unchanged. This modification enabled the model to rely solely on the sequential encoding from the BiLSTM layers without the adaptive feature-weighting process provided by attention. All experiments were conducted under the same configuration, with a feature window length of 10 and forecast lags ranging from 1 to 20 trading days.

As shown in Table 10, the model without the attention mechanism exhibits R² and DA values comparable to those of the baseline model detailed in Table 6, suggesting that the overall trend recognition remains largely similar. However, the removal of attention leads to a clear deterioration in the RMSE and MAE across nearly all forecast horizons. These results demonstrate that although attention does not significantly alter the model’s directional sensitivity, it plays a crucial role in reducing prediction errors and enhancing the overall stability of the MSD-CNN2D-ABiLSTM framework.

  1. C. Model with transformer module

To further evaluate the adaptability of the model structure and respond to recent advances in time-series modeling, the BiLSTM layers in the MSD-CNN2D-ABiLSTM model were replaced with a Transformer module.

However, because the proposed framework is built on a dual-anchoring feature structure—where market and sentiment matrices are separately encoded via CNN2D—the Transformer was not used as the core encoder. Instead, it was employed as a comparative temporal modeling component following the CNN2D feature extraction stage. This design enables a direct comparison between recurrent and self-attention-based temporal representations, thereby testing the robustness and generalization capability of the proposed model under consistent experimental settings (window size = 10; lags = 1–20).

As shown in Table 11, the Transformer-based variant performed substantially worse than the baseline MSD-CNN2D-ABiLSTM model detailed in Table 6. Across nearly all forecast horizons, the RMSE and MAE increased sharply, whereas R2 and DA fluctuated irregularly, even becoming negative at certain lags (e.g., lags 7 and 9). These results indicate that the Transformer module struggles to capture the short-term temporal dependencies embedded in the current data configuration.

thumbnail
Table 11. Performance of the model with a Transformer module.

https://doi.org/10.1371/journal.pone.0339065.t011

We believe that this performance degradation primarily resulted from an adaptation mismatch between the Transformer’s self-attention mechanism and the dual-anchoring CNN2D feature structure adopted in this study. The Transformer is inherently suited for modeling long-range dependencies, whereas our framework emphasizes localized, short-horizon market and sentiment interactions. Consequently, the global attention patterns of the Transformer may not align well with the locally encoded CNN2D features, leading to unstable temporal learning under limited data conditions.

Additionally, a portion of the degradation may be attributable to the feature encoding characteristics of the CNN2D module, which may have restricted the Transformer’s ability to fully exploit global dependencies. However, considering the main focus of this study, we did not conduct further verification on this aspect.

5.5. Sliding window experiment

We conducted all the aforementioned experiments using a feature window length of 10. To further evaluate the impact of the window length on the model’s predictive performance, we performed an adjustment experiment by exploring different window lengths, such as 20 and 30, and their effects on predicting closing prices with lags ranging from 1 to 20 trading days. This experiment aimed to examine the model’s dependence on the length of historical data to determine the optimal window configuration that enhances the model’s prediction accuracy and generalization ability.

Fig 8, derived from Table 12, visually compares the changes in predictive performance, illustrating the model’s performance in predicting future closing prices over the next 1–20 trading days, using different feature window lengths. According to the RMSE, MAE, R2, and DA measurements, setting the feature window length to 10 makes the model less prone to errors (RMSE and MAE) and more accurate (R2 and direction). However, as the window length increases, the model’s predictive performance gradually declines. This deterioration implies that longer windows may introduce excessive historical noise or irrelevant information, adversely affecting the model’s learning efficiency and weakening its generalization capability.

thumbnail
Table 12. Evaluation of model predictive efficacy across varying feature window sizes.

https://doi.org/10.1371/journal.pone.0339065.t012

thumbnail
Fig 8. Comparative curves of model predictive performance across various feature windows.

Note: Compares the model’s predictive performance under different feature window lengths (w = 10, 20, 30). The results indicate that a shorter window (w = 10) achieves lower RMSE and MAE with a higher R² and directional accuracy (DA), whereas increasing the window size introduces excessive historical noise that reduces prediction accuracy and generalization ability.

https://doi.org/10.1371/journal.pone.0339065.g008

5.6. Sentiment feature ablation experiment

We also performed feature ablation experiments to determine the effect of sentiment features on SSE prediction. We evaluated the model’s predictive performance by removing sentiment group features () and AG index features () from the input feature matrix. Here, represents investors’ confidence in the market at time point t, whereas describes the level of investor divergence at the same time point. Together, these two components constitute the primary sentiment feature dimensions.

Table 13 presents the predictive performance of the model after feature ablation. By comparing the results in Table 13 with those in Table 6, we assessed the predictive performance of the model prior to and after the removal of the features. The comparison shows that the original model outperforms the model that lacks the feature group in terms of RMSE, MAE, , and DA over the effective prediction timeframe of 10 trading days. When the feature group is included, both the RMSE and MAE values are lower, indicating a smaller deviation between the predicted results and actual values, as well as a higher degree of data fitting.

thumbnail
Table 13. Predictive performance statistics after sentiment feature ablation.

https://doi.org/10.1371/journal.pone.0339065.t013

Furthermore, the model demonstrates a significantly better grasp of short-term market trends compared to the model without the features. This analysis underscores the crucial role of the features (which encapsulate relevant information about investor sentiment) in short-term stock market trend prediction, effectively enhancing the model’s predictive accuracy and trend-capturing ability.

Fig 9 visually compares the predictive performance before and after removing the investor sentiment feature set (). The results show that excluding leads to higher prediction errors and lower R2 values, indicating that investor sentiment features substantially enhance short-term forecasting accuracy and improve the model’s ability to capture market trend dynamics.

thumbnail
Fig 9. Performance comparison of features before and after ablation.

Note: Illustrates the predictive performance before and after removing the investor sentiment feature set (ISt). The results show that excluding ISt leads to higher prediction errors and lower R2 values, indicating that investor sentiment features substantially enhance short-term forecasting accuracy and improve the model’s ability to capture market trend dynamics.

https://doi.org/10.1371/journal.pone.0339065.g009

In addition to examining investor sentiment, we investigated the impact of investor disagreement (A_t) on model performance. Fig 10 presents the results of the ablation test, comparing predictive accuracy before and after removing this feature group. In short-term forecasts (lags of 1–5), deleting produces only a slight decrease in R2 and a minor increase in RMSE, suggesting that disagreement information contributes little to immediate market prediction. However, for medium-term forecasts (lag > 5), including helps reduce prediction error and enhances model fit, implying that investor disagreement exerts delayed effects on market dynamics.

thumbnail
Fig 10. Performance comparison of features before and after ablation.

Note: Compares the model’s predictive performance before and after removing the agreement index feature set (). The findings suggest that although contributes little to short-term accuracy, it enhances medium-term forecasting performance by capturing the delayed effects of investor disagreement, reflecting its potential value in longer-horizon market trend prediction.

https://doi.org/10.1371/journal.pone.0339065.g010

Overall, although provides limited value in short-term forecasts owing to its non-directional nature, its inclusion improves the model’s robustness in medium-term trend estimation. This finding highlights the complementary role of sentiment agreement and disagreement features in capturing both immediate and gradual behavioral influences within the market.

6. Discussion

This section builds upon extensive experiments that validated the predictive effectiveness of the proposed model, offering a summary and discussion of the study’s key findings and implications. Specifically, this section is structured into three parts: (1) the construction logic and mechanism of the proposed model, (2) its theoretical and practical implications, and (3) its limitations and future directions.

6.1. Theoretical logic and structural mechanism

Building upon the extensive empirical results and validation experiments, this section further explains the theoretical rationale and structural logic underlying the proposed model. Rather than merely improving prediction accuracy, the study aimed to reveal the behavioral and structural mechanisms behind market fluctuations and to extend existing theories of sentiment-driven financial dynamics.

  1. (1). Theoretical motivation and research uniqueness

The theoretical foundation of this study lies in advancing the understanding of emotional mechanisms within financial markets. Prior research has established that investor sentiment plays an essential role in price formation; however, most studies have examined either market anchoring or sentiment reactions separately, without integrating their interaction within a unified analytical framework. To address this gap, the present study introduces a dual-anchoring mechanism, in which market and sentiment signals jointly shape the evolution of stock prices.

This dual-anchoring concept extends traditional anchoring theory by linking rational market indicators with behavioral sentiment cues. It posits that market movements are neither purely rational adjustments nor spontaneous emotional reactions, but rather the outcome of continuous interaction between structural and affective forces.

Building upon this premise, the MSD-CNN2D-ABiLSTM model fuses market and sentiment anchors into one learning architecture, enabling simultaneous extraction of spatial and temporal dependencies. Unlike conventional CNN–BiLSTM hybrids that mainly rely on temporal correlations, our model explicitly captures cross-domain spatial coupling between price- and sentiment-based features. This represents an evolutionary extension of existing approaches rather than their replacement, refining prior hybrid frameworks to better reflect the complexity of sentiment-driven markets.

  1. (2). Construction and role of sentiment features

Sentiment feature engineering is central to realizing the dual-anchoring logic. Building upon previous works [52,54], this study constructs two complementary indicators—the IS and AG indices—which jointly represent the intensity and convergence of market emotions. These indices form a bi-dimensional sentiment space, enabling the model to recognize both directional confidence and collective divergence among investors.

Importantly, neutral texts are excluded when computing sentiment indices. Although neutral sentiment may theoretically provide contextual balance, prior studies [50,51] have demonstrated that neutral expressions often contain semantic ambiguity and informational noise, contributing little to predictive performance. Following this empirical evidence, neutral posts are retained in preprocessing to preserve corpus integrity but omitted during index calculation. This ensures that sentiment variables capture only unambiguous bullish or bearish signals, thereby enhancing interpretability and reducing noise propagation through the learning pipeline.

The results confirm that incorporating sentiment anchors markedly improves both accuracy and directional prediction. The IS index reflects market confidence, whereas the AG index captures opinion divergence; together, they anchor collective behavior within broader market cycles. Hence, the dual sentiment structure not only strengthens short-term forecasting but also reveals the embedded psychological dynamics that govern long-term market equilibria.

  1. (3). Model innovation and structural rationality

Methodologically, the MSD-CNN2D-ABiLSTM model innovatively integrates spatial feature extraction, bidirectional temporal learning, and adaptive attention weighting. The CNN2D module identifies localized spatial dependencies within market and sentiment matrices, the BiLSTM captures forward- and backward-time dynamics, and the Attention layer adaptively emphasizes the features most relevant to prediction. This layered synergy balances the market anchor (rational structure) with the sentiment anchor (behavioral dynamics), producing a model capable of learning both stable trends and emotional fluctuations.

Extensive experiments—which included comparisons with 19 baseline models, feature-ablation tests, and sliding-window sensitivity analyses—confirmed the model’s robustness and rational design. The model performs particularly well in the SSE, a market characterized by high retail participation and strong sentiment volatility. We interpret this not as a structural limitation but as an indication that the model aligns closely with markets where emotions significantly influence price discovery.

While emotional intensity differs across markets, sentiment mechanisms are universally present. Future research may extend validation to include markets with varying rationality levels. This would involve exploring cross-market adaptability and refining the understanding of how emotional heterogeneity shapes predictive efficiency.

Overall, the MSD-CNN2D-ABiLSTM framework embodies both theoretical and methodological advancements. By unifying rational and affective anchors, it offers a transparent and interpretable structure for modeling sentiment-driven dynamics—thereby extending anchoring theory into the domain of data-driven financial forecasting and enriching the analytical toolkit for understanding market behavior.

6.2. Research implications

6.2.1. Theoretical significance.

This study innovatively introduced the concept of dual anchoring of market prices and sentiment into stock market prediction, expanding the application scope of anchoring theory. By integrating market price levels with investor sentiment characteristics, the study highlighted the importance of sentiment in market fluctuations, offering a new theoretical perspective for understanding the complex dynamics of financial markets.

Additionally, structural sensitivity tests, feature ablation experiments, and window sliding tests proved that the model performed well across different situations. These tests showed that CNN2D is particularly adept at handling complex spatial feature matrices. In addition, feature ablation experiments further emphasized the critical role of emotional features, although the predictive value of the AG index exhibited more complex features. These findings provide rich theoretical support and methodological reference for future research.

6.2.2. Practical significance.

This study holds significant practical value for investors, regulators, and academic researchers. Investors can leverage the MSD-CNN2D-ABiLSTM model to make more accurate short-term investment decisions, thereby reducing risks associated with emotional volatility and enhancing the stability of returns. Moreover, regulators can use sentiment-driven predictive models to promptly identify abnormal market fluctuations, thereby optimizing regulatory policies and enhancing overall market stability. Researchers can build upon this study to explore other feature combinations and model optimizations, laying the groundwork for future stock market prediction research.

In conclusion, this study not only deepens the theoretical understanding of sentiment-driven market behavior but also provides effective solutions for real-world financial market operations. By using both market and sentiment as anchors, it demonstrate the significant impact of sentiment on market trends, providing strong support for investment decisions, risk management, and policymaking in severe financial market conditions.

6.3. Limitations

Although the proposed MSD-CNN2D-ABiLSTM model demonstrates robust performance in predicting short-term fluctuations of the SSE Composite Index, it has several limitations.

6.3.1. Impact of external factors.

The study period (2019–2023) coincided with the COVID-19 pandemic, which profoundly affected both market dynamics and investor sentiment orientation in the Chinese stock market. This unprecedented event amplified emotional volatility, policy uncertainty, and behavioral divergence among investors, resulting in a market environment characterized by strong sentiment fluctuations and heightened noise. While such exogenous shocks may introduce instability and limit the model’s generalizability to more tranquil market conditions, they also provide a valuable opportunity to examine the model’s robustness under real-world stress and crisis scenarios.

Note that our data collection was completed in 2023, as the research project officially commenced in 2024, and 2023 represented the most recent complete and verifiable annual dataset available at that time. The inclusion of this dataset ensured that the model was trained and validated on the most up-to-date and behaviorally representative sentiment data, thereby improving the contemporaneity and practical relevance of the findings. Nevertheless, future studies could extend the temporal scope to include pre- and post-pandemic periods or explicitly incorporate external shock variables—such as macroeconomic uncertainty indices or crisis markers—to further evaluate the model’s adaptability and predictive stability across different market regimes.

Limitations of sentiment features: While the study explored the dual anchoring of market and sentiment, the sentiment features employed were relatively narrow in scope. The current model relies heavily on sentiment indices derived from social media text data, which may not comprehensively capture market sentiment dynamics. Future studies could expand the sentiment feature set by incorporating additional dimensions, such as investor sentiment surveys and broader market sentiment indices, to improve the comprehensiveness and accuracy of sentiment data and enhance the model’s ability to detect sentiment-driven market fluctuations.

Trade-off between local and global analyses: The study highlights the importance of local spatial features in predicting stock prices, particularly concerning short-term fluctuations. Nonetheless, the challenge of balancing the capture of local features with the analysis of broader market trends persists, particularly in the context of long-term market prediction. Future research could introduce multi-level feature analyses that integrate both local and global market dynamics, offering a more comprehensive understanding of market behavior and improving long-term forecasting capabilities.

6.3.2. Geographic limitations.

Although the MSD-CNN2D-ABiLSTM model demonstrates robust performance in forecasting the Shanghai Composite Index, its results are significantly influenced by the behavioral characteristics of the Chinese stock market—such as high levels of retail participation, pronounced emotional sensitivity, and strong policy influence. These features make the SSE a suitable empirical setting for testing sentiment-driven forecasting frameworks. However, market rationality and emotional responsiveness vary across regions. In more mature markets, where institutional investors play a dominant role, the impact of sentiment may appear more moderate but is never entirely absent.

Future research should, therefore, conduct cross-market validation within equity, commodity, or foreign exchange markets to test the model’s robustness across diverse behavioral structures. Additionally, adaptively calibrating the influence of sentiment in accordance with market conditions could further enhance the model’s generalizability. Note that this limitation reflects differences in sentiment intensity rather than the scope of the model—as all markets, irrespective of their level of maturity, are influenced by emotion to some extent. Extending this framework to various market environments will contribute to developing a unified understanding of how sentiment interacts with market fundamentals in shaping financial dynamics.

In conclusion, we acknowledge these limitations as meaningful directions for future research. Further investigations that deepen the understanding of how sentiment and market fundamentals interact under different market structures will help extend the theoretical contribution of this study and promote a more systematic understanding of sentiment-driven financial dynamics.

7. Conclusion

This study examines the short-term prediction of the SSE Composite Index and introduces MSD-CNN2D-ABiLSTM, a multivariate feature matrix model that uses both market prices and investor sentiment as anchors. The model uses the highest and lowest closing prices and sentiment index extremes over a 52-week period as anchors, in conjunction with Fibonacci retracement levels, to create a composite feature set that characterizes market heterogeneity. The MSD-CNN2D-ABiLSTM model uses CNN2D to extract local spatial features from market and sentiment data, whereas a BiLSTM network is used to capture temporal features. The implementation of an attention mechanism enables the model to concentrate on critical information, thereby improving its capacity to forecast short-term variations in the SSE.

Experimental results show that the MSD-CNN2D-ABiLSTM model performs well in short-term SSE forecasting, particularly in predicting trends with a 1–2 day lag, with accuracy exceeding 90% and an value exceeding 95%. The model demonstrates a significant advantage in predicting stock market trends with a 10-day lag, markedly surpassing traditional baseline models. Feature ablation experiments validated the efficacy of the sentiment feature set, highlighting the significance of market sentiment in predicting the sentiment-driven Chinese stock market.

Additionally, structural sensitivity tests validated the enhancement in model performance by loading market and sentiment features independently. Furthermore, the study revealed that compared with CNN1D, CNN2D is more adept at handling complex market structures, with local spatial feature extraction proving particularly advantageous for short-term forecasting. The sliding window experiment highlights the critical role of the optimal window length in improving the model’s adaptability to various market conditions.

This research is the first to introduce dual anchoring of market prices and sentiment into SSE forecasting, enriching the theoretical framework of stock price prediction. It expands the application of anchoring effects in financial market forecasting while demonstrating the critical role of sentiment features in capturing market dynamics. By revealing the global dependencies between sentiment and market prices, this study provides a new perspective for the academic community and establishes a theoretical foundation for investigating anchoring effects and sentiment-driven market behavior.

The study also holds significant practical implications. Investors can utilize the MSD-CNN2D-ABiLSTM model to make more accurate short-term investment decisions, reducing the negative impact of emotional fluctuations on their decisions. Regulatory agencies can use the findings to identify abnormal sentiment-driven market volatility and optimize regulatory measures, thereby improving market stability. Researchers can build upon the methods and model design proposed in this study to further explore sentiment-driven market behavior analysis, advancing research in financial market prediction.

Despite its remarkable results in predicting the SSE, the study has several limitations. First, the model does not fully account for external factors such as macroeconomic conditions and policy interventions, which may limit its predictive power under extreme market conditions. Second, the sentiment features are relatively narrow in scope, and future research could introduce more dimensions of sentiment data, such as sentiment surveys and market indices. Finally, the model’s applicability is primarily based on the Chinese market. For cross-market validation, future studies could extend this approach to other financial markets, improving the model’s generalizability.

Supporting information

S1 Data. This file contains the English-version datasets of the SSE index and the sentiment index.

https://doi.org/10.1371/journal.pone.0339065.s001

(ZIP)

References

  1. 1. Chen Y, Fang R, Liang T, Sha Z, Li S, Yi Y. Stock Price Forecast Based on CNN-BiLSTM-ECA Model. Scientif Programm. 2021;2021:2446543.
  2. 2. Chen Y-C, Huang W-C. Constructing a stock-price forecast CNN model with gold and crude oil indicators. Appl Soft Comput. 2021;112:107760.
  3. 3. Deng S, Xiao C, Zhu Y, Tian Y, Liu Z, Yang T. Dynamic forecasting of the Shanghai Stock Exchange index movement using multiple types of investor sentiment. Appl Soft Comput. 2022;125:109132.
  4. 4. Liu B, Yu Z, Wang Q, Du P, Zhang X. Prediction of SSE Shanghai Enterprises index based on bidirectional LSTM model of air pollutants. Exp Syst Appl. 2022;204:117600.
  5. 5. Nisar TM, Yeung M. Twitter as a tool for forecasting stock market movements: A short-window event study. J Financ Data Sci. 2018;4:101–19.
  6. 6. Lin Z. Modelling and forecasting the stock market volatility of SSE Composite Index using GARCH models. Fut Generat Comput Syst. 2018;79:960–72.
  7. 7. Jiang J, Wu L, Zhao H, Zhu H, Zhang W. Forecasting movements of stock time series based on hidden state guided deep learning approach. Inform Proc Manag. 2023;60(3):103328.
  8. 8. Abraham ER, Mendes dos Reis JG, Vendrametto O, de Oliveira Costa Neto PL, Carlo Toloi R, de Souza AE, et al. Time Series Prediction with Artificial Neural Networks: An Analysis Using Brazilian Soybean Production. Agriculture. 2020;10(10):475.
  9. 9. Roondiwala M, Patel H, Varma S. Predicting Stock Prices Using LSTM. Int J Sci Res. 2017;6(4):1754–6.
  10. 10. Kahneman D. Thinking, fast and slow. New York (NY): Farrar, Straus and Giroux; 2011. 499 p.
  11. 11. Givi J, Galak J. The “future is now” bias: Anchoring and (insufficient) adjustment when predicting the future from the present. J Experimen Soc Psychol. 2019;84:103830.
  12. 12. George TJ, Hwang C. The 52‐week high and momentum investing. J Financ. 2004;59:2145–76.
  13. 13. Baker M, Pan X, Wurgler J. The effect of reference point prices on mergers and acquisitions. J Financ Econ. 2012;106(1):49–71.
  14. 14. Liang H, Yang C, Zhang R, Cai C. Bounded rationality, anchoring-and-adjustment sentiment, and asset pricing. North Am J Econ Financ. 2017;40:85–102.
  15. 15. Xu H, Chai L, Luo Z, Li S. Stock movement prediction via gated recurrent unit network based on reinforcement learning with incorporated attention mechanisms. Neurocomputing. 2022;467:214–28.
  16. 16. Piotroski JD. Value Investing: The Use of Historical Financial Statement Information to Separate Winners from Losers. J Account Res. 2000;38:1.
  17. 17. Fama EF, French KR. The Cross-Section of Expected Stock Returns. J Financ. 1992;47(2):427.
  18. 18. Fama EF, French KR. A five-factor asset pricing model. J Financ Econ. 2015;116(1):1–22.
  19. 19. De Almeida LAG. Technical indicators for rational investing in the technology companies: The evidence of FAANG stocks. J Pengur. 2020;59:75–87.
  20. 20. Murphy KJ. Chapter 38 Executive compensation. Handbook of Labor Economics. Elsevier; 1999. p. 2485–563.
  21. 21. Nti IK, Adekoya AF, Weyori BA. A systematic review of fundamental and technical analysis of stock market predictions. Artif Intell Rev. 2020;53:3007–57.
  22. 22. McNeil AJ. Modeling Financial Time Series With S-PLUS. J Am Stat Assoc. 2004;99(466):564–5.
  23. 23. Sahoo PK, Charlapally K. Stock price prediction using regression analysis. Int J Sci Eng Res. 2015;6:1655–9.
  24. 24. Fenghua W, Jihong X, Zhifang H, Xu G. Stock Price Prediction based on SSA and SVM. Proced Comput Sci. 2014;31:625–31.
  25. 25. Illa PK, Parvathala B, Sharma AK. Stock price prediction methodology using random forest algorithm and support vector machine. Mat Today Proc. 2022;56:1776–82.
  26. 26. Du X, Hayes DJ, Yu CL. Dynamics of Biofuel Stock Prices: A Bayesian Approach. Am J Agri Econ. 2010;93(2):418–25.
  27. 27. Liu H, Long Z. An improved deep learning model for predicting stock market price time series. Digit Signal Process. 2020;102:102741.
  28. 28. Bao W, Yue J, Rao Y. A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PLOS ONE. 2017;12:e0180944.
  29. 29. Xiaoyan L, Raga RC. BiLSTM Model With Attention Mechanism for Sentiment Classification on Chinese Mixed Text Comments. IEEE Access. 2023;11:26199–210.
  30. 30. Istiake Sunny MdA, Maswood MMS, Alharbi AG. Deep Learning-Based Stock Price Prediction Using LSTM and Bi-Directional LSTM Model. 2020 2nd Novel Intelligent and Leading Emerging Sciences Conference (NILES). 2020. pp. 87–92.
  31. 31. Abu-Mostafa YS, Atiya AF. Introduction to financial forecasting. Appl Intell. 1996;6:205–13.
  32. 32. Abdullah M, Hadzikadicy M, Shaikhz S. SEDAT: Sentiment and Emotion Detection in Arabic Text Using CNN-LSTM Deep Learning. 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA). 2018. p. 835–40.
  33. 33. Cen L, Hilary G, Wei KCJ. The Role of Anchoring Bias in the Equity Market: Evidence from Analysts’ Earnings Forecasts and Stock Returns. J Financ Quant Anal. 2012;48(1):47–76.
  34. 34. Campbell SD, Sharpe SA. Anchoring Bias in Consensus Forecasts and Its Effect on Market Prices. J Financ Quant Anal. 2009;44(2):369–90.
  35. 35. Ribeiro MT, Singh S, Guestrin C. Anchors: High-Precision Model-Agnostic Explanations. AAAI. 2018;32.
  36. 36. Kumar A, Lee CMC. Retail Investor Sentiment and Return Comovements. J Financ. 2006;61(5):2451–86.
  37. 37. Chung S-L, Hung C-H, Yeh C-Y. When does investor sentiment predict stock returns? J Empiric Financ. 2012;19(2):217–40.
  38. 38. Stambaugh RF, Yu J, Yuan Y. The long of it: Odds that investor sentiment spuriously predicts anomaly returns. J Financ Econ. 2014;114(3):613–9.
  39. 39. Al-Nasseri A, Menla Ali F, Tucker A. Investor sentiment and the dispersion of stock returns: Evidence based on the social network of investors. Int Rev Financ Analys. 2021;78:101910.
  40. 40. Guo K, Sun Y, Qian X. Can investor sentiment be used to predict the stock price? Dynamic analysis based on China stock market. Phys A Stat Mech Appl. 2017;469:390–6.
  41. 41. Jin Z, Guo K, Sun Y, Lai L, Liao Z. The industrial asymmetry of the stock price prediction with investor sentiment: Based on the comparison of predictive effects with SVR. J Forecast. 2020;39(7):1166–78.
  42. 42. Jing N, Wu Z, Wang H. A hybrid model integrating deep learning with investor sentiment analysis for stock price prediction. Exp Syst Appl. 2021;178:115019.
  43. 43. Liu Q, Lee W-S, Huang M, Wu Q. Synergy between stock prices and investor sentiment in social media. Borsa Istanbul Rev. 2023;23(1):76–92.
  44. 44. Baker M, Wurgler J. Investor Sentiment in the Stock Market. J Econ Perspect. 2007;21(2):129–51.
  45. 45. Jiang S, Jin X. Effects of investor sentiment on stock return volatility: A spatio-temporal dynamic panel model. Econ Modell. 2021;97:298–306.
  46. 46. Chen G, Kim KA, Nofsinger JR, Rui OM. Trading performance, disposition effect, overconfidence, representativeness bias, and experience of emerging market investors. Behav Dec Mak. 2007;20(4):425–51.
  47. 47. Li Y, Li W. Firm-specific investor sentiment for the Chinese stock market. Econ Modell. 2021;97:231–46.
  48. 48. Lan Y, Huang Y, Yan C. Investor sentiment and stock price: Empirical evidence from Chinese SEOs. Econ Modell. 2021;94:703–14.
  49. 49. Sharpe WF. Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk. J Financ. 1964;19(3):425.
  50. 50. Liu Q, Huang C, Liu Y, Son H. Purely sentiment-driven stock index trend forecast: A probability model based on social media sentiment space. Knowl-Based Syst. 2025;325:113985.
  51. 51. Liu Q, Son H. Data selection and collection for constructing investor sentiment from social media. Humanit Soc Sci Commun. 2024;11:1–13.
  52. 52. Liu Q, Son H. Methods for aggregating investor sentiment from social media. Humanit Soc Sci Commun. 2024;11:1–22.
  53. 53. Cunningham P, Cord M, Delany SJ. Supervised Learning. In: Cord M, Cunningham P, editors. Machine Learning Techniques for Multimedia: Case Studies on Organization and Retrieval. Berlin, Heidelberg: Springer; 2008. p. 21–49.
  54. 54. Antweiler W, Frank MZ. Is All That Talk Just Noise? The Information Content of Internet Stock Message Boards. J Financ. 2004;59(3):1259–94.
  55. 55. Xiong X, Luo C, Ye Z. Stock BBS and trades: The information content of stock BBS. J Syst Sci Math Sci. 2017;37:2359.
  56. 56. Li W, Qi F, Tang M, Yu Z. Bidirectional LSTM with self-attention mechanism and multi-channel features for sentiment classification. Neurocomputing. 2020;387:63–77.
  57. 57. Liu Q, Huang M, Zhao L, Lee W-S. The dispositional effects of holidays on investor sentiment: Therapeutic and hygienic. J Innovat Knowl. 2023;8(2):100358.
  58. 58. Liu Q, Wang X, Du Y. The weekly cycle of investor sentiment and the holiday effect-- An empirical study of Chinese stock market based on natural language processing. Heliyon. 2022;8(12):e12646. pmid:36619447
  59. 59. Liu Q, Son H, Lee W-S. The game of lies by stock investors in social media: a study based on city lockdowns in China. Financ Innov. 2024;10(1).
  60. 60. Bollinger J. Using bollinger bands. Stocks Commodit. 1992;10:47–51.
  61. 61. Seshu V, Shanbhag H, Rao SR, Venkatesh D, Agarwal P, Arya A. Performance Analysis of Bollinger Bands and Long Short-Term Memory(LSTM) models based Strategies on NIFTY50 Companies. 2022 12th International Conference on Cloud Computing, Data Science & Engineering (Confluence). 2022. p. 184–190.
  62. 62. Fiorenza A, Vincenzi G. From Fibonacci Sequence to the Golden Ratio. J Mathemat. 2013;2013:1–3.
  63. 63. Gaucan V. How to use Fibonacci retracement to predict forex market. J Knowl Manag Econ Inform Technol. 2011;1:1.
  64. 64. Azzam NA, Batulan RA. Fibonacci Trading Strategy. In: Ramadani V, Alserhan B, Dana L-P, Zeqiri J, Terzi H, Bayirli M, editors. Research on Islamic Business Concepts. Singapore: Springer Nature Singapore; 2023. p. 347–356.
  65. 65. Ismailiyan M. How to use social networks’ user-produced content in news: A case study of the BBC. Commun Res. 2015;22:129–48.
  66. 66. Bhattacharya A, Romani M, Stern N. Infrastructure for development: meeting the challenge. CCCEP, Grantham Research Institute on Climate Change and the Environment and G. 2012;24:1–26.
  67. 67. Cen L, Lu H, Yang L. Investor Sentiment, Disagreement, and the Breadth–Return Relationship. Manag Sci. 2013;59(5):1076–91.