Cycles Analysis Technical Trading Software

Catalyst Stocks Premium Stock Pick Service

Learn how to pick value stocks

Get Instant Access

Cycles are natural phenomena. They occur in everyday life. Planets move in elliptical paths round the Sun, and day and night alternate. The phases of the Moon occur in cycles, weather changes in cycles, and in many parts of the world there are four seasons in a year. Animals have cyclical sleep patterns; rivers meander; and, of course, the economic cycle moves through boom, recession, depression, and recovery. Hence, it is no surprise that financial market cycles exist. Stock prices, commodity prices, currency prices, bond prices, and futures prices all undergo cyclical movements.

The power of computers makes it easier to identify market cycles, because they can strip out some of the underlying data that obscures the true nature of the cycle and make it easier to project the likely length and incidence of future cycles.

Cycles analysis basics

You can measure and analyze cycles using two separate concepts: amplitude and phase. Take the example of a dot on the rim of a wheel as it moves counterclockwise as shown by the small shaded circle in Figure 8.1.

As the dot moves from O to A and back round to the original spot, the maximum amplitude is equal to its radius when it has moved 90 degrees and 270 degrees. At any point in time, as the rotation continues the amplitude can be defined by the angle it is rotated from its origin. Now look what happens when the pattern is opened up, to the right of the vertical axis. The path of the shaded dot traces out the mathematical concept known as a sine wave. There are four phases of this cycle, one up and one down phase, each above and below the horizontal line.

Amplitude - the maximum height or depth reached during a cycle.

Cycle finders - software that attempts to identify cyclical patterns in financial market prices.

Dominant cycle - the main underlying cycle in a price series. Other shorter cycles may occur within its confines.

Fourier Transforms - a mathematical technique for identifying cycle patterns.

Figure 8.1 Cycle

Figure 8.1 Cycle

Dominant Cycle Prediction John Ehlers

New terms

Managed account ratio (MAR) - the ratio of the overall return on a series of traders versus the maximum drawdown experienced.

Maximum Entropy Spectral Analysis (MESA) - a type of cycle finding analysis developed by John Ehlers.

Murphy's Law - anything that can go wrong will go wrong.

Oscillator signals - "triggers" that identify trade entry and exit points in cycle-finding software.

Phase - is the angle that a particular point on a cycle makes with its starting point.

Sharpe ratio - measure of risk-adjusted return on an investment. Defined as the rate of return less risk-free rate of return, divided by the volatility of the returns.

Sine wave indicator - a technical indicator suggesting the presence of a cyclical pattern that conforms to the mathematical concept of a sine wave.

Each cycle can be subdivided into two. Within the first cycle there could be two smaller cycles, each with half the amplitude of the larger one, and within these subcycles another two smaller cycles, each with one-quarter the amplitude of the first, as shown in Figure 8.2. A good analogy is the hour, minute, and second hands of a clock. The biggest cycle is traced out by the hour hand, which takes an hour to move through one cycle. Within that will be 60 cycles of the minute hand and within the cycle of the minute hand will be 60 cycles of the second hand.

Figure 8.2 Cycles within cycles

Market cycles are often not as clean as the above illustrations. Very often, they are the result of combining several cycles of different amplitudes and phases together as shown in Figure 8.3. Analysts will try to isolate each of the cycles and then decide which is dominant. It's also usually the case, at least in financial markets, that when all the cycles coincide is the most likely time for a major market turning point.

Three methods can be used to identify market cycles:

• cyclc finders

• Fourier Transforms (FFTs)

• maximum entropy spectral analysis (MESA).

Cycle finders are available in many charting software packages as a standard tool. They work by measuring the spacing between two major lows (or lows of the same degree) and assume that spacing between successive future lows will be the same. But in real life, cycle lengths do vary and so the software would need to be adjusted constantly to identify them accurately. As shown in Figure 8.4, only some of the lows coincided with the fixed cycle finder.

FFTs are used in the fields of science and engineering. It sounds complicated, but basically (and without delving into the underlying mathematics) the technique separates the cycles or waveform into its basic cycles or sine waves of different frequencies. In other words, it's the opposite of adding the cycles together.

Some charting software does provide this. In Figure 8.5, a FFT was applied to the AUD/USD exchange rate and three cycles of periods 512, 79, and 33 were identified.

However, using FFTs involves accepting some constraints.

First, the technique assumes that the market cycles are not time limited. That's to say, the assumption is made that the cycles will go on forever, or at least for a long time. However, market cycles are often very short and it might

Figure 8.3 Combining cycles

Figure 8.3 Combining cycles

Figure 8.5 FFT applied to AUD/USD
Source: Mctastock

not be possible to recover the FFTs from the limited sample of data available in very short term cycles.

Another constraint is that the number of cycles that can be picked up in this way is limited by the data sample. In other words, if you only have 120 days of data, the maximum cycle you can identify is a 120-day cycle. You will therefore miss out any cycles that are larger than that unless you increase the scope of your data sample.

Maximum entropy spectral analysis (MESA) is not restricted bv the sample size or the amount of market data available. In fact, it uses a very small amount of market data to decipher the cycles.

Entropy, another scientific term, is fairly easy to explain in stock market terms. It's generally associated with disorder, or the amount of noise in the information. High entropy means lots of disorder or noise and low entropy-means less chaotic conditions and less noise. Some traders actually use the term "noise" to describe the random and inconsequential price movements that occur on a day-to-day basis.

The more improbable an event is the more information can be obtained from the noise that accompanies it. The more probable an event is, and the less noise accompanying it, the less information there is for a cycle finder to work on.

The idea behind MESA, as applied to financial markets - essentially devised by John Ehlers (see below) - is to remove cyclical influences from the data and then to examine what remains for clues about the direction of the price in the future. The process is repeated time and again until the maximum numbers of clues have been sieved out of the data.

11» Software MESA2002 — MESA Software

John Ehlers received his BSEE and MSEE from the University of Missouri and did his doctoral work at The George Washington University, specializing in fields and waves and information theory. He is currently an Engineering Fellow with a large aerospace company. Here's how he got started:

"I got a nice bonus in 1978.1 had a choice of either investing in real estate or the market. The idea of being a landlord and having to repair toilets in the middle of the night didn't appeal to me - so the market was the natural choice to make.

"Commodities appealed to me, both because of the leverage afforded by margin and because I could make money trading both long and short. I started trading grains, and my broker had me chasing rainstorms through every cornfield in Iowa. As an engineer, this fundamental approach held little charm, and so I investigated technical analysis.

"I understood technical analysis, but questioned why fixed numbers were used in the indicators when the market was obviously varying all the time. For example, Welles Wilder suggested using 14 bars to compute his classic relative strength indicator (RSI).

"About this same time 1 was exposed to the maximum entropy spectral analysis (MESA) technique in the course of my engineering work. I couldn't use it there, but I knew I could apply it to my trading. It was clear to me that traditional Fourier Transforms were not appropriate for market analysis because they require the data to be stationary for a long period.

"The market is a lot of things, but one thing it is not is stationary. In any event, the short data length that could be accommodated by MESA made cycle analysis feasible for the market. The cycle analysis, in turn, made it possible to make traditional indicators adapt automatically to current market conditions.

"I wrote some articles about the MESA approach, popularizing the analysis techniques. Before I knew it, I was a vendor. The indicators grew in popularity and I hired Mike Barna to program them for TradeStation because I didn't want to learn another computer language at the time.

"While programming the indicators, Mike recognized the benefits of adapting to current market conditions. He applied this concept to one of the leading S&P trading systems at the time, "R-Breaker" by Rick Saidenberg. To cut a long story short, we introduced R-MESA as a new system that combined the best features of R-Breaker and MESA.

"1 subsequently developed other trading systems for other markets, such as Sierra Hotel for the currency markets and T-MESA as another S&P day trading system. Over the years, Mike and I have collaborated on several successful trading systems. We now offer automatic systems for many of the major markets."

MESA's mathematical engine is an algorithm devised as part of his doctoral thesis by John Parker Burg (Stanford University, 1975). MESA has been using it since 1978. It measures short-term cycles and makes the variables adapt to the measured cycles. One application is to determine whether the mode of the market is cyclical or trending as shown in Figure 8.6.

Figure 8.6 MESA

Figure 8.6 MESA

To revert to the analogy we used earlier, the basic operation of MHSA2002 is to measure the "noise" content of the price data using the MESA method.

When the data is noise-free, stable, and consistent, cycles can be identified. The spectral ("noise") display segment is a contour map at the bottom of the chart. This shows the quality of the cycle measurement. When the measured cycles are erratic, or when the spectral energy is "splattered" across the range of cycle periods, the market is said to be in "trend mode." Even when not viewed in colour, a glance at the chart illustrates this.

Whether or not the market is trending or in a cyclical pattern is sensed by examining the phase of the longer "dominant" cycle. A fundamental definition of a cycle is a constant rate change of phase. For example, a 10-day cycle changes phase at the rate of 36 degrees per day to complete the 360 degrees in each cycle.

Trend mode can therefore be spotted when the cycle's phase fails to conform to this regular pattern. The phase presentation in the second from bottom display segment of Figure 8.6 shows the phase changing at a constant rate, forming a regular saw tooth pattern when a cycle is operating, but changing erratically in the two trending periods on either side.

The sine wave indicator in the second from top display segment gives the position reversal signals by the crossing of the two lines. Note these two lines cross regularly only when the prices are in the cycle mode and, unlike many oscillator signals, do not give false signals when the market is simply trending. The sine wave indicator anticipates the turning points in the cycle. It is generated by adding 45 degrees to the measured phase angle and plotting the sine of it.

The strengths and direction of the trend are shown by the two adaptive moving averages overlaid on the price bars in the topmost segment of the figure. The slower of these averages is an instantaneous trend line, obtained by completely removing the dominant cycle component. It produces a general view of the direction of the trend. The faster one, called a minimum lag filter, can be used to predict the next likely movement in the price.

MESA2002 (in both its standalone version and the one incorporated into the well known TradeStation chart software) makes a prediction of prices 10 bars into the future. This prediction is made on the assumption that the measured dominant cycle will continue into the future with the same amplitude and phase. Therefore, the prediction has greater validity when the prices are identified as being in a cycle rather than a trend pattern.

Several other proprietary and standard technical indicators are included with MESA 2002. They include:

Awesome An optimum predictive oscillator

Period Homodyne discriminator that accurately measures the dominant cycle

Hilbert oscillator

Instantaneous trend line

Kaiman filter Mode

Ehlers filter MAMA

Cycle-adaptive indicators

Sine trend system Zero lag system

Tells you where you are within the cycle

An ad v a need oscillator that avoids whipsaw trades in trends

The signal to noise ratio tells you when not to trade

An oscillator formed from the Hilbert transform

The instantaneous trend line is created by removing the dominant cycle

Minimizes filter lag

A paintbar that tells you whether the market is in a trend or cycle mode

A responsive nonlinear filter

(MESA adaptive moving average) The mother of all adaptive MAs


Switches between cycle and trend modes to adapt

An intraday trading system

MESA2002 is available for a variety of trading platforms, including TradeStation (versions 4.0, 2000i, and 6.0), SuperCharts, NeuroShellTrader, and in a standalone version. The standalone version reads five different data types directly, including Metastock, CSI, ASCII, and TC2000. Users can generate their own custom portfolio and have MESA2002 automatically scan that portfolio for buying and selling opportunities.

Pricing for the various versions of the package is shown below (data costs are extra).

MESA2002 (standalone) $350

MESA2002 for NeuroShell Trader. $350

MESA2002 for TradeStation2000i or 6.0 $495

MESA2002 for TradeStation 4.0. $495

MESA2002 for SuperCharts. $250

Was this article helpful?

0 0
Insiders Online Stocks Trading Tips

Insiders Online Stocks Trading Tips

We Are Not To Be Held Responsible If Your Online Trading Profits Start To Skyrocket. Always Been Interested In Online Trading? But Super-Confused And Not Sure Where To Even Start? Fret Not! Learning It Is A Cakewalk, Only If You Have The Right Guidance.

Get My Free Ebook


  • debbie
    How to use sine wave indicator?
    10 months ago

Post a comment