Not So Neat

I’m editing a Jupyter Notebook that came with my latest course to use BTC/USD instead of SPY (S&P500). Not only is this more relevant to my interests but it helps me examine the code closely. Still, the screen can get pretty crowded. Good thing I’ve got a 4K monitor. I discovered that I can get BTC price data back 10 years through one call on yfinance (Yahoo Finance API). Only daily data though.

I need to be mindful of differences between crypto trading and equities trading. For instance a stock exchange typically trades about 252 days per year (Monday to Friday, excluding public holidays) whereas a crypto exchange trades 365.25 days per year. This is important when annualizing metrics such as Sharpe Ratio. In the case of the code shown it’s reflected in the rolling one year return value.