LQ45 Index Stock Market Prediction: A Deep Learning Approach using LSTM with Bayesian Optimization
DOI:
https://doi.org/10.30865/json.v7i2.8925Keywords:
Long Short-Term Memory (LSTM), Bayesian Optimization, Stock Price Prediction, Machine Learning, Financial TechnologyAbstract
This study investigates the application of Long Short-Term Memory (LSTM) models with Bayesian Optimization for predicting stock price movements in the LQ45 Index, a collection of the 45 most liquid stocks on the Indonesia Stock Exchange. The primary objective is to enhance prediction accuracy by addressing the challenges of volatile stock markets and inefficient hyperparameter tuning. Historical data, including daily closing prices from January 2020 to October 2024, was processed using Min-Max Scaling and transformed into time-series input features with a 60-time-step window. Bayesian Optimization was employed to fine-tune key hyperparameters such as LSTM units, dropout rate, and learning rate, optimizing the model's performance. The results revealed that the LSTM model accurately captured trends for stocks with stable price patterns, such as ACES, ASII, and MTEL, achieving low Mean Absolute Percentage Error (MAPE) and Root Mean Square Percentage Error (RMSPE). However, stocks with high volatility, like AMMN and ITMG, exhibited higher prediction errors, indicating limitations in modeling complex patterns. The study highlights that while LSTM with Bayesian Optimization is highly effective for stable stocks, additional preprocessing and advanced modeling techniques are required for volatile stocks. This research demonstrates the potential of machine learning in supporting stock market decision-making, contributing to the development of more robust and efficient financial prediction tools for investors navigating dynamic markets.References
R. Hadi, N. Luh, G. Pivin, I. G. Ngurah, and A. Kusuma, “Implementasi Metode Normalisasi dan Seleksi Fitur dalam Optimasi Algoritma K-Nearest Neighbor ( KNN ) untuk Klasifikasi Data Bank,” vol. 7, no. 5, pp. 1064–1071, 2024.
M. Bansal, A. Goyal, and A. Choudhary, “Stock Market Prediction with High Accuracy using Machine Learning Techniques,” in Procedia Computer Science, Elsevier B.V., 2022, pp. 247–265. doi: 10.1016/j.procs.2022.12.028.
Melina, H. Napitupulu, A. Sambas, A. Murniati, and V. Adimurti Kusumaningtyas, “Artificial Neural Network-Based Machine Learning Approach to Stock Market Prediction Model on the Indonesia Stock Exchange During the COVID-19,” Engineering Letters, vol. 30, no. 3, pp. 1–14, 2022, [Online]. Available: https://www.researchgate.net/publication/362983602
K. Liu, J. Cheng, and J. Yi, “Copper price forecasted by hybrid neural network with Bayesian Optimization and wavelet transform,” Resources Policy, vol. 75, Mar. 2022, doi: 10.1016/j.resourpol.2021.102520.
N. A. Savitri and D. Saepudin, “Deep Learning Implementation for Portfolio Optimization Index Tracking LQ45,” in 2022 1st International Conference on Software Engineering and Information Technology, ICoSEIT 2022, Institute of Electrical and Electronics Engineers Inc., 2022, pp. 12–17. doi: 10.1109/ICoSEIT55604.2022.10029954.
A. Syukur and D. Istiawan, “Prediction of LQ45 Index in Indonesia Stock Exchange: A Comparative Study of Machine Learning Techniques,” International Journal of Intelligent Engineering and Systems, vol. 14, no. 1, pp. 453–463, 2020, doi: 10.22266/IJIES2021.0228.42.
F. Alkaraan, M. Elmarzouky, K. Hussainey, and V. G. Venkatesh, “Sustainable strategic investment decision-making practices in UK companies: The influence of governance mechanisms on synergy between industry 4.0 and circular economy,” Technol Forecast Soc Change, vol. 187, Feb. 2023, doi: 10.1016/j.techfore.2022.122187.
T. Ignatius Ijomah, O. Gloria Eyieyien, C. Idemudia, and P. Okpeke Paul, “The Impact of ICT Projects on Community Development and Promoting Social Inclusion,” 2024. [Online]. Available: www.ijerd.com
E. Do?an, “LSTM training set analysis and clustering model development for short-term traffic flow prediction,” Neural Comput Appl, vol. 33, no. 17, pp. 11175–11188, Sep. 2021, doi: 10.1007/s00521-020-05564-5.
S. Zaheer et al., “A Multi Parameter Forecasting for Stock Time Series Data Using LSTM and Deep Learning Model,” Mathematics, vol. 11, no. 3, Feb. 2023, doi: 10.3390/math11030590.
J. Q. Wang, Y. Du, and J. Wang, “LSTM based long-term energy consumption prediction with periodicity,” Energy, vol. 197, Apr. 2020, doi: 10.1016/j.energy.2020.117197.
I. E. Livieris, N. Kiriakidou, S. Stavroyiannis, and P. Pintelas, “An Advanced CNN-LSTM Model for Cryptocurrency Forecasting,” Electronics (Basel), vol. 10, no. 287, 2021, doi: 10.3390/electronics.
A. Thakkar and K. Chaudhari, “A comprehensive survey on deep neural networks for stock market: The need, challenges, and future directions,” Sep. 01, 2021, Elsevier Ltd. doi: 10.1016/j.eswa.2021.114800.
B. Jiang, H. Gong, H. Qin, and M. Zhu, “Attention-LSTM architecture combined with Bayesian hyperparameter optimization for indoor temperature prediction,” Build Environ, vol. 224, Oct. 2022, doi: 10.1016/j.buildenv.2022.109536.
W. Li, W. W. Wing, T. Wang, M. Pelillo, and S. Kwong, “HELP: An LSTM-based approach to hyperparameter exploration in neural network learning,” Neurocomputing, vol. 442, pp. 161–172, Jun. 2021, doi: 10.1016/j.neucom.2020.12.133.
S. Luo and C. Tian, “Financial high-frequency time series forecasting based on sub-step grid search long short-term memory network,” IEEE Access, vol. 8, pp. 203183–203189, 2020, doi: 10.1109/ACCESS.2020.3037102.
P. Kumar, S. Batra, and B. Raman, “Deep neural network hyper-parameter tuning through twofold genetic approach,” Soft comput, vol. 25, no. 13, pp. 8747–8771, Jul. 2021, doi: 10.1007/s00500-021-05770-w.
K. E. Hoque and H. Aljamaan, “Impact of hyperparameter tuning on machine learning models in stock price forecasting,” IEEE Access, vol. 9, pp. 163815–163830, 2021, doi: 10.1109/ACCESS.2021.3134138.
N. Buslim, I. L. Rahmatullah, B. A. Setyawan, and A. Alamsyah, “Comparing Bitcoin’s Prediction Model Using GRU, RNN, and LSTM by Hyperparameter Optimization Grid Search and Random Search,” in 2021 9th International Conference on Cyber and IT Service Management, CITSM 2021, Institute of Electrical and Electronics Engineers Inc., 2021. doi: 10.1109/CITSM52892.2021.9588947.
st Muhammad Nizar Yoga Pratama, “Multilayer Perceptron and Long Short-Term Memory for Predicting Indonesian Composite Stock Price Index Using Macroeconomic Factors,” in 2019 Fourth International Conference on Informatics and Computing (ICIC) 2019 , 2019, pp. 1–5.
Z. Rustam and P. Kintandani, “Application of Support Vector Regression in Indonesian Stock Price Prediction with Feature Selection Using Particle Swarm Optimisation,” Modelling and Simulation in Engineering, vol. 2019, 2019, doi: 10.1155/2019/8962717.
W. Budiharto, “Data science approach to stock prices forecasting in Indonesia during Covid-19 using Long Short-Term Memory (LSTM),” J Big Data, vol. 8, no. 1, Dec. 2021, doi: 10.1186/s40537-021-00430-0.
A. Lawi, H. Mesra, and S. Amir, “Implementation of Long Short-Term Memory and Gated Recurrent Units on grouped time-series data to predict stock prices accurately,” J Big Data, vol. 9, no. 1, Dec. 2022, doi: 10.1186/s40537-022-00597-0.
C. Alzaman, “Forecasting and optimization stock predictions: Varying asset profile, time window, and hyperparameter factors,” Systems and Soft Computing, vol. 5, Dec. 2023, doi: 10.1016/j.sasc.2023.200052.
X. Du, H. Xu, and F. Zhu, “Understanding the Effect of Hyperparameter Optimization on Machine Learning Models for Structure Design Problems,” CAD Computer Aided Design, vol. 135, Jun. 2021, doi: 10.1016/j.cad.2021.103013.
Y. A. Ali, E. M. Awwad, M. Al-Razgan, and A. Maarouf, “Hyperparameter Search for Machine Learning Algorithms for Optimizing the Computational Complexity,” Processes, vol. 11, no. 2, Feb. 2023, doi: 10.3390/pr11020349.
K. Yang, L. Liu, and Y. Wen, “The impact of Bayesian optimization on feature selection,” Sci Rep, vol. 14, no. 1, Dec. 2024, doi: 10.1038/s41598-024-54515-w.
B. Usman, M. G. Hasnam, R. Nurazi, Baihaqi, and S. Aujirapongpan, “Exploring investor attention in Shariah markets, macroeconomic influences, and corporate performance: Insights from Indonesia,” Social Sciences and Humanities Open, vol. 10, Jan. 2024, doi: 10.1016/j.ssaho.2024.101015.
J. Krohkaew, P. Nilaphruek, N. Witthayawiroj, S. Uapipatanakul, Y. Thwe, and P. N. Crisnapati, “Thailand Raw Water Quality Dataset Analysis and Evaluation,” Data (Basel), vol. 8, no. 9, Sep. 2023, doi: 10.3390/data8090141.
K. Wang, C. Ma, Y. Qiao, X. Lu, W. Hao, and S. Dong, “A hybrid deep learning model with 1DCNN-LSTM-Attention networks for short-term traffic flow prediction,” Physica A: Statistical Mechanics and its Applications, vol. 583, Dec. 2021, doi: 10.1016/j.physa.2021.126293.
D. G. da Silva and A. A. de M. Meneses, “Comparing Long Short-Term Memory (LSTM) and bidirectional LSTM deep neural networks for power consumption prediction,” Energy Reports, vol. 10, pp. 3315–3334, Nov. 2023, doi: 10.1016/j.egyr.2023.09.175.
M. Zulfiqar, K. A. A. Gamage, M. Kamran, and M. B. Rasheed, “Hyperparameter Optimization of Bayesian Neural Network Using Bayesian Optimization and Intelligent Feature Engineering for Load Forecasting,” Sensors, vol. 22, no. 12, Jun. 2022, doi: 10.3390/s22124446.
Z. Chen, B. Wu, B. Li, and H. Ruan, “Expressway Exit Traffic Flow Prediction for ETC and MTC Charging System Based on Entry Traffic Flows and LSTM Model,” IEEE Access, vol. 9, pp. 54613–54624, 2021, doi: 10.1109/ACCESS.2021.3070625.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Padma Nyoman Crisnapati

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

This work is licensed under a Creative Commons Attribution 4.0 International License
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).

