Pages

Saturday 1 December 2012

10.4 Long range forecasts of the network hashrate

0. Introduction.
Over the last three posts I've been investigating the correlation between the MTGOX US$BTC exchange rate and the network Difficulty and hashrate. In this post I have an accuracy improvement on Model 0 from post 10.2 and the Canary model from post 10.3, and also find some longer range forecast models. The improvement is due in part to forum member molecular's more accurate network data (converted to weekly averages), and also due in part to reworking my method of binding the network data with MTGOX US$BTC price data as a time series. If you'd like to show your appreciation to molecular for providing the dataset, please send a small donation his way. I've included his donation address with mine at the end of the post.

The dataset for this post is here.

1. Long range network hashrate forecasts.
In post 10.2 I introduced Model 0, a model of the weekly average network hashrate. Model 0 is a very good match for the historical network hashrate. It is however not much use for predictions. It's shortest lag is 1, so it can only provide a prediction of the next weeks' average hashrate. This is not a problem if you simply wish to prove a correlation and explore it's variables as I initially intended to do. However I realised that by selecting particular minimum lags and finding the best models at these lags I could make a usefully predictive model.

It should be noted that the longer range predictive models probably do not contribute to an understanding of the effects that the MTGOX US$BTC price has on the network hashrate, at least not in the same way Model 0  - the most accurate linear model I found - does. The long range models are simply the best models at particular lags.

When investigating the new dataset from molecular, I found as well as the network hashrate autocorrelation at lag = 1 week that I found in post 10.2, I also found another weaker but significant autocorrelation at lag = 11 weeks. It is even more significant for the network history up to 21-November 2011 (after which there appears to be no significant autocorrelation, as discussed in post 10.3). I included this is my new "Model 0" and obtained better overall accuracy, a normally distributed percentage error, and a reduced 95% confidence interval for the percentage error. The lag11 term recurred for the longer range variables naturally as a best fit term when I increased the number of terms to four. I have no idea why an 11 week lag would have been affecting the network hashrate up to 21st November last year, but it was consistently useful in reducing the percentage error while retaining normally distributed percentage errors.

Since these are new models, I've renamed them, and I've included the lag term (or the number of weeks forecast) in the name. Model.f1 (the old Model 0) forecasts a week ahead, model.f2 forecasts two weeks ahead and so on. Below are the models. I've also pasted the full details of the models (including statistical analysis) here, in case you'd like to see which of the terms are most or least significant, or if you want the full coefficients instead of the rounded versions I give below.


Model.f1: 1 week forecast
log(H) ~ 4.56 + 0.74lag1(log(H)) + 0.10lag11(log(H)) + 0.23lag1(log(P)) - 0.05lag11(log(P))
95% confidence interval for % error = -13.0% to + 12.6%

Model.f2: 2 weeks forecast
log(H) ~ 8.54 + 0.48lag2(log(H)) + 0.20lag11(log(H)) + 0.44lag2(log(P)) - 0.11lag12(log(P)))

95% confidence interval for % error = -20.0% to + 19.1%

Model.f3: 3 weeks forecast
log(H) ~ 8.93 + 0.49lag3(log(H)) + 0.22lag11(log(H)) + 0.52lag3(log(P)) - 0.20lag9(log(P)))
95% confidence interval for % error = -27.1% to + 25.4%

Model.f4: 4 weeks forecast
log(H) ~ 9.29 + 0.45lag4(log(H)) + 0.23lag11(log(H)) + 0.63lag4(log(P)) - 0.32lag9(log(P)))
95% confidence interval for % error = -35.2% to + 32.2%

H = weekly average network hashrate
P = weekly median MTGOX US$BTC exchange rate


The 95% confidence interval for percentage error is an estimate using the assumption that the percentage errors are normally distributed. They increase significantly as the number of weeks forecast increases, although in recent times the long range forecasts have been surprisingly accurate.

Below are the models compared to the network hashrate, and the percentage errors with time as well as a histogram of the percentage errors.









2. Canary model update.
Just as in post 10.3, the new dataset showed no significant cross correlation between hashrate and price since the week of November 21, 2011. Interestingly, the best model still used the same terms as the original, although the coefficients differ slightly and the 95% confidence interval of the percentage error is reduced:

Canary model: 0 week forecast
log(H) ~ 3.71 + 0.53log(H, lag = 1) + 0.34log(H, lag = 3)  + 0.14log(P) + error 
95% confidence interval for % error = -8.5% to + 8.3%

H = weekly average network hashrate
P = weekly median MTGOX US$ / BTC exchange rate 





3. My network hashrate forecasts.
We are now in a position to make forecasts for hashrate using the forecast models, and also determine if the current network hashrate is differing significantly from the recent historical no lag relationship between price and hashrate using the Canary model. The charts below show predictions and their estimated confidence intervals from October and extend as far as Christmas Eve for the four week forecast. The tables of data are available:
Two week forecast



You'll notice the 95% confidence intervals are quite large compared to the recent error. I'm fairly confident about the predictions, although the recent block reward halving and ASICs being soon available will likely make the models invalid. 

4. Summary

  • Up to four week forecasts of the network hashrate can be modelled and provide reasonable accuracy
  • The forecast models of two to four weeks do not help us understand the nature of the relationship between the MTGOX US$BTC exchange rate and the network hashrate in the same way the best model (forecast one week) does.

I'll try to update the forecasts when I can, but you now have the necessary tools to do it yourself should you wish. PM me at the bitcointalk.org forums if you need help converting data to a time series to do your own analysis.






Donations help give me the time to analyse bitcoin mining related issues and write these posts. If you enjoy or find them helpful, please consider a small bitcoin donation:
12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r

Forum member molecular's dataset was a great help in producing this post. Show him some appreciation and throw a few satoshi his way:
1MoLECHau3nb9zV78uKraNdcZsJ2REwxuL




<tenpoint four>

No comments:

Post a Comment

Comments are switched off until the current spam storm ends.