# Research on a Time Series Data Prediction Model Based on Causal Feature Weight Adjustment
## 4 Experiment
### Experimental Results and Analysis  
Figure 4 shows the stock price prediction graph obtained by our algorithm with 000001.SZ as an example. Tables 4-6 present the comparative results between our approach, the original LSTM model, and the LSTM model after eliminating causal feature factors. The results indicate that our algorithm outperforms in terms of all evaluation metrics for the four stocks. Particularly, Ping An Bank's mean square error has decreased by 39.24%, achieving excellent performance.  
\begin{table}
\begin{tabular}{c c} \hline
**Stock** & **Features that Have a Causal Relationship with X1** \\ \hline
000001.SZ & low, close\_qfq \\
002807.SZ & low, amount \\
002936.SZ & low, high, open \\
002948.SZ & low \\ \hline \end{tabular}
\end{table}
Table 3: Characteristic values in the four stocks that have a causal relationship with the closing price X1.  
The causal feature factors selected for the experiment, represented by variables pointing to the closing price, are all dependent variables that predict the target variable, which is the closing price. Adding these feature values as an additional column to the complete set of features implies increasing the initial weights of features with causal relationships when inputting them into the neural network. After removing features with causal relationships, the predictive performance of three out of four stocks declined, demonstrating the importance of these variables in predicting the closing price. Following the implementation of the new algorithm, the prediction errors of all four stocks decreased, with the smallest prediction error observed among the three stocks. In 002948.SZ stock, the MSE error using our algorithm even dropped by 39%, further validating the effectiveness of our algorithm.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Stock** & **LSTM** & **Remove Causal Factors** & **LWA-LSTM** \\ \hline
000001.SZ & **0.348708** & 0.377324 & 0.352999 \\
002807.SZ & 0.060039 & 0.056817 & **0.055776** \\
002936.SZ & 0.133097 & 0.138641 & **0.119297** \\
002948.SZ & 0.159176 & 0.175881 & **0.150178** \\ \hline \hline \end{tabular}
\end{table}
Table 6: MAE of predicted values under different causal weights.  
Figure 4: Stock price prediction chart of 000001.SZ using the LWA-LSTM algorithm.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Stock** & **LSTM** & **Remove Causal Factors** & **LWA-LSTM** \\ \hline
000001.SZ & 0.195848 & 0.230194 & **0.192025** \\
002807.SZ & 0.007361 & 0.007476 & **0.006347** \\
002936.SZ & 0.033469 & **0.027553** & 0.028261 \\
002948.SZ & 0.076080 & 0.090381 & **0.046225** \\ \hline \hline \end{tabular}
\end{table}
Table 4: MSE of predicted values under different causal weights.  
In previous research, it was widely recognized that features such as the lowest price and highest price have a positive impact on predictive effectiveness. However, there has not been any study analyzing whether this effect is based on correlation or causation. Our research demonstrates that there is a causal relationship between these feature values and the closing price. Additionally, we also provide evidence that boosting the weights of these causal features effectively enhances predictive effectiveness.