Predicting Pfizer Stock Price using LSTM and Bi-LSTM Latifa Ega Nadhira (a), Dina Tri Utari (a*)
a) Department of Statistics, Universitas Islam Indonesia, Jl. Kaliurang KM 14.5, Sleman, Yogyakarta, Indonesia
* dina.t.utari[at]uii.ac.id
Abstract
The availability of enormous amounts of data and the rapid development of artificial intelligence and machine learning techniques make it possible to create sophisticated stock price prediction algorithms. Meanwhile, the stock market is now more challenging to understand and volatile than ever due to the ready availability of investing options. The globe is searching for a precise and trustworthy forecasting model that can capture the highly volatile and nonlinear market behavior in an all-encompassing framework. One of the stock prices that increased during the Covid-19 pandemic was Pfizer Inc., a healthcare sector company that produces the Covid-19 vaccine with claims of having a high level of effectiveness. This study aims to determine the application of LSTM and Bi-LSTM in predicting Pfizer Inc.^s stock price uses daily close prices from January 2018 to January 2022. By dividing training data by 80% and testing data by 20%, the best model for LSTM is obtained using neurons ten and epoch 1000, while Bi-LSTM uses neurons 20 and 500. The experimental findings demonstrate that, compared to Bi-LSTM models, the single-layer LSTM model offers a higher fit and excellent prediction accuracy.