Script to estimate difficulty event likelihoods

Hi - I made a small script that helps trading difficulty events. It basically looks in the past how the difficulty changed and makes a forecast from this.

An example. You want to make a forecast for the difficulty in 2000 blocks. The script will look for difficulty changes in % in the last x 2000 block periods. Than it will tell you how likely the forecasts are given the next 2000 blocks will be based on the same distribution.

http://pastebin.com/BR9Ydadn