Data sources
The research objects selected for this paper are three representative stock indices in China: the CSI 300 Index (CSI 300, Index code: 000300), the SSE Composite Index (SSEC, Index code: 000001), and the CSI Smallcap 500 Index (CSI 500, Index Code: 000905), whose time series data are the daily closing prices from January 4, 2013 to December 29, 2023, excluding holidays. Each index has a total of 2,672 data points, which were retrieved from the official Investing website (https://cn.investing.com). The closing price data for these indices are illustrated in Fig. 6, while the statistical description are presented in Table 1.

A graphical representation of the original data for three stock indices: CSI 300 Index, SSEC Index, and CSI 500 Index.
Data processing
Phase space reconstruction of data
The closing price data of the three selected stock indices, CSI 300, SSEC, and CSI 500, have no outliers or missing values. Initially, we employ the Cao method and mutual information method to ascertain the embedding dimension \(m\) and time delay \(\tau\) for each stock index, which are the key parameters for the phase space reconstruction of the data. After calculation, the time delay of the closing price data of the CSI 300 index is \(\tau =16\) and the embedding dimension is \(m=7\); the time delay of the closing price data of the SSEC index is \(\tau =20\) and the embedding dimension is \(m=6\); the time delay of the closing price data of the CSI 500 index is \(\tau =25\) and the embedding dimension is \(m=8\). The time delay \(\tau\) and embedding dimension \(m\) of each stock index data are known, the following phase space reconstruction is performed to recover the original dynamical system information, which helps the short-term prediction of stock index data.
As outlined in “Phase Space Reconstruction”, phase space reconstruction involves converting original one-dimensional time series data into a multidimensional state space. This transformation enables a more profound comprehension of the dynamical characteristics and underlying patterns of the data. After phase space reconstruction, the one-dimensional closing price data of CSI 300 index is reconstructed into a two-dimensional matrix data of 2576 × 7; the one-dimensional closing price data of SSEC index is reconstructed into a two-dimensional matrix data of 2572 × 6; and the one-dimensional closing price data of CSI 500 index is reconstructed into a two-dimensional matrix data of 2497 × 8.
Broad learning of data
Instead of training layer by layer like a deep network structure, BLS uses a cascade structure to quickly learn and expand the feature data. The parameters within the BLS used in this paper are set as follows: the mapped node in the mapped layer is map_num=3, the mapped feature is map_fea_num=2, the enhanced node is enh_num=1 and the enhanced feature is enh_fea_num=10. The feature data obtained from the phase space reconstruction of each stock index is further processed by broad learning as a way to expand the dimension of the features. Finally, the feature data of each stock index is expanded to 16 dimensions.
Data fusion and standardization
In the further analysis process, the feature data derived from phase space reconstruction is concatenated and integrated with the expanded feature data from broad learning. The approach horizontally combines the feature sets obtained from both methods. This way not only increases the dimensionality of the data but also merges information extracted from diverse perspectives, enhancing the expressiveness and accuracy of the final model.
To ensure equitable comparisons among different stock indices and to augment the performance of subsequent models, it is imperative to standardize the fused data. Standardization, a pivotal data preprocessing technique, rescales the data values to achieve a mean of 0 and a standard deviation of 1. This process helps to eliminate the differences in the magnitude of the data, making the learning process more efficient during model training. The standardized formula is Eq. (20).
$${X}_{std}=\frac{X-\mu }{\sigma }$$
(20)
Where \(X\) represents the fused stock index data, \({X}_{std}\) denotes the standardized data. \(\mu\) and σ are the mean and standard deviation of the original data, respectively.
Furthermore, in order to revert the data to its original scale, the output predictions must also undergo inverse standardization, as depicted in Eq. (21).
$$\widehat{y}={X}_{std}\cdot \sigma +\mu$$
(21)
Where \(\hat{y}\) indicates the predicted value post-output and inverse standardization by the QLSTM neural network.
Experimental environment and parameter settings
The processor of the experimental environment in this paper is 12th Gen Intel(R) Core(TM) i5-12500H, the operating system is Windows 11 (64-bit), the deep learning development environment is Pytorch 2.0.1+cpu, and the Python version is 3.10.
In order to verify the predictive ability of the constructed BLS-QLSTM model, this paper selects three real stock index data of the CSI 300 index, SSEC index, and CSI 500 index for experiments and compares the errors with the QLSTM model without introducing BLS as well as the single model LSTM. Due to the chaotic nature of stock index data, the original one-dimensional closing price data must be input after phase space reconstruction. The key parameters in this phase of phase space reconstruction are the embedding dimension \(m\) and the time delay \(\tau\), which can be determined by the Cao method and the mutual information method, respectively, as shown in Table 2. The parameter settings for BLS are shown in Table 3.
Given the modest dataset size, comprising only 2672 data points per stock index and the relatively low task complexity, thus a single-layer QLSTM was employed. Through continuous trial and error experiments and analyses, the data batch size is 1, the number of iterations is 20, the learning rate is 0.0004. The number of layers of LSTM is also 1 with 16 neurons in a single layer, and the learning rate is 0.00007. All models choose the Adam optimization algorithm for weight and bias adjustments, and use MSE as the loss function. The data partitioning strategy allocates 75% of the samples to training and the remaining 25% to testing.
In the stock index prediction experiment, the labels of up or down were generated based on the percentage change in the daily closing price, setting a threshold of 1%. If the daily price change exceeds 1%, it is labeled as “up”; if the decrease exceeds 1%, it is labeled as “down”; otherwise, it is considered stable. To concentrate on the capacity of models to predict significant movements in different stock indices, the “stable” data points were filtered out, ensuring that the analysis centered on clear upward and downward trends in the indices. Subsequently, the predicted daily closing prices of the model were compared with the actual prices from the previous day to generate up or down prediction labels, and these predictions were analyzed in comparison with the actual outcomes.
Evaluation indicators
In order to explore the accuracy of models, the root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R2) are selected as prediction evaluation indices in this paper to evaluate and compare the predictive effect of models. Additionally, two categorical evaluation metrics, precision and accuracy, were introduced to measure the performance of models in predicting the direction of stock price movements.
-
1.
The formulas for the selected forecasting metrics are as follows as Eqs. (22)–(25).
$$RMSE=\sqrt{\frac{1}{n}\mathop{\sum }\limits_{i=1}^{n}{({\hat{y}}_{i}-{y}_{i})}^{2}}$$
(22)
$$MAE=\frac{1}{n}\mathop{\sum }\limits_{i=1}^{n}|\widehat{{y}_{i}}-{y}_{i}|$$
(23)
$$MAPE=\frac{1}{n}\mathop{\sum }\limits_{i=1}^{n}|\frac{{y}_{i}-\widehat{{y}_{i}}}{{y}_{i}}|$$
(24)
$${R}^{2}=1-\frac{\mathop{\sum }\limits_{i=1}^{n}{(\begin{array}{c}{y}_{i}-\widehat{{y}_{i}}\end{array})}^{2}}{\mathop{\sum }\limits_{i=1}^{n}{(\begin{array}{c}{y}_{i}-\overline{{y}_{i}}\end{array})}^{2}}$$
(25)
In the above formulas, \(\widehat{{y}_{i}}\) is the predicted value, \({y}_{i}\) is the true value, \(\overline{{y}_{i}}\) is the sample mean, \(n\) is the number of samples. Among them, RMSE, MAE, MAPE measure the deviation between the predicted value and the real value. Lower values of these metrics indicate reduced prediction errors, thereby reflecting greater accuracy in the results. The coefficient of determination, R2, when approaching 1, indicates a higher degree of model fit, signifying that the predicted values closely align with the real observations, thereby denoting superior model performance.
2. The formulas for the selected classification indicators are shown in Eqs. (26)–(27).
$$Precision=\frac{TP}{TP+FP}$$
(26)
$$Accuracy=\frac{TP+TN}{TP+TN+FP+FN}$$
(27)
In the aforementioned formulas, TP represents true positives, referring to the number of samples correctly predicted as positive by the model; FP denotes false positives, indicating the number of samples incorrectly predicted as positive by the model; TN stands for true negatives, representing the number of samples correctly predicted as negative; and FN signifies false negatives, referring to the number of samples incorrectly predicted as negative. Precision measures the proportion of true positives among all samples predicted as positive, with a higher value indicating greater reliability of the model in predicting positive cases. Accuracy, on the other hand, assesses the overall predictive accuracy of the model, defined as the proportion of correctly predicted samples out of the total number of samples, with a higher value indicating better overall model performance.
BLS-QLSTM, QLSTM and LSTM comparison experiments
In this section, we conduct experimental comparisons using data from three major stock indices—CSI 300, SSEC, and CSI 500—to thoroughly analyze the predictive performance of three models: LSTM, QLSTM, and BLS-QLSTM. The experiments are primarily evaluated along two dimensions: one focuses on the analysis of forecasting evaluation metrics, while the other centers on the analysis of classification evaluation metrics. Stock index price forecasting is fundamentally a time series prediction problem, typically analyzed using forecasting evaluation metrics. However, in practical applications, investors are concerned not only with the accuracy of price forecasting but also with the ability of models to predict market trends. Therefore, we introduce classification evaluation metrics to comprehensively assess the performance of the proposed model across different stock index datasets.
Experimental results of CSI 300 based on various models
(1) Prediction Evaluation Metrics Results
The BLS-QLSTM model performs best on all four evaluation metrics selected for forecasting the CSI 300 index (See Table 4). Compared to the traditional LSTM model, the BLS-QLSTM achieved a 21.6% reduction in RMSE and demonstrated a 6.3% improvement over the QLSTM model, underscoring its significant advantage in accurately capturing market dynamics. The reduction in MAE further confirms the effectiveness of BLS-QLSTM in minimizing prediction bias, while its robust performance in MAPE highlights the precision of model in reflecting stock market volatility. Additionally, the R2 value increased to 0.99570, indicating a high degree of fit in modeling the overall trend of the stock index. The forecasting results of CSI 300 and the overall model presentation are shown in Fig. 7.

A graphical representation of the forecasting result of the CSI 300 Index using three models: LSTM, QLSTM, and BLS-QLSTM.
(2) Classification Evaluation Metrics Results
The classification prediction results for the upward and downward trends of the CSI 300 index demonstrate that the BLS-QLSTM model achieved the best performance in both precision and accuracy metrics (See Table 5). Specifically, the precision of the BLS-QLSTM model reached 0.72505, which is significantly higher than the 0.52401 of the LSTM model and the 0.53579 of the QLSTM model. This indicates that the BLS-QLSTM model has superior accuracy in predicting market uptrends. Additionally, the accuracy of the BLS-QLSTM model was 0.72865, representing an improvement of 23 percentage points compared to the 0.49708 of the LSTM model and an increase of 22 percentage points compared to the 0.51111 of the QLSTM model. These results suggest that the BLS-QLSTM model offers greater reliability and stability in overall trend prediction. A comparison of the confusion matrices for the classification results of the CSI 300 index is illustrated in Fig. 8.

Visualization of the confusion matrix comparison for predicting the CSI 300 Index’s up and down movements based on LSTM, QLSTM, and BLS-QLSTM models. a LSTM Confusion Matrix; b QLSTM Confusion Matrix; c BLS-QLSTM Confusion Matrix.
Experimental results of SSEC based on various models
(1) Prediction Evaluation Metrics Results
The BLS-QLSTM model continues to maintain its leading position in the SSEC forecasting analysis (See Table 6), with a significant reduction in RMSE, being 23.3% lower than that of the LSTM model and 13.3% lower than that of the QLSTM model. This reduction demonstrates the remarkable ability of the model to synthesize market information and enhance the quality of forecasts. The performance of the model on the MAE metric underscores its robustness in reducing mean errors, while the slight variations in the MAPE metric remain within a reasonable range, showcasing the adaptability of the model to specific market conditions. The improvement in the R2 metric to 0.99344 further validates the explanatory power of the BLS-QLSTM model and confirms its utility in market forecasting practice. The forecasting results of SSEC and the overall model presentation are shown in Fig. 9.

A graphical representation of the forecasting result of the SSEC Index using three models: LSTM, QLSTM, and BLS-QLSTM.
(2) Classification Evaluation Metrics Results
In the classification prediction of the SSEC trend, the performance of different models is presented in Table 7. It is evident that the BLS-QLSTM model significantly outperforms the LSTM and QLSTM models in both precision and accuracy, which are two critical metrics. Specifically, in the SSEC trend classification prediction experiment, the BLS-QLSTM model achieved a precision of 0.82102, compared to 0.55789 and 0.53257 for the LSTM and QLSTM models, respectively. Additionally, the BLS-QLSTM model also attained an accuracy of 0.78933, whereas the LSTM and QLSTM models recorded accuracies of 0.53371 and 0.52809, respectively. These results indicate that the BLS-QLSTM model offers higher accuracy and reliability in classifying the SSEC trend, effectively identifying market changes and reducing the occurrence of misclassifications. A comparison of the confusion matrices for the classification results of the SSEC index is shown in Fig. 10.

Visualization of the confusion matrix comparison for predicting the SSEC Index’s up and down movements based on LSTM, QLSTM, and BLS-QLSTM models. a LSTM Confusion Matrix; b QLSTM Confusion Matrix; c BLS-QLSTM Confusion Matrix.
Experimental results of CSI 500 based on various models
(1) Prediction Evaluation Metrics Results
The experimental results of the CSI 500 index highlight the superiority of the proposed BLS-QLSTM model for complex financial data processing (See Table 8). Its RMSE decreases by 36.5% compared to the LSTM model and 19.8% compared to the QLSTM model, this significant reduction not only shows the absolute advantage of the model in reducing the prediction error, but also highlights its insight in mastering the chaotic attributes of the financial market. The significant improvement in MAE and MAPE further confirms the stability and reliability of the BLS-QLSTM model in maintaining the prediction accuracy. The significant improvement in MAE and MAPE further confirms the stability and reliability of the BLS-QLSTM model in maintaining forecast accuracy, and the significant improvement in the R2 of the BLS-QLSTM model to 0.99404 demonstrates the high ability to capture the intrinsic dynamics of the data. The forecasting results of CSI 500 and the overall model presentation are shown in Fig. 11.

A graphical representation of the forecasting result of the CSI 500 Index using three models: LSTM, QLSTM, and BLS-QLSTM.
(2) Classification Evaluation Metrics Results
In the classification prediction experiment for the CSI 500 Index trend, the BLS-QLSTM model once again demonstrated its superior performance (See Table 9). From the perspective of two key classification metrics, precision and accuracy, the BLS-QLSTM model significantly outperformed the LSTM and QLSTM models. Specifically, the BLS-QLSTM model achieved a precision of 0.80079, which is considerably higher than the 0.53047 and 0.55935 recorded by the LSTM and QLSTM models, respectively. Moreover, the BLS-QLSTM model also surpassed the other two models in accuracy, reaching 0.77545, showcasing the exceptional capability of the model in accurately classifying the market trends of the CSI 500 Index. A comparison of the confusion matrices for the classification results of the CSI 500 index is shown in Fig. 12.

Visualization of the confusion matrix comparison for predicting the CSI 500 Index’s up and down movements based on LSTM, QLSTM, and BLS-QLSTM models. a LSTM Confusion Matrix; b QLSTM Confusion Matrix; c BLS-QLSTM Confusion Matrix.
