Harmonic Sine Waves model plot Hey,
Here is another tool that I created. I could not find anything similar.
This script is creating a sine wave, based on the given length, amplitude, horizontal vertical offset.
After this it plots also nearest harmonics to the base sine wave and draws it on the chart.
At the last step it sums up the value for base sine wave with its harmonics.
This is a great way to experience how 4 basic sine waves, when summed up, are creating more complex chart.
This shows that the 'chaotic' chart can be built on just a few most important factors.
You do not have to "know every single fact" about the asset to make a proper forecast.
You just need those most important.
It is crucial though, to offset the chart in a correct way, so it is in phase with the asset that we work on.
Hurstcycles
Hurst ExponentMy first try to implement Full Hurst Exponent.
The Hurst exponent is used as a measure of long-term memory of time series. It relates to the autocorrelations of the time series and the rate at which these decrease as the lag between pairs of values increases
The Hurst exponent is referred to as the "index of dependence" or "index of long-range dependence". It quantifies the relative tendency of a time series either to regress strongly to the mean or to cluster in a direction.
In short, depending on the value you can spot the trending / reversing market.
Values 0.5 to 1 - market trending
Values 0 to 0.5 - market tend to mean revert
Hurst Exponent is computed using Rescaled range (R/S) analysis.
I split the lookback period (N) in the number of shorter samples (for ex. N/2, N/4, N/8, etc.). Then I calculate rescaled range for each sample size.
The Hurst exponent is estimated by fitting the power law. Basically finding the slope of log(samples_size) to log(RS).
You can choose lookback and sample sizes yourself. Max 8 possible at the moment, if you want to use less use 0 in inputs.
It's pretty computational intensive, so I added an input so you can limit from what date you want it to be calculated. If you hit the time limit in PineScript - limit the history you're using for calculations.
####################
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as good as in historical backtesting.
This post and the script don’t provide any financial advice.
HurstCycles PeaksOnly way I found to plot hurst cycles. I gave up on anything other than daily chart.
Published on request.
HurstCycles ThroughsOnly way I found to plot hurst cycles. I gave up on anything other than daily chart.
Published on request.