File Exchange

image thumbnail

Hurst exponent

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

27 Downloads

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.

Comments and Ratings (15)

baogen Li

I think the code doesn't run correctly on R2016a. I find the code of genhurst in http://www.mathworks.com/matlabcentral/fileexchange/30076-generalized-hurst-exponent. 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.

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);
data=diff(FBM)
hurst=estimate_hurst_exponent(data);
rand, generate gaussian random noise rather than Brownian noise

Navin,

Tomaso Aste has uploaded (18 Jan 2011) a code there : http://www.mathworks.com/matlabcentral/fileexchange/30076-generalized-hurst-exponent.

following the test proposed by hau and sen_saven gdsgds :

test=wfbm(0.8,100000);
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)

FG

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

Navin

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

http://www.ms.unimelb.edu.au/~odj/

Comments invited
Cheers

sen_saven

well...same problem as hau

test=wfbm(0.8,100000);
>> 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?

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

hau

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