Time Series Analysis 2: Analyzing Characteristic Movements
Time series, in economics and other areas, often have certain characteristic movements or components. By trying to break the data down into these characteristic movements, we can make the task of analyzing the series easier. Once a series is understood, we can attempt to make predictions based on the series. Of course, many factors influence economic data. Even if past data for a stock shows a characteristic trend, a sudden breakthrough by a competitor could cause a sudden, unexpected drop, or an announcement of a new product could cause a surprising increase in price.
Because of this, you should never stake too much on mathematical predictions, no matter how correct they appear to be. Any time you invest in a stock, even if it seems to have a clear long-term trend of growth, you are taking a risk. Some stocks are, of course, riskier than others.
Now that we have that disclaimer out of the way, let's move on to time series analysis. Often a time series can be broken down into four basic components:
Now that we know about the basic components, we need to know how to separate each part out from the whole.We will assume that we have data Y which is a function of time, t. We will attempt to break Y up into parts L (long-term trend), C (cyclic), S (seasonal), and N (noise or irregularities). In other words,
Y = L * C * S * N.
The first step in resolving the component parts is to find L, the long-term trend. One method is to use least-squares regression, as described in the last section. Another is to simply draw it in freehand, though this is obviously inaccurate. Yet another method is to apply a filter to the data, smoothing it out and eliminating the minor fluctuations.
Possibly the simples such filter is a moving-average. This involves replacing each point with an average of it and the other points around it. For example, suppose we have the data 3, 4, 6, 9, 10, 12. Let us take a moving average of each 3 numbers. The first number in our new list is (3 + 4 + 6)/3 = 4.33, to two decimal places. The next number is (4+6+9)/3 = 6.33. Next we have (6+9+10)/3 = 8.33. After this is (9+10+12)/3 = 10.33. Wow! Notice that in each step we add two. We've taken a nonlinear data set with small fluctuations and turned it into a linear one. While not every problem will work out this nicely, moving averages are useful for smoothing data and finding the long-term trend. The only drawback is that you lose the beginning and end of your data set.
The next step after determining L is to determine the seasonal component S. This can be done by examining the percentage change from month to month. Once this is done, we resolve the component C, the cyclic component. We can see that by dividing our overall time series, Y, by the product of L and S, which we have determined, gives C * N. The noise background should be light, and so a moving average will eliminate it and give us C. The noise will be the remainder after all other components are divided out.
Another method of finding the form of a function consisting of various components of different frequencies is to use Fourier analysis. This breaks any function down into a sum of sine and cosine functions (these functions look like waves that repeat over and over). Advanced Fourier techniques may be used to eliminate noise and retrieve lost data signals, for example. There are many good books on Fourier analysis available if you are interested in the subject.