Comparative Analysis of Activation Functions in LSTM Models for Predicting Bank BNI Stock Prices - Azahra, Astrid Sulistya; Saputra, Moch Panji Agung; Hidayana, Rizki Apriva (International Journal of Global Operations Research, 2025)
The Indonesian capital market has experienced rapid development in the last two decades, with the banking sector as one of the main drivers. Stock price prediction is a crucial aspect for investors and market players to minimize risk and optimize investment strategies. Price fluctuations influenced by fundamental factors, market sentiment, and external conditions make prediction a complex challenge. This study aims to compare the performance of four activation functions: Rectified Linear Unit (ReLU), hyperbolic tangent (Tanh), Sigmoid, and Softplus, in the Long Short-Term Memory (LSTM) model in predicting the stock price of Bank Negara Indonesia (BNI). The method used is a quantitative approach with experiments, using historical data of BNI's closing stock prices for the period May 1, 2020, to April 30, 2025, obtained from Yahoo Finance. The data is processed through cleaning, normalization, transformation into a supervised learning format, and division into training data (80%) and test data (20%). Performance evaluation is carried out using RMSE, MAE, MAPE, and R² metrics. The results showed that the Softplus activation function produced the best performance with RMSE 128.714, MAE 101.815, MAPE 2.358%, and R² 0.924, followed by ReLU which had competitive performance and more efficient training time. The Tanh activation function was in the middle position, while Sigmoid showed the lowest performance. These findings indicate that Softplus and ReLU are optimal choices for BNI stock price prediction using LSTM, with Softplus excelling in accuracy and ReLU providing a balance between performance and efficiency.