Finding Cycles In Time Series Data by A. Bruce Johnson, Ph.D.
To improve the process of removing trend from stock market prices to see underlying cyclic movement, I have combined triangular moving averages with the moving average convergence/divergence (MACD) concept of calculating the difference between two moving averages.
Figures 1-9 indicate that this new technique shows some promise, at the cost of some moving average lag. This loss is redeemed by the gain of a stationary curve that retains, and may reinforce, the cycles in the original data.
Trend can be removed from data in a number of ways before searching for cycles. Nearly all analysis of stock market prices, or any time series data, requires the removal of trend—that is, data must be made stationary. Popular techniques to remove trend are:
(1)Take first differences. Yesterday's value is subtracted from today's value, the day before yesterday's value from yesterday's, and so on.
(2)Use of residuals from regression. A least-squares trendline is fitted to the data. Then, for each time period, the value of the least-squares trend is subtracted from the value of the data.