Melola Discovery

← Melola Discovery

Journal

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

Unnes Journal of Mathematics · Vol. 13 No. 2 (2025) · pp. 9–19

DOI
10.15294/ujm.v13i2.11253
ISSN
2460-5859, 2252-6943
Published
2025-06-11
Publisher
Universitas Negeri Semarang
Language
eng

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.

Keywords

Collaboration network of the authors

40 authors · 73 co-authorship links · 2 across different organisations · showing the 40 most connected

Hover or tap a name to highlight its co-authors. Double-click to open the author's page.

  • State University of Semarang
  • Universitas Halu Oleo
  • Universitas Airlangga
  • Affiliation unknown
  • Different organisations
  • Same organisation
  • Affiliation unknown
  • Thicker line = more joint articles · bigger circle = more articles
Show as table
Co-authorOrganisationJoint articles
Zaenuri ZaenuriState University of Semarang3
Fajar Sodik PamungkasAffiliation unknown3
Dedy KurniantoAffiliation unknown3
St. Budi WaluyaAffiliation unknown2
Jannatun Khustia LubisAffiliation unknown2
Alif Aulia RahmanAffiliation unknown2
Mohammad AsikinAffiliation unknown2
Muhammad AshimAffiliation unknown2
Nur HasanahUniversitas Halu Oleo2
Rohimatul AzizahAffiliation unknown2
Bayu Dwi PrasetyaAffiliation unknown2
Fatkhurokhman FauziAffiliation unknown2
MulyonoAffiliation unknown1
Noviana Dini RahmawatiAffiliation unknown1
Alfina AkmalinaAffiliation unknown1
Elya Gita AstutiAffiliation unknown1
Nike Yustina OktavianiAffiliation unknown1
Luthfiyah AstutiningtyasAffiliation unknown1
Riska Nur FitrianingsihAffiliation unknown1
Annisa IkrimahAffiliation unknown1
Supriyono SupriyonoAffiliation unknown1
Mohammad Jefrie Ilham AkbarAffiliation unknown1
Faris Febri RahantoAffiliation unknown1
Muhammad Nurul MuttaqinAffiliation unknown1
Iwan JunaediState University of Semarang1
Sanianajiba Nugroho PutriAffiliation unknown1
Hendrik SutrisnoAffiliation unknown1
Yeni NurochmahAffiliation unknown1
WardonoAffiliation unknown1
MunaAffiliation unknown1
Tri Sri Noor AsihAffiliation unknown1
Rizki Ahid NurhasanahAffiliation unknown1
Petronela Ivoni SusantyAffiliation unknown1
Kartono KartonoUniversitas Airlangga1
Luluk Ulfa ChasaniAffiliation unknown1
Tri Sri Noor AsihAffiliation unknown1
Wardono WardonoAffiliation unknown1
Nurlaela Eka CahyatiAffiliation unknown1

Affiliations come from OpenAlex; journal OAI-PMH metadata carries none. Authors without an OpenAlex ID are matched by name, which can merge or split people.

Metadata source: OAI-PMH (metadata jurnal) https://journal.unnes.ac.id/journals/ujm/oai, first harvested 6 Nov 2026, last seen 8 Nov 2026.
Original metadata (oai_dc)
<oai_dc:dc xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/  http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
	<dc:title xml:lang="en">Bayesian Optimization for Stock Price Prediction Using LSTM, GRU, Hybrid LSTM-GRU, and Hybrid GRU-LSTM</dc:title>
	<dc:creator xml:lang="en">Utami, Mira Dwi</dc:creator>
	<dc:creator xml:lang="en">Kharisudin, Iqbal</dc:creator>
	<dc:subject xml:lang="en">Bayesian Optimization</dc:subject>
	<dc:subject xml:lang="en">Surrogate Models</dc:subject>
	<dc:subject xml:lang="en">Deep Learning</dc:subject>
	<dc:subject xml:lang="en">Stock Price Prediction</dc:subject>
	<dc:description xml:lang="en">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.</dc:description>
	<dc:publisher xml:lang="en">Universitas Negeri Semarang</dc:publisher>
	<dc:date>2025-06-11</dc:date>
	<dc:type>info:eu-repo/semantics/article</dc:type>
	<dc:type>info:eu-repo/semantics/publishedVersion</dc:type>
	<dc:type xml:lang="en">Peer-reviewed Article</dc:type>
	<dc:format>application/pdf</dc:format>
	<dc:identifier>https://journal.unnes.ac.id/journals/ujm/article/view/11253</dc:identifier>
	<dc:identifier>10.15294/ujm.v13i2.11253</dc:identifier>
	<dc:source xml:lang="en">Unnes Journal of Mathematics; Vol. 13 No. 2 (2024): Unnes Journal of Mathematics Volume 2, 2024; 9-19</dc:source>
	<dc:source>2460-5859</dc:source>
	<dc:source>2252-6943</dc:source>
	<dc:source>10.15294/ujm.v13i2</dc:source>
	<dc:language>eng</dc:language>
	<dc:relation>https://journal.unnes.ac.id/journals/ujm/article/view/11253/4369</dc:relation>
	<dc:rights xml:lang="en">Copyright (c) 2024 Unnes Journal of Mathematics</dc:rights>
</oai_dc:dc>