Hurst Exponent
We can use the Hurst exponent (H) as a measure for long-term memory of a time series, that is, to measure the amount by which that series deviates from a random walk. The scalar represents the relative tendency of a time series either to regress strongly to the mean (mean-reverting pattern) or to cluster in a certain direction (trending pattern).
The values of the Hurst exponent range between 0 and 1. Based on the value of H, we can classify any time series into one of the three categories:
- If the Indicator value is below 0.5 then we can expect a mean-reverting (anti-persistent) series. The closer the value is to 0, the stronger the mean-reversion process is. In practice, it means that a high value is followed by a low value and vice-versa.
- If the Indicator value is 0.5 — a geometric random walk.
- If the Indicator value is above 0.5 — a trending (persistent) series. The closer the value is to 1, the stronger the trend. In practice, it means that a high value is followed by a higher one.
Source: https://towardsdatascience.com/introduction-to-the-hurst-exponent-with-code-in-python-4da0414ca52e
The indicator has two parameters:
- Applied price
- Period
The indicator has one line:
- Hurst Exponent
We have added these conditions as custom blocks:
- Hurst Exponent is above/below Level
- Hurst Exponent is above/below 50
Indicator is implemented for: MT4/MT5/Tradestation/ Multicharts.
How to import custom blocks:
- Open the Algo Wizard in SQX
- Select Customize
- Select Custom Blocks
- Import Custom Blocks
- Save them
You can easily do your conditions in Custom blocks. More information you can find here:
- https://strategyquant.com/doc/strategyquant/custom-blocks/
- https://strategyquant.com/doc-category/strategy-templates-custom-blocks/
- https://www.youtube.com/watch?v=CGkn5kh_etc
In this module, you can also modify the custom blocks – change the periods, change the steps, etc.
How to import custom indicators to SQX:
- https://strategyquant.com/doc/programming-for-sq/import-export-custom-indicators-and-other-snippets/
Excellent !!! Thank you Ivan !!!
This is great!