In Search of Time Cycles in Financial Markets

Calculation of Moving Average and Detrending of Market Data

© Harry P. Schlanger

Mar 14, 2009
Searching for Cycles, Harry P. Schlanger
A detrending approach to finding market time cycles is simple and reasonably accurate. Two tools are used in combination: moving average and deviations from raw data.

A previous article described the existence and rhythms of time cycles in financial markets. Market Analysts have modeled these cycles in terms of fixed length time periods (periodic) or as dynamic systems (aperiodic).

There are a number of statistical methods that can be used to search for periodic time cycles that work most of the time.

Some are very sophisticated and very accurate, requiring the use of computer power, such as spectral analysis. Others are simple and can be implemented very quickly, such as measuring the distance between successive low or high points, but they are obviously less reliable.

There is, however, one method – a detrending approach, which is also relatively simple to implement and provides acceptable results.

Detrending - Deviations from a Moving Average

The use of deviations from a centered moving average is actually the traditional method of measuring cyclical fluctuations, and the passage of time has done little to undermine its usefulness. The basic analysis consists of two parts:

  • Calculating an arithmetic moving average to smooth the time series data. This smoothed data is then used as a trend (see sample calculation in Figure 1).
  • Each number from the original series is divided by the appropriate average – the middle term - from the moving average series.

The result of this procedure is that the analyst has access to both a trend and a fluctuation. The top part in Figure 2 shows the raw data, the middle part is the calculated moving average and the lower part shows the fluctuation, a result of dividing the raw data by the moving average. If the measured period, from trough to trough or peak to peak, is constant, then a fixed cycle is present in the data. This cycle can then be used to predict market reversal points.

Length of the Moving Average

Figure 3 shows the effect different lengths of moving average on an ideal 9-year rhythm (Dewey and Dakin). It is evident that moving average has no effect on the period, or length of the rhythm in the series being averaged. But it does have an effect upon the amplitude of the waves. This can be generalized as:

  • Any moving average with a length less than the period of a rhythm diminishes the amplitude
  • The more nearly the length of moving average approaches the period of the rhythm, the more nearly it removes it.
  • When the length of the moving average equals the period, it completely removes it.

Similarly for the case of deviations from the moving average, the rhythm is also unaffected, regardless of the length of the moving average. However, note the amplitude is affected.

Problems with Cycle Analysis of Fixed Length

In general, assuming that cycles have a fixed length produces a desired result some of the time. The analysis can be problematic because true market cycles are actually aperiodic, meaning they expand or contract dynamically according to the specific market. This is a feature of chaos theory, which is a more general and appropriate approach to use on the fractal nature of markets.

Additionally, more than one cycle can be present in a given time series. It is useful to start the detrend process with a short-term average to damp down short-term cycles and thereby reveal longer-term cycles.

References:

  1. “Forecasting Financial Markets – Technical Analysis and the Dynamics of Price”, Tony Plummer. John Wiley & Sons, NY, 1991.
  2. "Cycles - the Science of Prediction", Edward R. Dewey and Edwin F. Dakin, Henry Holt & Co, NY, 1947.

The copyright of the article In Search of Time Cycles in Financial Markets in Investment is owned by Harry P. Schlanger. Permission to republish In Search of Time Cycles in Financial Markets in print or online must be granted by the author in writing.


Searching for Cycles, Harry P. Schlanger
Fig 1. Calculation of Moving Average, Harry P. Schlanger
Fig 2. Detrending the Market Data, Harry P. Schlanger
Fig 3. Effect of Length of Moving Average, Harry P. Schlanger
 


Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo