Application of Ensemble Transformer-RNNs on Stock Price Prediction of Bank Central Asia


  • Muhammad Rizki Nur Majiid Computer Science Department, BINUS Graduate Program – Master of Computer Science, Bina Nusantara University, Jl. Raya Kebon Jeruk No. 27, Jakarta Barat, 11530, INDONESIA
  • Renaldy Fredyan Computer Science Department, BINUS Graduate Program – Master of Computer Science, Bina Nusantara University, Jl. Raya Kebon Jeruk No. 27, Jakarta Barat, 11530, INDONESIA
  • Gede Putra Kusuma Computer Science Department, BINUS Graduate Program – Master of Computer Science, Bina Nusantara University, Jl. Raya Kebon Jeruk No. 27, Jakarta Barat, 11530, INDONESIA


Stock Prediction, Deep Learning, Transformer Model, Multi-Head Attention Mechanism, Ensemble Model


Breaking news information about the stock market is gathered from numerous finance websites. Internet portals offer free financial information about businesses. The impact of significant financial reforms, the environment, natural disasters, and news events on the stock market is minimal. The online financial platform generates many time series data. Additionally, we include data from the USD, CNY, Gold, and Oil unrelated to the stock share but relevant. With the use of various machine learning algorithms, market reforms are projected. Those datasets are collected from yahoo finance and, along with other stock market aspects. These models are trained to utilize an extended dataset, including open price, close price, low price, high price, and volume, from Bank Central Asia’s stock price. The Ensemble Transformer LSTM (ET-LSTM) and Ensemble Transformer GRU (ET-GRU) architecture forecast the stock price for the following day. The data set is improved using a variety of deep learning approaches to get more accurate findings. Both suggested approaches use ensemble architecture to deliver 9% of MAPE. Market movements are perfectly aligned in terms of high and low stock prices. Algorithms for high-frequency trading can further enhance the outcomes.


Download data is not yet available.


Y. Baek and H. Y. Kim, “ModAugNet: A new forecasting framework for stock market index value with an overfitting prevention LSTM module and a prediction LSTM module,” Expert Syst. Appl., vol. 113, pp. 457–480, 2018, doi: 10.1016/j.eswa.2018.07.019.

D. T. N. Huy, B. T. T. Loan, and P. T. Anh, “Impact of selected factors on stock price: A case study of Vietcombank in Vietnam,” Entrep. Sustain. Issues, vol. 7, no. 4, pp. 2715–2730, 2020, doi: 10.9770/jesi.2020.7.4(10).

S. Smith and A. O’Hare, “Comparing traditional news and social media with stock price movements; which comes first, the news or the price change?,” J. Big Data, vol. 9, no. 1, p. 47, 2022, doi: 10.1186/s40537-022-00591-6.

V. Ingle and S. Deshmukh, “Ensemble deep learning framework for stock market data prediction (EDLF-DP),” Glob. Transitions Proc., vol. 2, no. 1, pp. 47–66, 2021, doi: 10.1016/j.gltp.2021.01.008.

A. A. Adebiyi, A. O. Adewumi, and C. K. Ayo, “Comparison of ARIMA and Artificial Neural Networks Models for Stock Price Prediction,” J. Appl. Math., vol. 2014, p. 614342, 2014, doi: 10.1155/2014/614342.

J. B. Heaton, N. G. Polson, and J. H. Witte, “Deep learning for finance: deep portfolios,” Appl. Stoch. Model. Bus. Ind., vol. 33, no. 1, pp. 3–12, Jan. 2017, doi:

H. Yu, R. Chen, and G. Zhang, “A SVM Stock Selection Model within PCA,” Procedia Comput. Sci., vol. 31, pp. 406–412, 2014, doi:

D. A. Puspitasari and Z. Rustam, “Application of SVM-KNN using SVR as feature selection on stock analysis for Indonesia stock exchange,” AIP Conf. Proc., vol. 2023, no. October 2018, 2018, doi: 10.1063/1.5064204.

D. Oreski, S. Oreski, and B. Klicek, “Effects of dataset characteristics on the performance of feature selection techniques,” Appl. Soft Comput., vol. 52, pp. 109–119, 2017, doi:

L. Takeuchi and Y. Lee, “Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks,” Cs229.Stanford.Edu, no. December 1989, pp. 1–5, 2013.

Y. Chen, W. Lin, and J. Z. Wang, “A Dual-Attention-Based Stock Price Trend Prediction Model With Dual Features,” IEEE Access, vol. 7, pp. 148047–148058, 2019, doi: 10.1109/ACCESS.2019.2946223.

F. Wang, “Predicting S&P 500 Market Price by Deep Neural Network and Enemble Model,” E3S Web Conf., vol. 214, p. 2040, Jan. 2020, doi: 10.1051/e3sconf/202021402040.

C. Liang, Y. Zhang, and Y. Zhang, “Forecasting the volatility of the German stock market: New evidence,” Appl. Econ., vol. 54, no. 9, pp. 1055–1070, Feb. 2022, doi: 10.1080/00036846.2021.1975027.

S. Song and H. Li, “Predicting VaR for China’s stock market: A score-driven model based on normal inverse Gaussian distribution,” Int. Rev. Financ. Anal., vol. 82, p. 102180, 2022, doi:

A. Sharang and C. Rao, “Using machine learning for medium frequency derivative portfolio trading,” 2015.

X. Teng, X. Zhang, and Z. Luo, “Neurocomputing Multi-scale local cues and hierarchical attention-based LSTM for stock price trend prediction,” Neurocomputing, vol. 505, pp. 92–100, 2022, doi: 10.1016/j.neucom.2022.07.016.

M. Dixon, D. Klabjan, and J. H. Bang, “Classification-based financial markets prediction using deep neural networks,” Algorithmic Financ., vol. 6, no. 3–4, pp. 67–77, 2017, doi: 10.3233/AF-170176.

A. M. El-Masry, M. F. Ghaly, M. A. Khalafallah, and Y. A. El-Fayed, “Deep Learning for Event-Driven Stock Prediction Xiao,” J. Sci. Ind. Res. (India)., vol. 61, no. 9, pp. 719–725, 2002.

C. A. S. Assis, A. C. M. Pereira, E. G. Carrano, R. Ramos, and W. Dias, “Restricted Boltzmann Machines for the Prediction of Trends in Financial Time Series,” in 2018 International Joint Conference on Neural Networks (IJCNN), 2018, pp. 1–8. doi: 10.1109/IJCNN.2018.8489163.

S. Rönnqvist and P. Sarlin, “Bank distress in the news: Describing events through deep learning,” Neurocomputing, vol. 264, pp. 57–70, 2017, doi:

H. Y. Kim and C. H. Won, “Forecasting the volatility of stock price index: A hybrid model integrating LSTM with multiple GARCH-type models,” Expert Syst. Appl., vol. 103, pp. 25–37, 2018, doi:

S. S. Roy, D. Mittal, A. Basu, and A. Abraham, “Stock Market Forecasting Using LASSO Linear Regression Model BT - Afro-European Conference for Industrial Advancement,” 2015, pp. 371–381.

Y. Yan and D. Yang, “A Stock Trend Forecast Algorithm Based on Deep Neural Networks,” Sci. Program., vol. 2021, p. 7510641, 2021, doi: 10.1155/2021/7510641.

Y. Liu, C. Gong, L. Yang, and Y. Chen, “DSTP-RNN: A dual-stage two-phase attention-based recurrent neural network for long-term and multivariate time series prediction,” Expert Syst. Appl., vol. 143, p. 113082, 2020, doi: 10.1016/j.eswa.2019.113082.

W. Lu, J. Li, J. Wang, and L. Qin, “A CNN-BiLSTM-AM method for stock price prediction,” Neural Comput. Appl., vol. 0123456789, 2020, doi: 10.1007/s00521-020-05532-z.

A. F. Kamara, E. Chen, and Z. Pan, “An ensemble of a boosted hybrid of deep learning models and technical analysis for forecasting stock prices,” Inf. Sci. (Ny)., vol. 594, pp. 1–19, 2022, doi: 10.1016/j.ins.2022.02.015.

Z. Dai, H. Zhou, and X. Dong, “Forecasting stock market volatility: The role of gold and exchange rate,” AIMS Math., vol. 5, no. 5, pp. 5094–5105, 2020, doi: 10.3934/math.2020327.

M. Alhamid, “Ensemble Models: A guide to learning ensemble techniques in a simple walkthrough,” Towards Data Science, 2021.

The architecture of ET-RNN combined with CNN using ensemble architecture.




How to Cite

M. . Rizki Nur Majiid, R. . Fredyan, and G. . Putra Kusuma, “Application of Ensemble Transformer-RNNs on Stock Price Prediction of Bank Central Asia”, Int J Intell Syst Appl Eng, vol. 11, no. 2, pp. 471–477, Feb. 2023.



Research Article