Time Series Stock Price Forecasting Based on Genetic Algorithm (GA)-Long Short-Term Memory Network (LSTM) Optimization

Xinye Sha
2024-05-06
Abstract:In this paper, a time series algorithm based on Genetic Algorithm (GA) and Long Short-Term Memory Network (LSTM) optimization is used to forecast stock prices effectively, taking into account the trend of the big data era. The data are first analyzed by descriptive statistics, and then the model is built and trained and tested on the dataset. After optimization and adjustment, the mean absolute error (MAE) of the model gradually decreases from 0.11 to 0.01 and tends to be stable, indicating that the model prediction effect is gradually close to the real value. The results on the test set show that the time series algorithm optimized based on Genetic Algorithm (GA)-Long Short-Term Memory Network (LSTM) is able to accurately predict the stock prices, and is highly consistent with the actual price trends and values, with strong generalization ability. The MAE on the test set is 2.41, the MSE is 9.84, the RMSE is 3.13, and the R2 is 0.87. This research result not only provides a novel stock price prediction method, but also provides a useful reference for financial market analysis using computer technology and big data.
Computational Engineering, Finance, and Science,Artificial Intelligence
What problem does this paper attempt to address?
The paper aims to address the problem of stock price prediction. Specifically, the authors propose a time series algorithm based on a Genetic Algorithm (GA) optimized Long Short-Term Memory Network (LSTM) for effectively predicting stock prices, considering the characteristics of data in the era of big data. The main contributions of the paper are as follows: 1. **Innovative Method**: Combining GA and LSTM technologies, the GA is used to optimize the hyperparameters of the LSTM model, thereby improving the model's performance and generalization ability. 2. **Experimental Validation**: The proposed method's effectiveness is validated by training and testing on actual stock datasets. The results show that this method performs excellently in predicting stock prices, with high consistency with actual price trends and values, demonstrating strong generalization ability. 3. **Evaluation Metrics**: On the test set, the model's Mean Absolute Error (MAE) is 2.41, Mean Squared Error (MSE) is 9.84, Root Mean Squared Error (RMSE) is 3.13, and the Coefficient of Determination (R²) is 0.87, indicating that the method has high prediction accuracy and reliability. In summary, this research not only provides a novel method for stock price prediction but also demonstrates the advantages of combining the global search capability of Genetic Algorithms with the time series modeling capability of LSTM. In the context of current computer technology and big data, it has significant implications for improving the prediction level of financial markets.