Automated Hyperparameter Search for Stock Price Forecasting Using GA-Optimized 1D-CNN-LSTM and Technical Indicators

Authors

DOI:

https://doi.org/10.21015/vtse.v14i2.2414

Abstract

This study utilizes the capabilities of a 1D-CNN for local feature extraction and LSTM for long-term temporal dependency modeling to forecast the LQ45 stock price index. A Genetic Algorithm (GA) is implemented to optimize the 1D-CNN-LSTM hyperparameters, and the inputs are evaluated using various technical indicators including RSI, EMA, and MACD. For validation, the proposed GA-1D-CNN-LSTM model was evaluated against Hill Climbing (HC) optimization and a baseline 1D-CNN-LSTM under a fair time comparison framework. The results show that the combination of Close and RSI inputs provides the best performance, achieving an RMSE of 8.994 and a MAPE of 0.767%. Furthermore, the Wilcoxon Signed-Rank Test confirms that the proposed approach is statistically significant compared to all baseline and alternative models, with $p$-values well below 0.05. While baseline models may achieve competitive training accuracy, they are highly prone to overfitting. In contrast, the GA-optimized architecture offers superior generalization, demonstrating that a well-optimized model with carefully selected leading indicators can effectively outperform larger but less efficient architectures.

References

T. Naidoo, P. Moores-Pitt, P.-F. Muzindutsi, and K. O. Isah, "Analysing investor sentiment and stock market volatility of the jse size-based indices: a garch-midas approach," Risk Management, vol. 27, no. 3, Aug. 2025.

UNCTAD, Global investment growth resumes, with finance leading the rebound. UN Trade Development (UNCTAD), 2026.

D. K. Padhi, N. Padhy, A. K. Bhoi, J. Shafi, and S. H. Yesuf, "An intelligent fusion model with portfolio selection and machine learning for stock market prediction," Computational Intelligence and Neuroscience, vol. 2022, pp. 1–18, Jun. 2022.

W. Khan, M. A. Ghazanfar, A. Javed, F. U. Khan, Y. A. Shah, and S. Ali, "Stock market prediction using LSTM model on the news and social media data," VFAST Trans. Softw. Eng., vol. 12, no. 4, pp. 117–133, Dec. 2024.

Y. K. Pardeshi and P. P. Kale, "Technical analysis indicators in stock market using machine learning: A comparative analysis," in 2021 12th International Conference on Computing Communication and Networking Technologies (ICCCNT). IEEE, 2021, pp. 1–6.

H. N. Bhandari, B. Rimal, N. R. Pokhrel, R. Rimal, K. R. Dahal, and R. K. Khatri, "Predicting stock market index using LSTM," Machine Learning with Applications, vol. 9, p. 100320, 2022.

T. T. Hoa, T. M. Le, and C. H. Nguyen-Dinh, "Hybrid model of 1d-cnn and lstm for forecasting ethereum closing prices: a case study of temporal analysis," International Journal of Information Technology, vol. 17, no. 7, pp. 3999–4011, Feb. 2025.

H. Widiputra, "Ga-optimized multivariate cnn-lstm model for predicting multi-channel mobility in the covid-19 pandemic," Emerging Science Journal, vol. 5, no. 5, pp. 619–635, Oct. 2021.

S. S. Satpute, A. C. Adamuthe, and P. Bagane, "Stock portfolio optimization using hill climbing and simple human learning optimization algorithms as a decision support system," MethodsX, vol. 14, p. 103413, 2025.

A. Farhadi, A. Zamanifar, A. Alipour, A. Taheri, and M. Asadolahi, "A hybrid lstm-gru model for stock price prediction," IEEE Access, vol. 13, pp. 117594–117618, 2025.

K. Purnomo, R. A. Wijaya, M. Fajar, and P. A. Suri, "Comparative analysis of bilstm deep learning model and random forest regressor performance on indonesian nickel mining company stock prices," Procedia Computer Science, vol. 245, pp. 778–786, 2024.

C. Wang, Y. Chen, S. Zhang, and Q. Zhang, "Stock market index prediction using deep transformer model," Expert Systems with Applications, vol. 208, p. 118128, Dec. 2022.

R. M. Dhokane and O. P. Sharma, "A comprehensive review of machine learning for financial market prediction methods," in 2023 International Conference on Emerging Smart Computing and Informatics (ESCI). IEEE, Mar. 2023, pp. 1–8.

R. M. Dhokane and S. Agarwal, "A predictive model of the stock market using the lstm algorithm with a combination of exponential moving average (ema) and relative strength index (rsi) indicators," Journal of The Institution of Engineers (India): Series B, vol. 105, no. 5, pp. 1145–1157, Mar. 2024.

F. Irwanto, M. F. Hafizh Sasongko, S. Febrian, A. A. Santoso Gunawan, and K. E. Setiawan, "Analyzing nickel stock price prediction: A comparative study of long short-term memory and convolutional neural network models," in 2024 IEEE International Conference on Industry 4.0, Artificial Intelligence, and Communications Technology (IAICT). IEEE, 2024, pp. 229–234.

Z. Zhang, "Deep learning in stock price prediction," in 2025 IEEE 3rd International Conference on Image Processing and Computer Applications (ICIPCA). IEEE, 2025, pp. 415–419.

Y. Yu, S. Wang, H. Ou, Q. Wang, and Y. Quan, "Ga-cnn-lstm based temperature and humidity prediction method," in 2024 11th International Forum on Electrical Engineering and Automation (IFEEA). IEEE, Nov. 2024, pp. 250–254.

S. Cavalli and M. Amoretti, "Cnn-based multivariate data analysis for bitcoin trend prediction," Applied Soft Computing, vol. 101, p. 107065, Mar. 2021.

Y. Hu, "Shanghai stock composite index forecasts: Evidence from arima and lstm," Advances in Economics, Management and Political Sciences, vol. 57, no. 1, pp. 303–308, Jan. 2024.

B. S. Hoon, D. T. Quang, and H. T. Trinh, "Improvement of speed prediction for an urban network under ga-lstm-cnn method," Transportation, 2025.

B. He and E. Kita, "Ga-based optimization of generative adversarial networks on stock price prediction," in 2021 International Conference on Computational Science and Computational Intelligence (CSCI). IEEE, Dec. 2021, pp. 199–202.

S. F. Melanie Mitchell and J. H. Holland, "When will a genetic algorithm outperform hill climbing?" Advances in Neural Information Processing Systems, 1993.

S. M. Mostafavi and A. R. Hooman, "Key technical indicators for stock market prediction," Mach. Learn. Appl., vol. 20, no. 100631, p. 100631, Jun. 2025.

O. Mengshetti, K. Gupta, N. Zade, K. Kotecha, S. Mutha, and G. Joshi, "Synergizing quantitative finance models and market microstructure analysis for enhanced algorithmic trading strategies," J. Open Innov., vol. 10, no. 3, p. 100334, Sep. 2024.

A. Arora, Y. Upadhyay, S. Shukla, and Saket, "Forecasting stock price by LSTM-CNN hybrid model and compares deep learning models," in 2024 IEEE International Conference on Smart Power Control and Renewable Energy (ICSPCRE). IEEE, Jul. 2024, pp. 1–6.

A. Andriyanto, "Sectoral stock prediction using convolutional neural networks with candlestick patterns as input images," International Journal of Emerging Trends in Engineering Research, vol. 8, no. 6, pp. 2249–2252, Jun. 2020.

J. Bao and T. Morimoto, "High-frequency stock price prediction via deep learning," Mach. Learn. Appl., vol. 21, no. 100716, p. 100716, Sep. 2025.

H. Jeong, Y. Shin, J. Lee, and K. Cho, "A 1DCNN-based fine-tuning of the weighing system with GA for the construction equipment," IEEE Access, vol. 13, pp. 189702–189712, 2025.

S. Dash, Y. Li, and W.-L. Sung, "A hybrid 1D-CNN-LSTM technique for WKF-Induced variability of Multi-Channel GAA NS- and NF-FETs," IEEE Access, vol. 11, pp. 56619–56633, 2023.

C. Haas, C. Budin, and A. d'Arcy, "How to select oil price prediction models — the effect of statistical and financial performance metrics and sentiment scores," Energy Econ., vol. 133, no. 107466, p. 107466, May 2024.

M. Melda, M. Mira, and N. Nurlina, "Analysis of the effectiveness of RSI and MACD indicators in addressing stock price volatility," Wiga J. Penelit. Ilmu Ekon., vol. 15, no. 1, pp. 71–79, Mar. 2025.

H. J. Park, Y. Kim, and H. Y. Kim, "Stock market forecasting using a multi-task approach integrating long short-term memory and the random forest framework," Applied Soft Computing, vol. 114, p. 108106, Jan. 2022.

M. Lindauer and F. Hutter, "Best practices for scientific research on neural architecture search," Journal of Machine Learning Research, 2020.

W. Li and K. L. E. Law, "Deep learning models for time series forecasting: A review," IEEE Access, vol. 12, pp. 92306–92327, 2024.

R. Nichani, L. Gasmi, S. Kabou, and N. Laiche, "Novel insights on the comparative study between lstm and transformer models for financial time series prediction," ITEGAM- Journal of Engineering and Technology for Industrial Applications (ITEGAM-JETIA), vol. 11, no. 55, 2025.

Downloads

Published

2026-06-29

How to Cite

Az-Zahra, A. F., Muflikhah, L., & Dewi, C. (2026). Automated Hyperparameter Search for Stock Price Forecasting Using GA-Optimized 1D-CNN-LSTM and Technical Indicators. VFAST Transactions on Software Engineering, 14(2), 431–451. https://doi.org/10.21015/vtse.v14i2.2414

Issue

Section

Articles