Unnes Journal of Mathematics
Vol. 13 No. 2 (2024): Unnes Journal of Mathematics Volume 2, 2024

Bayesian Optimization for Stock Price Prediction Using LSTM, GRU, Hybrid LSTM-GRU, and Hybrid GRU-LSTM

Utami, Mira Dwi (Unknown)
Kharisudin, Iqbal (Unknown)



Article Info

Publish Date
11 Jun 2025

Abstract

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.

Copyrights © 2024






Journal Info

Abbrev

ujm

Publisher

Subject

Education Mathematics

Description

Unnes Journal of Mathematics is published by Universitas Negeri Semarang. This Journal receives and publishes research articles and development in mathematics theories and their ...