Started a newish project, implementing the approach from my course using Cardano (ADA) as the asset. Focus at the moment is using XGBoost ML algorithm to help determine whether to go long or short using a momentum strategy. I haven’t used XGBoost before, so something to learn I guess. If the strategy seems profitable, as all the strategies I’ve lost money on have, I might hazard a few digital dollars just to keep the interest going. So here’s the code to fetch the data (ADA-USD) from Yahoo Finance:
import yfinance as yf
import pandas as pd
ada_data = yf.download("ADA-USD", start="2017-01-01", end="2024-06-02")
ada_data.index = pd.to_datetime(ada_data.index)
print(ada_data)
And here’s the beginning and end of the data received
Open High Low Close Adj Close Volume
Date
2017-11-09 0.025160 0.035060 0.025006 0.032053 0.032053 18716200
2017-11-10 0.032219 0.033348 0.026451 0.027119 0.027119 6766780
2017-11-11 0.026891 0.029659 0.025684 0.027437 0.027437 5532220
2017-11-12 0.027480 0.027952 0.022591 0.023977 0.023977 7280250
2017-11-13 0.024364 0.026300 0.023495 0.025808 0.025808 4419440
... ... ... ... ... ... ...
2024-05-28 0.467963 0.468437 0.453115 0.456990 0.456990 418594476
2024-05-29 0.456990 0.463107 0.450914 0.450995 0.450995 350482630
2024-05-30 0.450995 0.454546 0.443807 0.446581 0.446581 356151973
2024-05-31 0.446581 0.454957 0.444461 0.447461 0.447461 290913148
2024-06-01 0.447461 0.452584 0.445254 0.449975 0.449975 167918462
[2397 rows x 6 columns]
I guess I didn’t need that Adjusted Close column, as crypto doesn’t really do dividends and splits the way equities so. Earliest date on Yahoo Finance seems to be 2017-11-09. I wonder if that really was the date Cardano went live. Or perhaps there wasn’t a USD trading pair available.
Next up: Target
