File Exchange

image thumbnail

Hurst exponent

version (1.8 KB) by Bill Davidson
This is an implementation of the Hurst exponent that is simpler and quicker than most.


Updated 01 Feb 2006

View License

This is an implementation of the Hurst exponent calculation that is smaller, simpler, and quicker than most others. It does a dispersional analysis on the data and then uses Matlab's polyfit to estimate the Hurst exponent. It comes with a test driver that you can delete.

Cite As

Bill Davidson (2021). Hurst exponent (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

JInyoung Jeong

Samah Khawaled

baogen Li

I think the code doesn't run correctly on R2016a. I find the code of genhurst in gives more precise result, but the wfbmesti command in wavelet toolbox is precise and easy to use .

baogen Li

Grace Pan

hi Bill,
I got some H greater than 1 when i ran the code. Could you tell why? thx.

Satish Mohanty

This code works fine, but it is meant for FGN,if correct result is required for FBM, then take the differentiation and check the result.
FBM = wfbm(0.8,1000);
rand, generate gaussian random noise rather than Brownian noise

Guyennon Nicolas


Tomaso Aste has uploaded (18 Jan 2011) a code there :

following the test proposed by hau and sen_saven gdsgds :

genhurst(test) --> 0.7934 on a 7.9 R2009b 64bit
genhurst(test) --> 0.7926 7.0 R14 32bit

the code refer to T. Di Matteo et al. Physica A 324 (2003) 183-188 and has no rating until today (04/04/11)


why do I get an error when trying to use "function" in the way this author does? I am running matlab 2010


Hi guys

I am looking for matlab code for calculation of Hurst index as well..Please let me knw if you come across any reliable code..The code at this link looks interesting

Comments invited


well...same problem as hau

>> hurst_exponent(test)
testing Hurst calculation
Hurst exponent = 0.98

and even when taking the diff I get

Hurst exponent = 0.71

not 0.8 as it should be..

Is there a matlab code for the calculation of H that gives precise results?

Paul Matthews

hau, you need to apply the code to the diff of your data. Then it gives the right answer.


I think the code doesn't run correctly on R2008b. No matter which kind of data I plug, I got ~0.96. For example, I used wfbm command in wavelet toolbox to generate a fBm with H=0.2 with length 100000, the result by this code is 0.96; while H=0.8, the result is the same. However, the command wfbmesti in wavelet toolbox can give me very correct answer. Does anyone know what's wrong?

Wai Kong Lee

It doesn't really matter what base we use, afterall the slope will be the same.

E. Diaconescu

correct? base for log is '10', not '2' ?

Jhon Herry

this is good software

Mustafa Ualid

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!