Optimisasi Hyperparameter BiLSTM Menggunakan Bayesian Optimization untuk Prediksi Harga Saham

Fandi Presly Simamora, Ronsen Purba, Muhammad Fermi Pasha

Abstract


The accuracy of deep learning models in predicting dynamic and non-linear stock market data highly depends on selecting optimal hyperparameters. However, finding optimal hyperparameters can be costly in terms of the model's objective function, as it requires testing all possible combinations of hyperparameter configurations. This research aims to find the optimal hyperparameter configuration for the BiLSTM model using Bayesian Optimization. The study was conducted using three blue-chip stocks from different sectors, namely BBCA, BYAN, and TLKM, with two scenarios of search iterations. The test results show that Bayesian Optimization was able to find the optimal hyperparameter configuration for the BiLSTM model, with the best MAPE values for each stock: BBCA 1.2092%, BYAN 2.0609%, and TLKM 1.2027%. Compared to previous research on Grid Search-BiLSTM, the use of Bayesian Optimization-BiLSTM resulted in lower MAPE values.

Keywords


BiLSTM; Bayesian Optimization; Hyperparameter Tuning; Stock Price Prediction

Full Text:

PDF

References


S. Srivinay, B. C. Manujakshi, M. G. Kabadi, and N. Naik, “A Hybrid Stock Price Prediction Model Based on PRE and Deep Neural Network,†Data (Basel), vol. 7, no. 5, pp. 1–11, 2022, doi: 10.3390/data7050051.

M. Yang and J. Wang, “Adaptability of Financial Time Series Prediction Based on BiLSTM,†in Procedia Computer Science, Elsevier B.V., 2022, pp. 18–25. doi: 10.1016/j.procs.2022.01.003.

Md. A. I. Sunny, M. M. S. Maswood, and A. G. Alharbi, “Deep Learning-Based Stock Price Prediction Using LSTM and Bi-Directional LSTM Model,†in 2020 2nd Novel Intelligent and Leading Emerging Sciences Conference (NILES), Institute of Electrical and Electronics Engineers Inc., 2020, pp. 87–92. doi: 10.1109/NILES50944.2020.9257950.

N. B. Korade and Mohd. Zuber, “Stock Price Forecasting using Convolutional Neural Networks and Optimization Techniques,†International Journal of Advanced Computer Science and Applications, vol. 13, no. 11, pp. 378–385, 2022, doi: 10.14569/IJACSA.2022.0131142.

H. Song and H. Choi, “Forecasting Stock Market Indices Using The Recurrent Neural Network Based Hybrid Models: CNN-LSTM, GRU-CNN, and Ensemble Models,†Applied Sciences, vol. 13, no. 7, pp. 1–26, 2023, doi: 10.3390/app13074644.

H. N. Bhandari, B. Rimal, N. R. Pokhrel, R. Rimal, K. R. Dahal, and R. K. C. Khatri, “Predicting Stock Market Index Using LSTM,†Machine Learning with Applications, vol. 9, pp. 1–15, 2022, doi: 10.1016/j.mlwa.2022.100320.

M. Ulina, R. Purba, and A. Halim, “Foreign Exchange Prediction using CEEMDAN and Improved FA-LSTM,†in 2020 Fifth International Conference on Informatics and Computing (ICIC), IEEE, 2020, pp. 1–6. doi: 10.1109/ICIC50835.2020.9288615.

D. S. N. Ulum and A. S. Girsang, “Hyperparameter Optimization of Long-Short Term Memory using Symbiotic Organism Search for Stock Prediction,†International Journal of Innovative Research and Scientific Studies, vol. 5, no. 2, pp. 121–133, 2022, doi: 10.53894/ijirss.v5i2.415.

B. Gülmez, “Stock Price Prediction with Optimized Deep LSTM Network with Artificial Rabbits Optimization Algorithm,†Expert Syst Appl, vol. 227, pp. 1–16, 2023, doi: 10.1016/j.eswa.2023.120346.

A. Singh and L. Markande, “Stock Market Forecasting Using LSTM Neural Network,†International Journal of Scientific Research in Computer Science, Engineering and Information Technology, vol. 9, no. 3, pp. 544–554, 2023, doi: 10.32628/cseit23903138.

K. Chen, R. Purba, and A. Halim, “Stock Price Prediction Using XCEEMDAN-Bidirectional LSTM-Spline,†Indonesian Journal of Artificial Intelligence and Data Mining, vol. 5, no. 1, pp. 1–12, 2022, doi: 10.24014/ijaidm.v5i1.14424.

C. Han and X. Fu, “Challenge and Opportunity: Deep Learning-Based Stock Price Prediction by Using Bi-Directional LSTM Model,†Frontiers in Business, Economics and Management, vol. 8, no. 2, pp. 51–54, 2023, doi: 10.54097/fbem.v8i2.6616.

D. I. Puteri, G. Darmawan, and B. N. Ruchjana, “Prediksi Harga Saham Syariah Menggunakan Bidirectional Long Short Term Memory (BiLSTM) dan Algoritma Grid Search,†Jambura Journal of Mathematics, vol. 6, no. 1, pp. 39–45, 2024, doi: 10.37905/jjom.v6i1.23297.

F. Hutter, L. Kotthoff, and J. Vanschoren, “Hyperparameter Optimization,†in Automated Machine Learning, Springer Cham, 2019, ch. Chapter 1, pp. 3–33. [Online]. Available: http://www.springer.com/series/15602

J. Wu, X. Y. Chen, H. Zhang, L. D. Xiong, H. Lei, and S. H. Deng, “Hyperparameter Optimization for Machine Learning Models Based on Bayesian Optimization,†Journal of Electronic Science and Technology, vol. 17, no. 1, pp. 26–40, 2019, doi: 10.11989/JEST.1674-862X.80904120.

P. I. Frazier, “A Tutorial on Bayesian Optimization,†pp. 1–22, 2018, doi: 10.48550/arXiv.1807.02811.

F. P. Samaniego, D. G. Reina, S. L. T. Marin, M. Arzamendia, and D. O. Gregor, “A Bayesian Optimization Approach for Water Resources Monitoring Through an Autonomous Surface Vehicle: The Ypacarai Lake Case Study,†IEEE Access, vol. 9, pp. 9163–9179, 2021, doi: 10.1109/ACCESS.2021.3050934.

S. Hochreiter and J. Schmidhuber, “Long Short Term Memory,†Neural Comput, vol. 9, no. 8, pp. 1735–1780, 1997.

M. Jia, J. Huang, L. Pang, and Q. Zhao, “Analysis and Research on Stock Price of LSTM and Bidirectional LSTM Neural Network,†in Proceedings of the 3rd International Conference on Computer Engineering, Information Science & Application Technology (ICCIA 2019), Atlantis Press, 2019, pp. 467–473. doi: 10.2991/iccia-19.2019.72.

T. Liwei, F. Li, S. Yu, and G. Yuankai, “Forecast of LSTM-XGBoost in Stock Price Based on Bayesian Optimization,†Intelligent Automation and Soft Computing, vol. 29, no. 3, pp. 855–868, 2021, doi: 10.32604/iasc.2021.016805.




DOI: https://doi.org/10.37905/jjom.v7i1.27166



Copyright (c) 2025 Fandi Presly Simamora, Ronsen Purba, Muhammad Fermi Pasha

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.


Jambura Journal of Mathematics has been indexed by

>>>More Indexing<<<


Creative Commons License

Jambura Journal of Mathematics (e-ISSN: 2656-1344) by Department of Mathematics Universitas Negeri Gorontalo is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Powered by Public Knowledge Project OJS. 


Editorial Office


Department of Mathematics, Faculty of Mathematics and Natural Science, Universitas Negeri Gorontalo
Jl. Prof. Dr. Ing. B. J. Habibie, Moutong, Tilongkabila, Kabupaten Bone Bolango, Gorontalo, Indonesia
Email: info.jjom@ung.ac.id.