Effect of Price Volatility on LSTM Lookback Windows in Indonesian Banking Stocks
DOI:
https://doi.org/10.21512/emacsjournal.v8i1.15388Keywords:
Long Short-Term Memory (LSTM), Stock Prices Prediction, Stock Prices Volatility, Indonesian Stock ExchangeAbstract
This study aims to explore how stock price volatility influences the sequence length or also known as lookback window hyperparameter of LSTM. This study uses a comparative approach to determine the relationship between stock prices volatility and the best lookback window to achieve the lowest error rate of an LSTM model in predicting stock prices. Nine selected stocks in the banking sector of Indonesia Stock Exchange were compared, ranging from relatively stable to volatile. The banking sector was used as it contains multiple stocks under the same sector that varies in price movement volatility. An aggregation was also conducted to produce grouped results. The results of this study highlighted the importance of hyperparameter tuning in LSTM especially in the lookback window hyperparameter. Shorter LSTM lookback window is well suited in low volatility stocks, with the lowest mean squared error rate of 0.030782 observed in this study at the 42 trading days lookback period. In contrast to that, highly volatile stocks exhibit a different pattern, where longer lookback period improves LSTM prediction performance, as demonstrated in this study through a 0.016001 mean squared error at the 252 trading days lookback period. The findings imply that high volatility stocks require longer temporal memory in the LSTM to capture complex and irregular price movements, whereas low volatility stocks are better modelled using shorter and more recent information.
References
Ayitey Junior, M., Appiahene, P., & Appiah, O. (2022). Forex market forecasting with two-layer stacked Long Short-Term Memory neural network (LSTM) and correlation analysis. Journal of Electrical Systems and Information Technology, 9(1). https://doi.org/10.1186/s43067-022-00054-1
Berrajaa, A. (2022). Natural Language Processing for the Analysis Sentiment using a LSTM Model. (IJACSA) International Journal of Advanced Computer Science and Applications, 13(5). www.ijacsa.thesai.org
Cohen, G. (2022). Algorithmic Trading and Financial Forecasting Using Advanced Artificial Intelligence Methodologies. Mathematics, 10(18). https://doi.org/10.3390/math10183302
Deshpande, V. (2023). Implementation of Long Short-Term Memory (LSTM) Networks for Stock Price Prediction. Research Journal of Computer Systems and Engineering, 4(2), 60–72. https://doi.org/10.52710/rjcse.74
El Hajj, M., & Hammoud, J. (2023). Unveiling the Influence of Artificial Intelligence and Machine Learning on Financial Markets: A Comprehensive Analysis of AI Applications in Trading, Risk Management, and Financial Operations. Journal of Risk and Financial Management, 16(10). https://doi.org/10.3390/jrfm16100434
Gong, W. (2024). Research on gold price forecasting based on lstm and linear regression. SHS Web of Conferences, 181, 02005. https://doi.org/10.1051/shsconf/202418102005
Handharu Sworo, T., & Hermawan, A. (2024). Analysis and Prediction of Indonesia Stock Exchange (IDX) Stock Prices Using Long Short Term Memory (LSTM) Algorithm. Journal of Computer Science and Technology Studies. https://doi.org/10.32996/jcsts
Joddy, S. (2025). Comparative Analysis of CNN, LSTM, and CNN-LSTM for Indonesian Stock Prediction. JURNAL EMACS (Engineering, MAthematics and Computer Science), 7(3), 283–289. https://doi.org/10.21512/emacsjournal.v6
Mulyani, S., & Ilham, W. (2025). Application of LSTM-Based Deep Learning for Stock Return Prediction of DCII. Sinkron : Jurnal Dan Penelitian Teknik Informatika, 9(4), 2336–2345. https://doi.org/10.33395/sinkron.v9i4.15353
Öztürk, M. M. (2023). Hyperparameter Optimization of a Parallelized LSTM for Time Series Prediction. Vietnam Journal of Computer Science, 10(3), 303–328. https://doi.org/10.1142/S2196888823500033
Pahlevi, M. R., Kusrini, K., & Hidayat, T. (2023). Comparison of LSTM and GRU Models for Forex Prediction. Sinkron : Jurnal Dan Penelitian Teknik Informatika, 8(4), 2254–2263. https://doi.org/10.33395/sinkron.v8i4.12709
Soni, P., Tewari, Y., & Krishnan, D. (2022). Machine Learning Approaches in Stock Price Prediction: A Systematic Review. Journal of Physics: Conference Series, 2161(1). https://doi.org/10.1088/1742-6596/2161/1/012065
Wang, J., Hong, S., Dong, Y., Li, Z., & Hu, J. (2024). Predicting Stock Market Trends Using LSTM Networks: Overcoming RNN Limitations for Improved Financial Forecasting. Journal of Computer Science and Software Applications. https://www.mfacademia.org/
Xu, Z. (2024). Factors Influencing the Predictive Performance of the LSTM Model on Stock Prices and Its Application in Forecasting U.S. Technology Sector Stock Prices — Sample Time Span, Time Window Length, Feature Selection, and Prediction Days. ACM International Conference Proceeding Series, 370–375. https://doi.org/10.1145/3700906.3700964
Yan, K., & Li, Y. (2024). Machine learning-based analysis of volatility quantitative investment strategies for American financial stocks. Quantitative Finance and Economics, 8(2), 364–386. https://doi.org/10.3934/QFE.2024014
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Joan Christina Bahagiono

This work is licensed under a Creative Commons Attribution-ShareAlike 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 a Creative Commons Attribution License - Share Alike 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.
USER RIGHTS
All articles published Open Access will be immediately and permanently free for everyone to read and download. We are continuously working with our author communities to select the best choice of license options, currently being defined for this journal as follows: Creative Commons Attribution-Share Alike (CC BY-SA)


