All my previous articles have insisted on being cautious with detecting and analysing cycles, and this point will be reiterated implicitly as I now describe it a little further.
Detecting cycles is a process whereby one tries to fit a combination of cycles (sine waves) to a time series. All time series exhibit a certain statistical behaviour (mean, standard deviation etc), which make it stationary or not. Stationary time series are easier to analyse, but unfortunately market data generally isn't.
Stationary systems (e.g. ECG) if periodical, are likely to provide stable cycles, therefore sampling the last 128 points should in such case capture all replicable cycles with higher frequencies (periods below 64 points). There is ample literature available on the Internet (Cycle detection, Shannon. etc), so i'm going to leave this topic aside.
In our case, there is no reason to believe cycles will repeat themselves. Life would be just too simple. No, market data can hardly ever be summed up in a combination of sine curves. Sorry to disappoint you if you spent money on books and seminars offered by some shrewd market guru. I might elaborate on the topic of selling hot air in a future article.
OK, back to the nitty gritty: let's live with it, frequencies will always change. We can take a snapshot and estimate some degree of stability in the short term with due caution. In recent weeks, we've had a cycle detection that worked just fine (admittedly also supported by other indicators), but one should not extrapolate further as this is highly sensitive to a change in market dynamics. Such sudden change in dynamics (energy bursts, pulses) will generally translate into new (also short-lived) cycles, and even when they remain relatively stable, those rapid changes (i.e. an event like a Fed announcement) generate a phase shift, which in layman's terms corresponds to the main cycles being offset backward or forward. This is a very advanced topic, that very very very few have explored or even thought of.
Let's come back to our cycle detection. We use 128 points (the indicator can use more), so we detect a number of possible cycles that fit our price series. The genetic algorithm does a good job at finding the optimal phase etc, but since there are multiple solutions close to the optimum, and since the problem at hand is discrete (i.e. not continuous), the indicator will often jump between very good solutions that are all very very close to the optimum.
It does not matter so much as this is not an exact science and cycles are generally elusive. They however can give us turning points within a few bars, which is what we really care about.
OK, let's leave the 'heavy stuff' aside for now, and let's get back to one of our standard charts, here NDX. Cycles are plotted, and the main cycles are F1 (period: 168 bars) and F2 (period: 63 bars). F1 is too long, as we cannot grab the dynamics of a long cycle with only 128 bars. We already know that there are a number of good solutions with shorter cycles. The combination of the 2 cycles provides the best fit to the price series, so we kept it that way.
The 2 cycles have have relative amplitudes of respectively 87 and 53, making the 2 cycles significant, and actually visible. One can now apply the phase shift indicator, or if we want to discard the longer cycle apply manually a quarter cycle phase advance to the shorter cycle F2 to anticipate the next potential turning point.
There will be a few improvements to that indicator soon to accommodate these functionalities. For the time being, users of the toolset are welcome to send comments and feedbacks. Thanks.