Cycles - Decoding the Hidden Rhythm

Cycle Analysis

Introduction

Introduction

It's all about cycles

Cycles that influence our life here on Earth. Cycles that represent energy flows that influence people’s moods and emotions. Cycles that represent energies originating from outer space. Cycles that manifest themselves in the measurable value of the economy.

This publication introduces an approach on how to identify relevant cycles and how to use this information for forecasting. The approach is not entirely new. But the way we use the “cyclic approach” is. 

Cycles are important.

Cycles surround us and influence our daily lives. Many events are cyclical in motion. There is the ebb and the flow of waves and the inhaling and exhaling of humans.

Our daily work schedule is determined by the day and night cycles that come with the rotation of the Earth around its own axis. The orbit of the Moon around the Earth causes the tides of the oceans. Cycles also have an impact on women from their teenage years on – the menstruation cycle.

Gardeners have long understood the advantages of working with cycles to ensure successful germination of seeds and high-quality harvest. They work in harmony with the cycles to attain the best results, the best crops.

We experience four seasons every year, namely the changes in climate, resulting from the rotation of the Earth around the Sun. This seasonal cycle creates the changes in conditions that affect all living beings on Earth. One common cycle based on seasonal conditions is the bird migration, a regular seasonal journey undertaken by many species of birds.

You would wait until early spring to plant new seeds to take advantage of the rise in pulsing energy of the warming spring temperatures. Knowing when the sun will rise may not seem like a prediction, because we associate prediction with uncertainty and risk, but it is, nonetheless, a prediction of future events that is highly accurate.

These cycles are largely based on the cyclical movements of the Sun and Moon.

However, there is strong evidence that other additional energy cycles in the universe influence our life here on Earth. Independent research by the University of California and the University of Kansas has revealed that the rise and fall of species on Earth seems to be driven by the motions of our solar system as it travels through the Milky Way. Some scientists believe that this cosmic force may provide the answer to some of the biggest questions about Earth’s biological history (Schwarzschild, 2007). Finally, cycles have a long history in explaining our behavior on Earth.

We can go back a long time in history to recognize that life follows a path of time cycles. We can even find reference to this in the Bible:

A Time for Everything

There is a time for everything,
and a season for every activity under heaven:

a time to be born and a time to die, 
a time to plant and a time to uproot,

a time to kill and a time to heal,
a time to tear down and a time to build,

a time to weep and a time to laugh,
a time to mourn and a time to dance,

a time to scatter stones and a time to gather them,
a time to embrace and a time to refrain,

a time to search and a time to give up, 
a time to keep and a time to throw away,

a time to tear and a time to mend,
a time to be silent and a time to speak,

a time to love and a time to hate,
a time for war and a time for peace.

Ecclesiastes 3:1-8

If there is indeed a time for everything that explains and predicts our behavior, this must also be applicable to people’s economic hopes, which manifest themselves in the value of the stock market.

Two well-known pioneers who applied cyclic analysis in the stock market are W.D. Gann and J.M. Hurst. Gann used cyclic and geometric time and price patterns, but did not elaborate the details of his approach. His work is still a mystery to many of us.

Hurst was the first to introduce cycle analysis to the technical analysis of the stock market. Even today, a lot of cycle forecasters, like Peter Eliades, successfully use the techniques of Hurst’s approach outlined in his seminal work “The Profit MAGIC of Stock Transaction Timing”. For example, Hurst demonstrated that the only difference between a head and shoulders pattern and a double top pattern is the phasing of the cyclic components.

Additionally, a paper published by three authors from the MIT Laboratory for Financial Engineering in 2000 concludes that ''technical patterns do provide information. It does raise the possibility that [pattern] analysis can add value to the investment process.” (Lo; Mamaysky; Wang; 2000)

Today we have evidence that detecting patterns adds value to the investment process and that all technical patterns can be rebuilt by means of cyclic components. In this regard, it should be valuable to think in terms of cycles rather than using a framework that consists of static chart patterns.

If this is the case and has already been widely acknowledged, why are only a few analysts and investors using cyclic analysis?

The likely answer to that question is because cyclic analysis is extremely difficult to put into practice. It requires a great deal of work and some complex mathematics that is not easy for everyone to apply. Additionally, many obstacles exist that hamper the use of cycle analysis:

The gap in speech/language between cycle researchers and traders

One reason cycle analysis is often limited to scientific researchers is the linguistic barrier. This becomes clear in the following example:

Even though both statements have the same meaning, most readers will understand the first statement but find the second puzzling.

The gap of trading expertise vs. cycles calculation

The second gap is attributable to different knowledge areas. Technical analysis is primarily visual while cycle analysis is mostly numerical.

The visual mode of technical analysis is one of the few human cognitive activities where computers do not yet have an absolute advantage over us. Numerical analysis involves the study of data sets after the fact. But in real-time environments, traders and investors must decide in the now and their decisions are mainly based on visual pattern recognition from charts. In many cases, the human eye can perform this “signal extraction” quickly and accurately. There are no, or more precisely, only few available cycle tools that can present the visual information extracted from numerical cycle analysis to the trader and function as a visual guide.

The gap of forecasting vs. trading 

The third reason cyclic analysis is something of a rarity in trading is the distinction between forecasting and trading.

Most traders are not interested in predicting the future; instead, they enter a trade based on probabilities, apply money management and exit the trade sticking to clear rules. They claim that this is “the real way of trading”. Traders are convinced that they can make money by simply entering the trade randomly and by applying money management and exit rules.

On the other end of the spectrum are the “forecasters”. This group of experts is not interested in money management and exit strategies. They solely base their trading on predicting future market behavior. A gap exists in the mindsets of these two groups characterized by an ongoing debate about trading versus forecasting.

Cyclic analysis is more of a forecasting method. It is therefore not surprising that this tool cannot be found in an active trader’s toolbox. The active trader is not interested in “forecasting”. He manages his trade.

Bridging the Gap

This book tries to bridge these gaps with this publication. This book differs from traditional ones on cycle approaches, because it does not deliver a static framework of cycles that data need to be squeezed into.

That is, we do not try to make the market “fit” into a particular cycle framework which has at least two different possible outcomes. "Failures" within static frameworks are often explained with a complex set of named exceptions and deviations. The listing of exceptions after a static cycle framework fails (such as: “A cycle inversion took place”) is of little comfort to the investor who has made investments based on one of the delivered predictions.

All cycle tools are explained in detail and can easily be dragged ‘n dropped onto the chart via the cycle.tools cloud application; or can be integrated in your own applications via our public API access. Even most source codes for the introduced algorithms are shared as open source code for interested follow up projects on your own.

Introduction

How to detect and measure cycles

The pivotal point of the approach described here is a method that can accurately determine which cycle is currently active with regard to the length, amplitude, and duration of the last high and low of a data series.

To borrow from the language of engineering, frequency analysis is used to measure cycles. As simple users, however, we should not be deterred by these "technical" terms. Frequency is nothing other than "oscillations (cycles) per time frame". In technical-mathematical analysis, the measurement of frequency is therefore repeatedly described. Time-frequency analysis identifies the point in time at which various signal frequencies are present, usually by calculating a spectrum at regular time intervals.

The application of frequency analysis to financial data is in principle nothing new and has already been described in numerous articles. However, current methods often come up against barriers in terms of application in financial markets. This is attributable to the specific features of the financial markets. Financial markets are influenced by numerous overlapping waves, whose strength and phases vary over time and are consequently not constant. The data are also overlaid by significant one-off events (noise) and quasi-linear trends. The classical methods of frequency analysis are not designed for the special characteristics of financial markets. Hence, the established methods are largely unable to provide reliable results as far as practical trading signals are concerned.

However, this section is designed for practical application in trading and forecasting and is not intended to be a scientific publication on new algorithms. Against this background, I would like, on the one hand, to abstain from the academic debate about the advantages and disadvantages of individual methods and, on the other, to avoid repeating what has already been said in other publications.

By combining special DFT methods (including the Goertzel algorithm), validation by means of statistical measurement methods (including the Bartels Test) and approaches to pre-processing (detrending), this framework provides a reliable method for measuring cycles in financial time series datasets.

The proposed method provides the spectrum of frequency analysis for every asset, dataset and every possible time frame. The following results are thereby provided:

  1. Presenting a visual spectrum of the wave analysis of a length of 5 - 400 bars;
  2. Determining the peaks in the spectrum analysis - i.e., the relevant and significant cycles;
  3. Filtering of the values derived from the frequency analysis through statistical validation, i.e., identifying the cycles that are actually "active";
  4. Determining the precise phase and amplitude of every active cycle;
  5. Output of the data in a form comprehensible to traders, i.e.,
  1. Determining the "strength" of a cycle by establishing the price movement per bar ("cycle strength").

In classical cycle analysis, the waves with the largest amplitude are usually described as dominant. However, the relative influence of a cycle per time unit - i.e., per bar on the chart - is of much greater interest. Therefore, the so-called cycle strength is ultimately introduced here and used as a measurement value for the cycle with the greatest influence per price bar. The value with the highest cycle strength will be used again later as representing the "Dominant Cycle".

These results and the mathematical method alone would fill an entire book on their own. As this publication is designed for practical purposes and aims to advance the method’s successful application in cycle analysis, this book is structured in the following main chapters:

  1. Cycles Explained - To introduce basic parameters and knowledge
  2. Applications and Examples - To illustrate the analytical algorithm
  3. Scanner Framework - To explain how the algorithm is designed
  4. Real World Examples - To see how it works in live situations

 

Cycles Explained

Introduction to Cycles

Cycles Explained

Cycle Analysis Explained

Why are cycles so important?

Our daily work schedule is determined by the day and night cycles that come with the rotation of the Earth around its own axis. The orbit of the Moon around the Earth causes the tides of the oceans.

Gardeners have long understood the advantages of working with cycles to ensure successful germination of seeds and high-quality harvest. They work in harmony with the cycles to attain the best results, the best crops.

These are just a few cycles with recurring, dominant conditions that affect all living beings on Earth. So if we are able to recognize the current dominant cycle, we are able to project and predict behavior into the future. Let us start with a simple example to illustrate the power of today’s digital signal processing.

Weather

Figure 1 shows the daily outdoor temperature in Hamburg, Germany (blue). This raw data was fed into a digital signal processor to derive the current underlying dominant cycle and project this cycle into the future (purple).

image-1589439326300.png

Figure 1: Local temperature Hamburg Germany, Dominant Cycle Length: 359 days, Source: https://cycle.tools (Jan. 2020)

The cycle detection analyzed the dataset and provides us with useful information about the underlying active cycles in this dataset. For the daytime temperature this may be obvious to any eye anyway, but should serve as an introductory example. There are three important structures that have to be identified by any cycle detection engine:

  1. Which cycles are active in this data set?
  2. How long are the active dominant cycles?
  3. Where is the high/low of these cycles aligned on the time scale?

Any cycle detection algorithm must output this information from the analyzed raw data set. In our case, the information is displayed on the right side of the graph as a “cycle list”.

How to sort the active cycles?

The table view at the right part of Figure 1 provides an answer, namely which cycles are currently active, with the most active cycle being plotted at the top of the list. We can identify the most dominant cycle by its amplitude relative to the other detected cycles. In this case there is only one dominant cycle with an amplitude of 13, followed by the next relevant cycle with an amplitude of about 3. The second cycle’s relative size is too small compared to the first to play an important role. We could therefore skip each of the “smaller” cycles in terms of their amplitude compared to the highest ranking cycle with an amplitude of 13.

What is the length of active cycle?

To answer the second question, the “lengths” information is displayed. For the highest-ranking cycle we see the length of 359 days. This is nothing other than the annual seasonal cycle for a location in Central Europe. But you can see that the recognition algorithm does actually not know that it is “weather”, but is capable of extracting the length from the raw data for us.

Where are we in that cycle?

After all, the cycle status is the third important piece of information we need: When have the ups and downs of the cycle with a length of 358 days occurred in the past? In technical terminology, this is called the current phase of the dominant cycle. It is represented by the recorded overlay cycle in which the highs and lows are shown in the output as purple line: The low occurs in January/February, while the highs take place in July of that year.

Using these 3 pieces of information about the dominant cycle, we can start with a prediction: We would expect the next low in early February and the next high in July. The dominant cycle is extended into the future. Well, this is an overly simple example, but it shows that identifying and forecasting cycles will provide useful information for future planning.

So that’s the trump card: Any cycle detection algorithm must provide information about

  1. What are the currently active dominant cycles?
  2. How long is the active cycle?
  3. When are past and future highs / lows?
Sentiment data

Lets continue and apply this algorithm to the financial data set. Similar to the weather cycle, sentiment cycles are often the driving force behind ups and downs in the major markets.

Understanding the sentiment cycles in financial stress is critical to generating returns in the current market environment. Sentiment cycles influence the movement of financial markets and are directly related to people’s moods. Getting a handle on sentiment cycles in the market would substantially improve one’s trading ability.

Figure 2 shows the same technique applied to the VIX index, also called the “fear index”. The blue plot is the raw data of the daily VIX data at the time of today’s writing. The detected dominant cycle is shown as an overlay with its length and its phase/time alignment, making it possible to draw the mood cycle into the future.

image-1589439314523.png

Figure 2: VIX Cycle, Dominant Cycle Length: 180 bars, Source: https://cycle.tools (13. Feb. 2020)

The reading of the VIX sentiment cycles is somewhat different when applied to stock market behavior: Data lows show windows of high confidence in the market and low fear of market participants, which in most cases refer to market highs of stocks and indices. On the other hand, data highs represent a state of high anxiety, which occurs in extreme forms at market lows in particular.

Reading the cycle in this way, one would predict a market high that will happen in the current period at the end of December 2019/beginning of 2020 and an expected market low that, according to the VIX cycles, could occur somewhere around April.

Similar to the identification and forecasting of weather/temperature cycles, we can now identify and predict sentiment cycles.

In terms of trading, one should never follow a purely static cycle forecast. The cycle-in-cycles approach should be used to cross-validate different related markets for the underlying active dominant cycles. If these related markets have cyclical synchronicity, the probability for successful trading strategies increases.

Global stock markets

Figure 3 now shows the same method applied to the S&P500 stock market index. The underlying detected cycle has a length of 173 bars and indicates a cycle high at the current time. This predicts a downward trend of the dominant cycle until mid 2020.

image-1589439296676.png

Figure 3: SP500, Dominant Cycle Length: 173 bars, Source: https://cycle.tools API / NT8 (13. Feb. 2020)

We have now discovered two linked cycles, a sentiment cycle with a length of about 180 bars, which indicates a low stress level in December 2019 with an indicative rising anxiety level. And a dominant S&P500 cycle, which leads a market with an expected downtrend until summer 2020. Both cycles are synchronous and parallel in length, timing and direction. This is the key information of a cycle analysis: Synchronous cycles in different data sets that could indicate a trend reversal for the market under investigation.

Well, we can go one step further now. Since more and more dominant cycles are active, you should also look at the 2-3 dominant cycles in a composite cycle diagram.

A composite cycle forecast

Figure 4 shows this idea when analyzing the active cycles for the Amazon stock price. See the list on the right for the current active cycles identified. The most interesting ones have been marked with the length of 169 bars and 70 bars. It is possible to select the most important ones based on the cycle Strength information and the Bartels Score. Not going into the details for these two mathematical parameters, let us simply select the two highest ones for the example. Now, instead of simply drawing the dominant cycle into the future, instead we use both selected dominant cycles for the overlay composite cycle display (purple) which is also extended in the unknown future.

image-1589439251828.png

Figure 4: Amazon Stock, Dominant Cycle Length: 169  & 70 bars, Source: https://cycle.tools (04. Feb. 2020)

The purple line shows the cycles with the length of 169 and 70 as well as their detected phase and time alignment in a composite representation. A composite plot is a summary of the detected cycles adding their phase and amplitude at a given time. One can see how well these two cycles in particular can explain the most important stock price movements at Amazon in the last 2 years.

It is interesting to note in this case that a similar composite cycle in Amazon stock price, as previously shown by Sentiment and the S&P500 index cycle, indicates a cyclical downtrend from January to summer 2020.

By combining different data sets and the analysis of the dominant cycle, we can detect a cyclical synchronicity between different markets and their dominant cycles.

The mathematical parameters of cycles allow us to project a kind of “window into the future”. With a projection of the next expected main turning points of the cycle or composite cycle. This information is valuable when it comes to trading and trading techniques.  Especially when you are able to identify similar dominant cycles and composite cycles in related markets which are “in-sync”.

The examples used have been kept simple and fairly static to show the basic use for cycle detection and prediction. The projections obtained must be updated with each new data point. It is therefore essential to not only perform this analysis once, statically, but to update it with each new data point.

Knowing how to use cyclical analysis should be part of any serious trading approach and can increase the probability of successful strategies. Because if a rhythmic oscillation is fairly regular and lasts for a sufficiently long time, it cannot be the result of chance. And the more predictable it becomes.

There is often a lack of simple, user-friendly applications to put this theory into practice. We have to work on spreading this knowledge and its application. Instead of the scientific-mathematical deepening of algorithms.

This theory can be applied to any change on our earth as well as to any change of human beings in order to understand their nature and predictable behavior.

Background Information

How does the shown approach work used in these examples?

The technique applied is based on a digital processing algorithm that does all the hard work and maths to derive the dominant cycle in a way that is useful for the non-technical user.

More information on the cycle scanner framework used for these examples can be found in this chapter.

 

Cycles Explained

Cycle Parameters Explained

The following chart summarizes all relevant parameters related to a "perfect" sinewave cyle:

PerfectCycle.jpg

 
What is Frequency?

Frequency is the number of times a specified event occurs within a specified time interval.
Example:5 cycles in 1 second= 5 Hz

1 cycle in 16 days = 0.0625 cycles/day = 723 nHz

 


 
What is Strength?

Strength is the relative amplitude of a given cycle per time interval. (“amplitude per bar”).
Example:
A = 213 , d = 16, s = 13.2 per d

Read more on Cycle Strength in how to "Rank" cycles here.

 


 
What is Bartels Score?

The Bartels score provides a direct measure of the likelihood that a given cycle is genuine and not random. It measures the stability of the amplitude and phase of each cycle.

Formula:
B score %= (1-Bartels Value)*100

Range:
0 % : cycle influenced by random events, not significant
100 %: cycle is significant / genuine

Read more on how to validate cycles with the Bartels score here

 

Cycles Explained

Dynamic Nature of Cycles

Cycles are not static

Dominant Cycles morph over time because of the nature of inner parameters of length and phase. Active Dominant Cycles do not abruptly jump from one length (e.g., 50) to another (e.g., 120). Typically, one dominant cycle will remain active for a longer period and vary around the core parameters. The “genes” of the cycle in terms of length, phase, and amplitude are not fixed and will morph around the dominant mean parameters.

The assumption that cycles are static over time is misleading for forecasting and cycle prediction purposes.

These periodic motions abound both in nature and the man-made world. Examples include a heartbeat or the cyclic movements of planets. Although many real motions are intrinsically repeated, few are perfectly periodic. For example, a walker's stride frequency may vary, and a heart may beat slower or faster.

Once an individual is in a dominant state (such as sitting to write a book), the heartbeat cycle will stabilize at an approximate rate of 85 bpm. However, the exact cycle will not stay static at 85 bpm but will vary +/- 10%. The variance is not considered a new heartbeat cycle at 87 bpm or 83 bpm, but is considered the same dominant, active vibration.

This pattern can be observed in the environment in addition to mathematical equations. Real cyclic motions are not perfectly even; the period varies slightly from one cycle to the next because of changing physical environmental factors.

Steve Puetz, a well known cycle researcher, calles this “Period variability“:

“Period variability – Many natural cycles exhibit considerable variation between repetitions. For instance, the sunspot cycle has an average period of ∼10.75-yr. However, over the past 300 years, individual cycles varied from 9-yr to 14-yr. Many other natural cycles exhibit similar variation around mean periods.” Puetz (2014): in Chaos, Solitons & Fractals

This dynamic behavior is also valid for most data-series which are based on real-world cycles.However, anticipating current values for length and cycle offset in real time is crucial to identifying the next turn. It requires an awareness of the active dominant cycle parameter and requires the ability to verify and track the real current status and dynamic variations that facilitate projection of the next significant event.

Figures 1 to 3 provide a step-by-step illustration of these effects. The illustrations show a grey static cycle. The variation dynamic in the cycle is represented by the red one with parameters that morph slightly over time. The marked points A to D represent the deviation between the ideal static and the dynamic cycle.

Effect A: Shifts in Cycle Length

The first effect is contraction and extraction of cycles, or the “cycle breath.” Possible cycles are detected from the available data on the left side of the chart. Points A and B show an acceptable fit between both cycles. However, the red dynamic cycle has a greater parameter length. The past data reveal that this is not significant, and there is a good fit for the theoretical static and the dynamic cycle at point A and B. Unfortunately, the future projection area on the right side of the chart where trading takes place reflects an increasing deviation between the static and dynamic cycle. The difference between the static and dynamic cycle at points C and D is now relatively high.

Cycle Length Shifts

The real “dynamic” cycle has a parameter with a slightly greater length. The consequence is that future deviations increase even when the deviations between the theoretical and real cycle are not visible in the area of analysis. These differences are crucial for trading. As trading occurs on the right side of the chart, the core parameters now and for the next expected cycle turn must be detected. A perfect fit of past data or a two-year projection is not a concern. The priority is the here and now, not a mathematical fit with the past. Current market turns must be in sync with the dynamic cycle to detect the next turn.

Therefore, just as an individual heartbeat cycle approximates a core number, the cycle length will vary around the dominant parameter +/- 5%. Following only the theoretical static cycle will not provide information concerning the next anticipated turning points. However, this is not the only effect.

Animated Video - Length Shifts:


Effect B: Shifts in Cycle Phase

The next effect is “offset shifts.” In this case, the cycle length parameter is the same between the static theoretical and the dynamic cycle. The dynamic cycle at point A presents a slight offset shift at the top. In mathematical terms, the phase parameter has morphed. This effect remains fixed into the future. A static deviation is observed between the highs and the lows.