Exploring the dataset
For price prediction, we will utilize two datasets. The first dataset is the time series data of BTC prices, extracted from Yahoo Finance, with a daily granularity.
To extract it, we use the Yfinance library with the following code:
data=yf.Ticker('BTC-USD') df= data.history (start='YEAR-MONTH-DAY', end='YEAR-MONTH-DAY')
The dataset contains multiple columns, but we will focus on the close column and the date. The date
column needs to be used as an index with a frequency. The following code snippet can be useful if not sourcing from Yfinance, which already handles it:
df = df.set_index(pd.DatetimeIndex(df['Date'], freq='D'))
As a Web3 dataset, compared to traditional financial stock price datasets, it includes prices for weekends as well, reflecting the fact that the market operates continuously. When selecting a times series dataset, it is essential to ensure that there are no missing values or handle...