Skip to content

LSTM Model BTC & ETH Price Projections

Figure 1: Actual vs Predicted BTC Prices using LSTM Model version 1

<

What is an LSTM Model?

LSTM (Long Short-Term Memory) is a type of recurrent neural network (RNN) that is particularly well-suited for sequence prediction problems. Unlike traditional neural networks, LSTM networks have feedback connections, allowing them to maintain and utilize information from previous steps in the sequence. This capability is crucial for handling time series data where the order of data points and their historical context are important.

Key Features of LSTM:

  • Memory Cells: LSTM networks have memory cells that can maintain information in memory for long periods, overcoming the limitations of traditional RNNs which struggle with long-term dependencies.

  • Gates: LSTM uses gates (input, forget, and output gates) to regulate the flow of information, ensuring that relevant information is retained and irrelevant information is discarded.

  • Sequences: LSTMs are designed to handle sequential data, making them ideal for time series analysis, speech recognition, and other tasks where the sequence of inputs matters

What is the LSTM Model Trying to Achieve?

The LSTM model aims to accurately predict the future closing prices of BTC based on its historical price data. By learning patterns and trends from the past 60 days, the model attempts to forecast the next two days' prices. This predictive capability can be valuable for traders and investors seeking to make informed decisions based on anticipated price movements. The visualization provides an easy-to-understand representation of the model's performance and predictions, helping users interpret the results and adjust their strategies accordingly.

Added the following enhancements for the following BTC and ETH :

  • Feature Engineering: Added moving averages (MA7, MA21, MA50) to the dataset to provide more context to the model.
  • Handling Missing Data: Filled any missing data using the mean.
  • Early Stopping: Implemented early stopping to prevent overfitting by monitoring the validation loss.
  • Normalization: Normalized all features used in the model.
  • Prediction Adjustments: Included other features in the prediction process and normalized the predictions back to the original scale correctly.

Figure 2: Actual vs Predicted BTC Prices using LSTM Model version 2

Figure 2: Actual vs Predicted ETH Prices using LSTM Model version 2