Jurnal Sains, Teknologi dan Komputer
Vol. 3 No. 1 (2026): Jurnal Sains, Teknologi & Komputer (SAINTEK)

Apple Inc. (AAPL) stock price forecasting using a stacked long short-term memory model with Yahoo Finance data

Prayoga Sungkowo (Universitas Muhammadiyah Sumatera Utara)
Al-Khowarizmi Al-Khowarizmi (Universitas Muhammadiyah Sumatera Utara)



Article Info

Publish Date
30 Apr 2026

Abstract

Stock price prediction is a complex time-series problem because price movements are dynamic and exhibit temporal patterns. This study aims to implement and evaluate a Long Short-Term Memory (LSTM) model for forecasting the closing price of Apple Inc. (AAPL) stock using historical data obtained from Yahoo Finance for the 2022–2024 period. The data were preprocessed using Min-Max Scaling, transformed into sequences with a 60-day time step, and chronologically divided into 80% training data and 20% testing data. The model employed two LSTM layers with a dropout rate of 0.2, the Adam optimizer, and Mean Squared Error as the loss function. The evaluation results yielded a Root Mean Squared Error (RMSE) of 3.31 and a Mean Absolute Error (MAE) of 2.68. The visualization indicates that the predicted values generally follow the actual price trend, although deviations occur during several periods of sharper price changes. These findings indicate that the LSTM model can learn temporal patterns in AAPL closing prices and generate forecasts that approximate the actual values.

Copyrights © 2026






Journal Info

Abbrev

SAINTEK

Publisher

Subject

Agriculture, Biological Sciences & Forestry Chemistry Computer Science & IT Control & Systems Engineering Decision Sciences, Operations Research & Management

Description

Jurnal SAINTEK adalah singkatan dari Sains, Teknologi dan Komputer, yang diterbitkan oleh Lembaga Riset Mutiara Akbar (LARISMA), merupakan jurnal ilmiah yang berfungsi sebagai media mengkomunikasikan ide, gagasan dan pemikiran seputar kajian aktual tentang sains, teknologi, komputer dan manajemen IT ...