Trend of Time Series

From MM*Stat International

Jump to: navigation, search
English
Português
Français
‎Español
Italiano
Nederlands


The analysis of time series starts with the extraction of the long-run behavior or trend from the observed values. There are a variety of different methods, leading to different trend lines for one and the same series. The choice of a particular method requires a comparison of advantages and disadvantages. In this section we will be present the moving average and least squares methods.

Method of moving average

In this method the estimated trend at every point in time is a weighted average of the original observed data. : with The set of weights is called the filter. The selection of the filter depends on periodic/seasonal variations and the desired smoothness. We will usually employ symmetric filters (). They include future as well as past periods. If the weights of a filter are equal for all , the filter is called a simple moving average, if not, we call it a weighted moving average. Support area: The weighted average will be calculated in an window (area) of the original data. The choice of and determine the length of the window of data that are used for the the support area. As a matter of principle the series of estimated trends can only be as long as the original series (equality, if ). The longer the support area selected, the smaller the number of trend values that can be calculated and the smoother is the resulting trend series. Frequently used filters for time series with seasonal variations: Symmetric filters () are often specified so that the weights are in square brackets. For the smoothing of seasonal time series the following filter can be applied. The reason is, that they filter (smooth) out the periodic variations from original data for the trend calculation.

  • six-month data
  • quarterly data
  • monthly data

Example (quarterly data): Number of newly registered cars in Berlin 1977:1 - 1989:4Filter: red: original seriesblack: smoothed series (trend)

En folimg377.gif

Least-squares method

The Least-squares method is a second approach to estimate the trend component of a time series. The method was presented in the regression analysis chapter. We select a set of functions, which describe the trend as a function of time and estimate the parameters of these functions. These parameter values minimize the sum of squared variations of the trend from the original data. In the following we derive expressions for the least squares estimates of a simple linear trend and exponential trend functions.

Linear trend function

Suppose that the variable depends linearly on time The sum of the squared residuals clearly depends on the parameters and as Minimization results in the following estimators of the parameters. Example: Price index for foreign services in Berlin, 1977:1 - 1989:4 where corresponds to 1976:4.

En folimg386.gif

Exponential trend

Suppose that the variable exhibits an exponential dependence on time of the form or, similarly, in logarithmic form Least squares minimization results in the following estimators of the parameters. Example: Number of phones in the US (measured in ) 1900 - 1970 where corresponds to the year 1899.

En folimg394.gif

Explanation Select a time series which will be smoothed by XploRe. You can edit the XploRe code directly. Explanation You can now select a time series, which will be separated into trend and residuals. The trend is estimated by the method of moving average. In addition several filters are available. Suggestion Select successively different filters and observe the effects of your selection on the estimated trend. You should also pay attention to the residuals. For example, are there outliers? Do the fluctuations of the residuals change over time? Data The following data are available.

  • DAX stock market indexYearly percentage changes of the DAX observed at December 31.Time period: December 1960 – December 1997 Periodicity (frequency): Yearly data Note: until 1987 the index of the Deutsche Börsenzeitung is reported
  • Public incomePercentage change in the incomes of all public households in GermanyTime period: 1951 – 1991 Periodicity (frequency): Yearly data
  • Balance of paymentsBalance of payments of Germany Time period: 1977 – 1995 Periodicity (frequency): Yearly data
  • National debtIndebtedness of all public households in Germany (yearly change in %) Time period: 1967:4 – 1997:4Periodicity (frequency): Quarterly data

En folnode5 b k 1 6.gif

The following time series describes the development of the balance of payments (in Millions of DM) of Germany in the years 1977 - 1995. The trend of these time series is estimated by the moving average method. Recall, this approach uses the formula Since past and future values should have equal weight for the trend estimation in , we choose . For the smoothing of yearly data a simple moving average is applied, where all weights are identical. The weights must add to 1 over the entire supporting area, that means: In the following table the moving average T(t) was calculated for , and .

year balance of payments
1977 1 9478
1978 2 18003 5483,3
1979 3 -11031 -7169,3 -4754,2
1980 4 -28480 -17084 -4676,6 -476
1981 5 -11741 -10118,3 -6162,6 2161,4
1982 6 9866 2899,3 1631,6 6493,4
1983 7 10573 16126,3 16993 20325,4
1984 8 27940 28946,7 36499,8 36122,1
1985 9 48327 54020 50946 50418,9
1986 10 85793 72072,3 66498,6 63874,7
1987 11 82097 85408,7 81722 64551,3
1988 12 88336 91496,7 75118,4 56000,4
1989 13 104057 69234 51576,6 44779,3
1990 14 15309 29150 29113 29186
1991 15 -31916 -15609,3 6774,4 12573,9
1992 16 -30221 -28498 -20875,2 -4876,7
1993 17 -23357 -29256,3 -30700,6
1994 18 -34191 -30455,3
1995 19 -33818

If , one cannot estimate a trend for the period , because the value of the time series is unknown in . For the estimated trend is . In the following diagram the three alternative estimations of the long-run trend and the original series are compared.

En folnode5 b k 1 5.gif

One detects two important characteristics of the procedure:

  • The larger the supporting area, over which the trend is estimated, the fewer the number of values of the trend that can be estimated.
  • The estimated trend becomes smoother with increased supporting area (i.e. the larger is b+a).

order of moving average domain: number () of past observations used for the calculation of the average.

  • odd order :

    Example:

    order
     n.a.  n.a.
     n.a.
     n.a.
     n.a.  n.a.

    Where n.a., in the table, means that it is not feasible to estimate the trend for this particular point in time given our data and weighting structure.

  • even order :

    Example:

    order
     n.a.  n.a.
     n.a.
    n.a.
     n.a.   n.a.