Hello, I have written some code that calculates the Hurst exponent. Below is just the function for it. 

def HurstExponent(self):
	#The Hurst Exponent is calculated using the Rescaled Range (R/S) analysis. The formula for the Hurst exponent is:


        #Hurst Exponent = (log(Rn/S) / log(n)) - 0.5


        #where Rn is the range of the cumulative sum of n data points and S is the standard deviation of 		the n data points


        # Generate vector of prices
        prices = np.array([self.closingPrices])
       
        # Calculate log returns
        Rn = np.cumsum(prices)
        S = np.std(prices)


        # Calculate Hurst exponent
        hurst = (np.log(Rn/S)) / np.log(prices) - 0.5


        return hurst[-1][-1]

self.closingPrices is a python list of the closing prices in a rolling window. 

If anyone has any feedback that would be greatly appreciated. I'm open minded.

I have a YT channel where I code this up on video, the video will come out today Channel is called:

EthernetWink

Link to other video: