Weather, BTC price and Crypto Farm Earnings
Weather, BTC price and Crypto Farm Earnings
Introduction
Introduction
The goal of this notebook is to explore the relationship between weather, BTC price and crypto mining farms. The hypothesis is that weather conditions influence crypto farms and BTC prices. For example, in cold weather, it is cheaper to cool crypto miners, especially those using Proof Of Work (PoW) algorithms. Cheaper operation costs translate to higher earnings for farms at the end of a year. Any weather conditions that might affect the electricity grid will affect crypto farmers. For example, although beneficial to crypto mining operations, the abnormally low temperature might put a higher strain on an electric grid, thus causing grid operators to increase electricity prices or introduce a rolling blackout policy or something else. These control policies might decrease earnings for crypto miners and affect BTC prices.
Acquiring BTC Data
Acquiring BTC Data
The crypto currency historical information used in this notebook has been obtained from Kraken crypto exchange that makes it available freely through their website.
https://support.kraken.com/hc/en-us/articles/360047543791-Downloadable-historical-market-data-time-and-sales-
Note: BTC is denoted as XBT in Kraken, you can read more about why this is the case here https://support.kraken.com/hc/en-us/articles/360001206766-Bitcoin-currency-code-XBT-vs-BTC
https://support.kraken.com/hc/en-us/articles/360047543791-Downloadable-historical-market-data-time-and-sales-
Note: BTC is denoted as XBT in Kraken, you can read more about why this is the case here https://support.kraken.com/hc/en-us/articles/360001206766-Bitcoin-currency-code-XBT-vs-BTC
Here we are importing BTC price from Kraken exchange.
In[]:=
data=Import["C:\\Users\\bobma\\OneDrive\\Documents\\data\\XBTCAD_1.csv"];
In[]:=
dataUp=ParallelMap[{FromUnixTime[First@#],#[[2]]}&,data];
In[]:=
ts=TimeSeries[dataUp]
Out[]=
TimeSeries
Out[]=
TimeSeries
In[]:=
DateListPlot@Standardize[ts]
Out[]=
Acquiring Temperature Data for Crypto Farm location
Acquiring Temperature Data for Crypto Farm location
Crypto farm locations have been collected manually from the internet.
In[]:=
data={{43.2178667,76.8040832,"Kazahstan","Almaty"},{51.742526,75.3370232,"Kazahstan","Ekibastuz"},{51.3028304,-112.9187778,"Canada","Drumheller"},{50.095931,-110.7351059,"Canada","Redcliff"},{45.7442226,-107.6285101,"US","Hardin"},{44.8653926,-93.462982,"US","Minneapolis"},{32.2258142,-101.5204549,"US","Big Spring"},{40.7245924,-99.0395878,"US","Kearney"},{30.572359,-97.0773401,"US","Whinston"},{64.1335484,-21.9224813,"Iceland","Reykjavik"},{56.3034774,101.7187356,"Russia","Bratsk"},{47.09952699,-67.76026494,"Canada","Saint Andre"},{45.48306949,-73.7350666,"Canada","Montreal"},{45.2081227,-72.7964854,"Canada","Cowansville"},{45.2833095,-73.0006623,"Canada","Farnham"},{45.2523962,-72.1788897,"Canada","Magog"},{45.6371987,-73.0062179,"Canada","Saint-Hyacinthe"},{45.4123703,-71.9603891,"Canada","Sherbrooke"},{46.0191195,-73.4291406,"Canada","Joliette"}};
In[]:=
ds=Dataset[AssociationThread[{"Langitude","Latitude","Country","City"},#]&/@data];
In[]:=
toPosition[d_]:=GeoPosition[{d["Langitude"],d["Latitude"]}];
In[]:=
locations=toPosition/@ds;
In[]:=
GeoListPlot[locations,PlotLabel"Crypto farm location"]
Out[]=
Note that most of the farms are in North America, so any Country wide policies in US or Canada would affect Crypto prices the most.
In[]:=
records=Normal[ds];
In[]:=
weatherData=Map[{WeatherData[toPosition[#],"Temperature",{{2021,1,1},{2021,12,30},"Day"}],#[["City"]]}&,records];
In[]:=
Map[DateListPlot[#[[1]],PlotLabel#[[2]]]&,weatherData]
Out[]=
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
We can see that all the locations are following approximately similar pattern. July seems to be at Peak and January to March are the winter days.
We can also see that some locations have more variation in temperature than the others.
In[]:=
findLowestTemperatureDates[ts_,temp_]:=Select[Normal[ts],#[[2]]<=temp&];
In[]:=
coldestDays={Flatten@findLowestTemperatureDates[First@#,Min[First@#]],#[[2]]}&/@weatherData;
In[]:=
coldDays=Select[Flatten@coldestDays,DateObjectQ]
Out[]=
,,,,,,,,,,,,,,,,,
In[]:=
TimelinePlot@coldDays
Out[]=
In[]:=
findHighestTemperatureDates[ts_,temp_]:=Select[Normal[ts],#[[2]]>=temp&];
In[]:=
hotestDays={Flatten@findHighestTemperatureDates[First@#,Max[First@#]],#[[2]]}&/@weatherData;
In[]:=
hotDays=Select[Flatten@hotestDays,DateObjectQ];
In[]:=
TimelinePlot@Select[Flatten@hotestDays,DateObjectQ]
Out[]=
Interesting to note that Reykjavik has lowest variability in temperature and it’s 5 Celsius most of the time. Likely, it also makes it a perfect place to have a crypto farm temperature wise.
Observations
Observations
◼
Most crypto farms in our dataset are located in North America
◼
All locations follow the same season pattern. It’s cold during winter and warm during summer
◼
Reykjavik is the best place for crypto mining hardware
◼
Hottest days are more spread out through June to September
Plotting Temperature Data against BTC price
Plotting Temperature Data against BTC price
Blue lines represent coldest days for the region and red lines represent hottest days in the region. Dates where multiple red lines or blue lines overlap are more red or more blue.
Notice that the price of BTC picks during periods where there are no extremes. It’s likely due to the fact that during extreme weather governments are more likely to issue policies that reduce crypto farm usage. Crypto market is driven by news so when negative news [AA] are issued the BTC price drops.
Plotting earning data against temperature
Plotting earning data against temperature
Figure out how crypto farms value or earning expectations changes depending on the number of low or high weather that they have experienced.
It seems that reported earnings by HUT and MARA follow BTC price. Interestingly, it only happened for HUT and MARA and not for RIOT. It’s possible that there was something else involved (some sort of a contract with institutional investor or a company?).
Bringing some context
Bringing some context
These news were hand picked from Financial Times.
Although it looked like minimum temperature tells a nice story, it’s only one of the many facets.
Conclusion
Conclusion
My naive explorations show that for the year 2021, there is an interesting visual relationship between weather conditions at crypto farm locations and the BTC price. It seems that BTC price was the highest during winter and fall. During the summer, BTC price is the lowest. Will this pattern hold for 2022 (probably not)? This pattern might have been a coincidence because there were series of news that happened in the beginning of the summer that could have triggered a selloff in BTC.
Next steps:
Next steps:
◼
Do more in depth analysis on a wider timeframe to see if this pattern holds for previous years.
◼
It would be interesting to investigate if Heating Degree Days and Cooling Degree Day forecasts could work for predicting BTC price movements. Maybe it's possible to try using something like this https://bit.ly/3I6EK5s to build a trading strategy. It would need to be combined with some sort of news data source.
References:
References:
[AA] https://community.wolfram.com/groups/-/m/t/2293868
[CB] https://www.bbc.com/news/technology-58678907
[CB] https://www.bbc.com/news/technology-58678907