meanwhile I am a bit confused with the advantages/disadvantages of the different methods to determine the dominant cycle period. In addition it is not clear yet whether the different methods are all determining the same DC period. We have meanwhile at least
- Hilbert Transformation (that seems to be the first algo)
- Center of Gravity algo (from Skinning the Cat)
- Discrete Fourier Transformation approach (from Ehlers book "Cycle Analytics for Traders")
- Overlapping Band Pass Filter Approach (from Ehlers book "Cycle Analytics for Traders")
- Autocorrelation Periodogram approach (from Ehlers book "Cycle Analytics for Traders" - is Ehlers' favorite right now)
Ehlers claims the autocorrelation periodogram is the superior approach because the measurement has less latency, has a wider range of amplitude swings, does not require historical averaging, and does not require Spectrum Dilation compensation.
So what is your opinion what method is the best/correct one ?
Hi Boxter, I only started looking at autocorrelation yesterday. For whatever reason the EasyLanguage code from the book did not compile in Multicharts so I had to fix that first.
The screen shot is the dollar index daily with two identical oscillators. The only difference is how the period is calculated and both are looking at the same frequency range. The top one is loosely based on Corona Cycle period and the other is the Autocorrelation Periodogram again with minor modifications to make it suitable for adaptive indicators. The only things that stands out is that the autocorrelation function seems to favor higher frequencies which makes the indicator faster. I will run it against a synthetic chirp signal later with various degrees of noise to see how well it does.
My initial feeling is that it could be useful but that depends on what you are trying to achieve. I have spent hundreds of hours tinkering with spectrum analyzers and for my trading, the most useful frequencies are between 100-400 bars. What is more interesting to me is the relationship between frequency and volatility which gives you a different take on estimating turning points. I posted a screen shot here on 30/9/2014 which kind of sums up the idea although it is a little difficult to read.
Of course he would, that is his nature. No big deal, I am sticking with the Sevcik formula for FD, which is still not the best but the others are too difficult to code. There was an academic paper comparing about three methods - the other two were better in theory, from memory, although each have their faults.
As to cycles, the bandpass method he introduced in Cycle Analytics actually does work very well in theory when tested against a chirped sinewave. He left some details out, like I only think he took upside crosses when downside ought to have been included, and I also used a bunch of bandpasses and averaged, leaving out the max and min at any one point.
I cannot comment on autocorrelation periodogram, as while it makes intuitive sense, I have not coded it - the tradestation code is getting too confusing, even if one stops just after the middle of page 106 which is all I would be interested in. I am sure I can do it with a little bit of brainpower.
Edit, on the issue of fractal dimension, hey, when I have time I shall post the Sevcik code from Metastock - easy to read, easy as slicing hot butter - which you may not guess from Sevcik's paper - although coding is repetitious. It has already been done by Jean-Philipe on his private blog into MT4. (There are a couple versions, and I am not convinced he got it right, but close enough), but for those who want to maybe use it in other platforms... Technically/mathematically, Ehler's FRAMA sucks, to be polite.
What i am more concerned with is having any kind of robust version of fractal dimension even if it's just alittle robust only. While Hurst Exponent seems like a good way to estimate fractal dimension, it seems to work only for overall time series analysis, not for short-term trading due to the nature of it's formula.
Being a non-coder, i requested Mladen for a simple median version of Jean-Philip's FD, but sadly it seems that the coding was rejected by Mladen due to implementation problems.
As shown in the PDF below, the Box-counting method practically has a big RMSE value while also not having any robust capabilties (or even resistance to outliers at the least). On the other hand, variogram and madogram seems to have some robust capabilities while having low RMSE.
I would be extremely grateful if there's anyone who could come up with any version of robust FD in MT4. Attached is a highly robust version of Variogram for anyone whos interested in reading
Here is Jean-Phillipe's FGDI. Above 1.5 where it is blue is danger territory. Haven't figured out how to do screenshots yet.
Free download of the 'Fractal Graph Dimension Indicator (FGDI)' indicator by 'jppoton' for MetaTrader 4 in the MQL5 Code Base
I hope that Jean-Philipe's FGDI works for you and others. It is one of the first things I consider. It is quite robust, and even takes into consideration the box counting issue. You do need at least 30 points of data. Comparing it to Jurik's CFB, it seems fairly identical except upside down. But we don't know, as Jurik is a black box. Who likes a black box?
You are correct about the Hurst exponent. For trading purposes it is useless, in my opinion. It is a number which was designed to attempt to define an entire time series array - the more data the better. Not just the last 32 days or so. Well, that is what I think.
I dont think Hurst exponent or FDI is very useful for trading.From my trading experienceJean-Philipe's FGDI is not better than MACD histogram for quantification of randomness.Mladen coded some oscillators using Juriks' FDI as an adaptor, results are not satisfactory.The best FDI indicator I have ever seen in mql4 is in advance elite converted from Tradestation.As far as I remember Sevcik formula has problems, check Jonothan Kinlay's website Long Memory and Regime Shifts in Asset Volatility | QUANTITATIVE RESEARCH AND TRADING
Instead of Hurst exponent check variance ratio ,it looks interesting Quantifying randomness: variance ratio | Elite Trader
I dont think Hurst exponent or FDI is very useful for trading.From my trading experienceJean-Philipe's FGDI is not better than MACD histogram for quantification of randomness.Mladen coded some oscillators using Juriks' FDI as an adaptor, results are not satisfactory.The best FDI indicator I have ever seen in mql4 is in advance elite converted from Tradestation.As far as I remember Sevcik formula has problems, check Jonathan Kinlay's website Long Memory and Regime Shifts in Asset Volatility | QUANTITATIVE RESEARCH AND TRADING
Variance ratio looks interesting Quantifying randomness: variance ratio | Elite Trader
That is interesting.
Just my 5 cents :
Carlos Sevcik's fractal dimension calculation was published first time here : A procedure to Estimate the Fractal Dimension of Waveforms
He published a code written using basic there that was supposed to calculate the FDI. The problem with it was (and still is) that it will almost never go bellow 1.5 (the value that is important as a kind of a boundary between the trending - bellow 1.5 - and random - values above 1.5 - estimation). After that, I gave up that approach.
There is a version made by Alex Matulich (here : http://unicorn.us.com/trading/src/_FractalDim.txt ) that corrects some errors made by Sevcik. Also, there is another fractal dimension calculation made by Mark Jurik (he made it before he made the composite fractal behavior) which has nothing in common with either Sevcik's way or Matulich's way of calculating it and is more a kind of a curiosity than anything else
Now, one more thing.
Once I found a german paper with a proof that fractal dimension index can not be applied to financial markets. Unfortunately I haven't bookmarked the link and after that I was never able to find that paper again. If I ever find it again will post a link to it, but I though that all should know that there such opinions of fractal dimension index too
From the description at Elite forum supplied site, Variance ratio is pretty identical in principle to the basic formula for measuring the fractal dimension, except that it uses what seems to be the standard deviation or variance (?).. Is it an F-test?
It may have something to do with academic things like mean reversion or aversion, stationarity or not, but I am not sure whether it alerts the average punter to what "state" the market is currently in - trending or random? This matters to me.
Something that Ehlers is at pains to point out is that financial markets do not follow a normal probability distribution.
A normal PDF (bell curve) is required whenever statistics such as standard deviation is employed.
Also, without seeing the formula, I may be utterly wrong - just going by the description at one site. Would you be so kind as to provide the actual formula?
Please enable the necessary setting in your browser, otherwise you will not be able to log in.