This repo will compare two different deep learning recurrent neural networks to model bitcoin closing prices. Specifically, this GitHub repository highlights 2 Python Jupyter notebooks, for building and evaluating the two deep learning models.
https://benjaminweymouth.github.io/Neural_Networks_Stock_Predictor/
RNN, or Recurrent Neural networks provide an analysis typically based on modelling sequence data, thanks to their sequential memory. LSTM (Long Short-Term Memory) RNNs are one solution for longer time windows. An LSTM RNN works like an original RNN, but it selects which types of longer-term events are worth remembering, and which can be discarded.
https://benjaminweymouth.github.io/Neural_Networks_Stock_Predictor/LSTMRNN/
Here are some screenshots:
Loading the Two Datasets for Comparative Analysis
Building and Training the LSTM / RNN
This model will use the FNG indicators to predict the closing price while the second model will use a window of closing prices to predict the nth closing price. They use the FNG index values and simple closing prices to determine if the FNG indicator provides a better signal for cryptocurrencies than the normal closing price data.
https://benjaminweymouth.github.io/Neural_Networks_Stock_Predictor/FNG/
Screenshots for the FNG Analysis:
Loading the Historical Prices for BitCoin
Training the Model (with a Batch Size of 5)
Evaluating the Model using the Test Data
This is the final visualization from this analysis. However, let us dig deeper with a few questions and answers about what this comparative analysis reveals.
Answer: The model for the lstm_stock_predictor_closing has a significantly lower loss.
Answer: The model for the lstm_stock_predictor_closing tracks the actual values better over time
Answer: A lower window size works much better. Specifically for the lstm_stock_predictor_closing model, setting the window_size = 2 worked well.