Fix

#4 · closed · 1 comments

View on GitHub ↗

KatIsHere

Hello, Sir, I would like to question you about this part in "hurst": " elif kind == 'change': incs = series _series = np.hstack([[0.],np.cumsum(incs)]) mean_inc = (series[-1] - series[0]) / len(incs) deviations = incs - mean_inc Z = np.cumsum(deviations) R = max(Z) - min(Z) S = np.std(incs, ddof=1) " shouldn't it be there like this "mean_inc = (_series[-1] - _series[0])/len(incs)"? Sorry in advance if I am wrong.

Comments

Mottl

Thanks for the notification! Previous code was overcomplicated. I improved it a bit. https://github.com/Mottl/hurst/blob/bfcd29f52c2939f276a1ff3b3d74605a766d3e1e/hurst/__init__.py#L93-L99