Build and evaluate deep learning models using both the FNG Crypto Fear and Greed Index (FNG) values and simple closing prices to determine if the FNG indicator provides a better signal for cryptocurrencies than the normal closing price data.
Use deep learning recurrent neural networks to model bitcoin closing prices. One 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.
- Prepare the data for training and testing
- Build and train custom LSTM RNNs
- Evaluate the performance of each model
Closing Prices Starter Notebook
Use the starter code as a guide to create a Jupyter Notebook for each RNN. The starter code contains a function to create the window of time for the data in each dataset.
For the Fear and Greed model, you will use the FNG values to try and predict the closing price. A function is provided in the notebook to help with this.
For the closing price model, you will use previous closing prices to try and predict the next closing price. A function is provided in the notebook to help with this.
Each model will need to use 70% of the data for training and 30% of the data for testing.
Apply a MinMaxScaler to the X and y values to scale the data for the model.
Finally, reshape the X_train and X_test values to fit the model's requirement of samples, time steps, and features. (example: X_train = X_train.reshape((X_train.shape[0], X_train.shape[1], 1))
)
In each Jupyter Notebook, create the same custom LSTM RNN architecture. In one notebook, you will fit the data using the FNG values. In the second notebook, you will fit the data using only closing prices.
Use the same parameters and training steps for each model. This is necessary to compare each model accurately.
Finally, use the testing data to evaluate each model and compare the performance.
Use the above to answer the following:
Which model has a lower loss?
- LSTM Stock Predictor Using Closing Prices has a lower loss rate.
Which model tracks the actual values better over time?
- Actaul closing prices tracks closer over time.
Which window size works best for the model?
- Lower the window size to optimize both models attached.