Files
drift/exploration.ipynb
T

310 KiB

In [7]:
from load_data import load_files
import pandas as pd
from pandas.plotting import lag_plot
import seaborn as sns
import matplotlib.pyplot as plt

data = load_files('data', False)
data.info()
<class 'pandas.core.frame.DataFrame'>
Index: 1501 entries, 2017-10-02 to 2021-11-10
Data columns (total 21 columns):
 #   Column       Non-Null Count  Dtype  
---  ------       --------------  -----  
 0   BTC_returns  1500 non-null   float64
 1   TRX_returns  1500 non-null   float64
 2   XRP_returns  1500 non-null   float64
 3   IEF_volume   1006 non-null   float64
 4   IEF_returns  1005 non-null   float64
 5   QQQ_volume   1006 non-null   float64
 6   QQQ_returns  1005 non-null   float64
 7   FIL_returns  504 non-null    float64
 8   GLD_volume   1006 non-null   float64
 9   GLD_returns  1005 non-null   float64
 10  TLT_volume   1006 non-null   float64
 11  TLT_returns  1005 non-null   float64
 12  SPY_volume   1006 non-null   float64
 13  SPY_returns  1005 non-null   float64
 14  ETH_returns  1500 non-null   float64
 15  UNI_returns  420 non-null    float64
 16  DOT_returns  447 non-null    float64
 17  ADA_returns  1500 non-null   float64
 18  BNB_returns  1500 non-null   float64
 19  LTC_returns  1500 non-null   float64
 20  SOL_returns  580 non-null    float64
dtypes: float64(21)
memory usage: 258.0+ KB
In [2]:
lag_plot(data['SPY_returns'])
Out [2]:
<AxesSubplot:xlabel='y(t)', ylabel='y(t + 1)'>
In [3]:
lag_plot(data['BTC_returns'])
Out [3]:
<AxesSubplot:xlabel='y(t)', ylabel='y(t + 1)'>
In [8]:
fig, ax = plt.subplots(figsize=(20,20))
sns.heatmap(data.corr(), annot=True, ax=ax)
Out [8]:
<AxesSubplot:>
In [ ]: