With the goal of predicting price movement of Bitcoin, two LSTM RNN models will be fit to two separate metrics: the closing price history of Bitcoin, and daily values of the Crypto Fear & Greed Index. This analysis evalutes the predictive performance of the same LSTM RNN model using these two separate data as inputs.
Requires an Anaconda virtual environment running Python >= 3.8.
Activate your Anaconda virtual environment.
conda activate <env>
These installations are required to run the analysis. Newer package versions can be used, but be aware that library updates may cause code errors in the notebook.
pip install numpy==1.20.3
pip install pandas==1.3.4
pip install plotly==5.8.0
pip install scikit-learn==0.24.2
pip install tensorflow==2.9.1
Run the program using your Jupyter Notebook editor of choice.
The FNG model returned a loss of 0.1258
while the Closing Price model had a loss of only 0.0068
. The Closing Price model's loss function is roughly 19 times smaller than the FNG's.
As made evident by the line charts, the Closing Price model tracks real values better over time.
A window of 1 works best for the model as it reduces the loss function and increases the speed of fitting. The tradeoff is that it's only ever predicting one day into the future. If a longer term prediction window were used, the predictions would most likely be less accurate.