Hurst exponent with 8 returns in python

Hello there:



 I was wondering, since the Hurst exponent has been explained using 9 periods (8 returns) in this web: (https://blog.quantinsti.com/hurst-exponent/



Has anyone done that in python…?? with that I mean… has anyone computed this Hurst exponent (using only 9 periods),  NOT USING THE HURST MODULE , since it requeries more than 100 periods for computing it .



Wht is the difference between this 9 period Hurst exponent and the one in the Hurst module…??  which one is better and why?? Do I need more than 100 data to know if a stock is trending??



What I mean to say  is for example :



if a stock has reported earnings  two days ago and  has begun to trend since then… how can data from the previous 98 days will influence if the momentum continues or not…?? 



Thanks

Hi Ghery



The Hurst exponent can be computed in Python by creating a logic similar to the one shown in the blog. 



So basically Hurst exponent for a time-series can be computed using multiple methods like rescaled range (R/S) analysis, Detrended fluctuation analysis (DFT), Periodogram regression, etc. 



To get an idea of the exact method used in the Hurst library and to compare it with the one used in the blog you can refer to the following link - 



https://github.com/Mottl/hurst/blob/master/hurst/init.py



To know more about the behaviour of Hurst exponent as a function of time-series length you can refer to the following research - 



https://www.researchgate.net/figure/Hursts-exponent-H-as-a-function-of-the-time-series-length-N-for-three-different-values_fig4_235368433





 

Thank you very much I appreciate your help