Claim Missing Document
Check
Articles

Found 1 Documents
Search
Journal : Journal of Computing Theories and Applications

Attention-Augmented GRU for Stock Forecasting: A Trade-Off Between Directional Accuracy and Price Prediction Error R. Daniel Hartanto; Guruh Fajar Shidik; Farrikh Alzami; Ahmad Zainul Fanani; Aris Marjuni; Abdul Syukur
Journal of Computing Theories and Applications Vol. 3 No. 4 (2026): JCTA 3(4) 2026
Publisher : Universitas Dian Nuswantoro

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.62411/jcta.15863

Abstract

Attention mechanisms have been widely incorporated into recurrent neural network architectures for financial time series forecasting, with most prior work reporting improvements in price-level error metrics. This study revisits that claim through a controlled empirical comparison of four deep learning architectures on nearly two decades of Telkom Indonesia (TLKM) closing price data from the Indonesia Stock Exchange (IDX). The models evaluated are a three-layer Gated Recurrent Unit (GRU) baseline, a comparable Long Short-Term Memory (LSTM) network, a Bahdanau end-attention GRU (Attn-GRU-V2), and a multi-head self-attention GRU hybrid (Attn-GRU-V3). Each architecture is trained over 30 independent runs with distinct random seeds, and performance is reported as 95% confidence intervals derived from the t-distribution. Statistical comparisons employ the Wilcoxon signed-rank test, a nonparametric paired test appropriate given the confirmed non-normality of residuals. The main finding is a consistent trade-off: the plain GRU achieves the lowest RMSE (94.02 ± 1.22 IDR) across all 30 runs, while Attn-GRU-V2 achieves the highest directional accuracy (45.91 ± 0.09%), surpassing GRU in every independent run. Bahdanau attention weights are nearly uniform across the 30-day lookback window (coefficient of variation: 3.21%), indicating that the mechanism cannot identify selectively informative timesteps in this univariate price series. This finding is consistent with the weak-form Efficient Market Hypothesis for the Indonesian market. An ablation study reveals that a 20-day lookback window maximizes directional accuracy (47.72 ± 0.21%) for the Attn-GRU-V2 model. These results suggest that Bahdanau end-attention consistently and significantly improves directional accuracy relative to a plain GRU baseline, providing an architecturally attributable advantage for direction-based applications, even when absolute price-level error is not reduced. The directional accuracy values remaining below 50% across all models are consistent with a weak-form efficiency characterization of the Indonesian market.
Co-Authors Abdul Syukur Abdussalam Abdussalam, Abdussalam Affandy Affandy Ahmad Zainul Fanani Aisyatul Karima Alzami, Farrikh Andrean, Muhammad Niko Andreas Wilson Setiawan Anggraini, Fitria Anhsori, Khusman Aris Marjuni Astuti, Yani Parti Azzahra, Tarissa Aura Budi Harjo Cahaya Jatmoko Catur Supriyanto Catur Supriyanto Catur Supriyanto Catur Supriyanto Chaerul Umam Chaerul Umam Christy Atika Sari Dewi Pergiwati Dliyauddin, Muhammad Doheir, Mohamed Dwi Eko Waluyo Dwi Puji Prabowo, Dwi Puji Dzaky, Azmi Abiyyu Edi Noersasongko Egia Rosi Subhiyakto, Egia Rosi Eko Hari Rachmawanto Elkaf Rahmawan Pramudya Erlin Dolphina Erna Zuni Astuti Fafaza, Safira Alya Fajrian Nur Adnan Fakhrurrozi Fakhrurrozi, Fakhrurrozi Harun Al Azies Hayu Wikan Kinasih Heru Lestiawan I Ketut Eddy Purnama Ika Pantiawati Islam, Hussain Md Mehedul Junta Zeniarja Kusuma, Edi Jaya Kusumawati, Yupie L. Budi Handoko Lenci Aryani Megantara, Rama Aria Mochamad Hariadi Muhammad Huda, Alam Muhammad Naufal Ningrum, Amanda Prawita Nurmandhani, Ririn Paramita, Cinantya Pergiwati, Dewi Praskatama, Vincentius Pujiono Pujiono Pulung Nurtantio Andono Purwanto Purwanto Putra, Permana Langgeng Wicaksono Ellwid R. Daniel Hartanto Rafsanjani, Muhammad Ivan Rahadian, Arief Ramadhan Rakhmat Sani Ramadhani, Irfan Wahyu Rastri Prathivi Ratmana, Danny Oka Ricardus Anggi Pramunendar Riri Damayanti Apnena Rohman, Muhammad Syaifur Rusmal Firmansyah Saputra, Filmada Ocky Saraswati, Galuh Wilujeng Sarker, Md. Kamruzzaman Savicevic, Anamarija Jurcev Shier Nee Saw Sinaga, Daurat Sindhu Rakasiwi Soeleman, M. Arief Sri Winarno Swanny Trikajanti Widyaatmadja Vincent Suhartono Wahyu Adi Nugroho Wellia Shinta Sari Winarsih, Nurul Anisa Sri Yaacob, Noorayisahbe Mohd Yani Parti Astuti Zainal Arifin Hasibuan Zami, Farrikh Al Zul Azri bin Muhamad Noh