Hurst exponent approx.

105 views
Skip to first unread message

pmp.pp...@gmail.com

unread,
Feb 5, 2013, 11:23:45 PM2/5/13
to pywav...@googlegroups.com
I am attempting to approximate the hurst exponent using pwt and I am having some issues, I'm not sure if my calculation is incorrect or there are perhaps some numerical issues(doubt this).

The code is below:

y = np.random.randn(20)




# This is another approximation to be sure the wavelet approx is close


h0 = eg.hurst(y)






w = pywt.Wavelet('db4')


c = pywt.wavedec(y, w)


levels = len(c)


D = []

for i in range(len(c)):

   dj = 0

   l = len(c[i])

   for j in range(l):

       dj += float(pow(c[i][j], 2))

   D.append( dj / float(l) )


print D


slope,intercept=np.polyfit(np.log2(D),range(len(D)),1)


hurst = abs((slope-1)/float(2))


print(h)

print(hurst)



Robin Xu

unread,
Apr 23, 2013, 11:54:55 AM4/23/13
to pywav...@googlegroups.com, pmp.pp...@gmail.com
http://www.tandfonline.com/doi/full/10.1080/17446540701367444#preview   This website may help you 

在 2013年2月6日星期三UTC+8下午12时23分45秒,pmp.pp...@gmail.com写道:

ksandr...@gmail.com

unread,
Jan 26, 2017, 9:14:42 AM1/26/17
to PyWavelets, pmp.pp...@gmail.com
Sorry, did you find the answer? 
I trying to use pywawlets to find the Hurst exponent, but have different numbers with different algorytms.

среда, 6 февраля 2013 г., 7:23:45 UTC+3 пользователь pmp.pp...@gmail.com написал:
Reply all
Reply to author
Forward
0 new messages