Bayesian Optimization for Stock Price Prediction Using LSTM, GRU, Hybrid LSTM-GRU, and Hybrid GRU-LSTM
DOI:
https://doi.org/10.15294/ujm.v13i2.11253Keywords:
Bayesian Optimization, Surrogate Models, Deep Learning, Stock Price PredictionAbstract
Stocks have high price fluctuations, which include high risks and high potential returns for investors. This high potential return has attracted significant interest from investors. This study proposes the use of Bayesian optimization methods with Gaussian Process (GP), Random Forest (RF), Extra Trees (ET), and Gradient Boosted Regression Trees (GBRT) surrogate models to enhance the accuracy of stock price predictions using Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), and hybrid models (LSTM-GRU and GRU-LSTM). This study tests the effectiveness of various combinations of hyperparameters optimized using the Bayesian optimization method. The model optimized with the Bayesian approach and the GP surrogate model demonstrates superior results compared to the others. Evaluation is conducted using Mean Square Error (MSE), Root Mean Square Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and R-squared (R2) metrics. The results indicate that Bayesian optimization with the GP surrogate model for the GRU-LSTM hybrid model outperforms all other methods in terms of MSE, RMSE, MAE, MAPE, and R2. These findings provide significant contributions to parameter selection for stock price prediction and demonstrate the great potential of using Bayesian optimization methods to improve the accuracy of prediction models.