Tuesday, January 15, 2008
The Lomb-Scargle cycle detection indicator
Another lesser used indicator in the toolbox is the Lomb-Scargle indicator. There is well-known controversy regarding existence of cycles in markets, and even a good cycle detection algorithm like L-S admittedly has flaws, i.e. does not guarantee any stability in cycles. It is merely a market snapshot over a number of bars, and the algorithm tries its best to determine the underlying frequencies at a point in time. Markets are erratic, markets are chaotic, hence the internal dynamics constantly change.
Having said that, such information can probably be used to the trader's advantage. For instance, one can detect when there is a sudden change in dynamics or on the contrary look for periods of time where cycles are relatively stable.
Here above, one can see that a single frequency emerges from the spectrum. The indicator can plot the top 2 frequencies as higher frequencies are generally detected with ridiculously low amplitudes, i.e. noise... In the picture, the top frequency is represented by yellow dots, with its amplitude plotted as a histogram.
Although I do not use it often, i look forward to reading any feedback you may have with this Lomb indicator.
NB: there are a few variations on the algorithm available on the Internet. This one is the EXACT replica from the MIT PhysioNet laboratory.
http://www.physionet.org/physiotools/software-index.shtml