Published April 7, 2026 | Version v1

Deep Learning for Emerging Market Stock Prediction: Comparing Long Short-Term Memory and Transformer Architectures Using Indonesian Bank Datasets

  • 1. ROR icon Binus University
  • 2. Software Engineering Program, Computer Science Department, School of Computer Science, Bina Nusantara University, Jakarta, Indonesia

Contributors

  • 1. ROR icon Binus University

Description

Predicting stock prices in developing countries is more challenging because there are more volatility, less historical data, and distinctive features of market microstructures. In this paper, we compare the performances of LSTM and Transformer models in predicting the stock price based on 47 Indonesian bank stocks' datasets from July 2022 to July 2024. Multiple criteria, such as MSE, MAE, RMSE, R², MAPE, and MedAE, were used to evaluate the two models' performances. Experimental results show that LSTM performed better than the Transformer model based on various metrics with lower MSE of 755.93 compared to the Transformer's 5,706.89 for the test set. The LSTM model was found to have better performance in capturing short- and long-term dependencies and had greater robustness when dealing with fluctuating stock prices. Our empirical findings are consistent with recent research indicating that simpler models with inductive bias perform better than more complex models in predicting financial time series. The graphs representing the forecasted values compared to the actual values of stock price proved the better results generated by the LSTM model in predicting future stock prices. The present study adds to the expanding body of literature on the application of deep learning models in developing financial markets.

Files

Files (2.0 MB)

Name Size
md5:2b9b2c1b594bbc6a2f2dd35b567a8871
2.0 MB Download