Predicting Bitcoin Prices Using Long Short-Term Memory (LSTM) in Time Series

  • Dwi Budi Santoso
  • Arief Jananto
  • Dewi Handayani U.N.
  • Jeffri Alfa Razaq
Keywords: Bitcoin, Long Short-Term Memory (LSTM), Time Series Analysis, Price Prediction

Abstract

This study aim to predict Bitcoin prices using Long Short-Term Memory (LSTM) in a time series analysis. The dataset used in this research is obtained from Yahoo Finance, covering the period from January 1, 2017, to December 31, 2022. The LSTM model is trained on this dataset to capture the patterns and trends in Bitcoin price movements. The data undergoes preprocessing, including feature selection where only the date and closing price columns are retained. The closing price column is transformed into the "Price" variable. The dataset is then normalized using the Min-Max scaler. It is split into training and testing sets to evaluate the model's performance. The LSTM model architecture comprises multiple layers with dropout regularization to prevent overfitting. The model is trained on the training set and evaluated on the testing set. The experimental results demonstrate that the LSTM model successfully predicts Bitcoin prices with low loss and mean absolute percentage error (MAPE). The achieved test loss of 0.00492361793294549 indicates the model's ability to accurately predict Bitcoin prices. The MAPE of 0.11878698834238316 highlights the model's low average percentage error in predicting Bitcoin price changes. These results indicate that the LSTM model effectively captures the complex temporal dependencies in Bitcoin's time series data, resulting in accurate price predictions.

Keywords: Bitcoin, Long Short-Term Memory (LSTM), Time Series Analysis, Price Prediction.

Published
2023-07-27
Section
Articles