I actually found your function to pull in the historical BTC data to be great. I was having issues myself getting this data to load properly so this helped me greatly with my own project.
Also would you mind showing me where you dropped the volatility? I would like to add it back to the data I think it will be interesting to see. I am having some issues putting it back in .