Smarter Markets with AI: How LSTM and GRU Redefine Stock Price Prediction

MAKASSAR, Indonesia – Apr 1 2026/DSAI/ — Predicting stock prices has always been a complex and risky task, influenced by countless variables and rapid market changes. However, a recent study demonstrates how artificial intelligence (AI), particularly deep learning models, can significantly improve prediction accuracy by learning patterns hidden within financial time-series data.

The research explores the use of two advanced Recurrent Neural Network (RNN) architectures—Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU)—to forecast stock prices more effectively. Unlike traditional models, these algorithms are designed to remember long-term dependencies in sequential data, making them especially suitable for analyzing stock market trends .

The study uses extensive historical data from Yahoo Finance, covering multiple companies over a 12-year period. According to the data description on page 5, each company contributes over 15,000 data points, including open, high, low, close prices, and trading volume . Among these, the closing price is identified as the most critical feature, as it reflects the final consensus of market activity at the end of each trading day (page 6) .

What makes this research particularly innovative is its grouped time-series approach. Instead of analyzing each stock independently, the model first learns patterns from individual stocks and then combines them into a unified representation. This allows the system to capture relationships between different stocks—something that traditional models often overlook (page 7) .

The researchers developed four architectural models, ranging from simple direct models to more advanced designs with dimensional reduction, dropout tuning, and stabilization layers (pages 8–9) . These variations were tested using three evaluation metrics—MAPE, RMSPE, and RMDPE—to measure accuracy, average performance, and risk levels.

The results are striking. According to the evaluation results on page 17, the GRU-based models consistently outperform LSTM, achieving up to 98.48% accuracy during training and 97.37% during testing . Meanwhile, LSTM models demonstrate more stable and consistent predictions, with lower variance across different scenarios.

This research contributes strongly to multiple Sustainable Development Goals (SDGs). It supports SDG 9: Industry, Innovation, and Infrastructure by advancing AI-driven financial technologies. It also aligns with SDG 8: Decent Work and Economic Growth, as improved forecasting tools can help investors and businesses make more informed financial decisions. Additionally, it contributes to SDG 17: Partnerships for the Goals, reflecting collaborative academic research across institutions.

Ultimately, the study highlights an important insight: accurate stock prediction is not just about choosing the right algorithm, but about designing intelligent architectures that capture real-world complexity. By combining LSTM and GRU with grouped time-series learning, this research brings us one step closer to more reliable and practical AI-driven financial systems.

Article Metadata (Source of This Popular Scientific Writing):
Title: Implementation of Long Short-Term Memory and Gated Recurrent Units on Grouped Time-Series Data to Predict Stock Prices Accurately
Journal: Journal of Big Data
Publisher: Springer Nature
Publication Date: 2022 (Volume 9, Article 89)
DOI: https://doi.org/10.1186/s40537-022-00597-0

Authors & Contact:
Armin Lawi*, Hendra Mesra, Supri Amir
Hasanuddin University, Indonesia & collaborating institutions
E-mail: armin@unhas.ac.id

This study shows that the future of financial forecasting lies in intelligent collaboration—not just between investors, but between algorithms themselves.