Chapter 3
Chapter 3
3.1. Introduction
Secular trend is a long term movement in a time series. It is isolating or determining secular
trend (magnitude and direction) of the general tendency of the time series observations during
long period of time. Or it is extracting the trend component from the time series, so that
reasonable prediction about the future can be made, to compare two or more time series over
different periods of time and to have a general idea about the pattern or the behavior of the
phenomenon under consideration.
Admasu M . Page 1
MTU Time series Analysis chapter -3
The following points must be kept in mind in drawing a freehand smooth curve:
1. The curve is smooth.
2. The numbers of points above the line or curve are equal to the points below it.
3. The sum of vertical deviations of the points above the smoothed line is equal to the sum of
the vertical deviations of the points below the line. In this way the positive deviations will
cancel the negative deviations. These deviations are the effects of seasonal cyclical and
irregular variations and by this process they are eliminated.
4. The sum of the squares of the vertical deviations from the trend line curve is minimum.
(This is one of the characteristics of the trend line fitted by the method of lest squares )
Merits
It is very simplest method for study trend values and easy to draw trend.
Sometimes the trend line drawn by the statistician experienced in computing trend
may be considered better than a trend line fitted by the use of a mathematical formula.
Although the free hand curves method is not recommended for beginners, it has
considerable merits in the hands of experienced statisticians and widely used in
applied situations.
Demerits:
This method is highly subjective and curve varies from person to person who draws it.
The work must be handled by skilled and experienced people.
Since the method is subjective, the prediction may not be reliable.
While drawing a trend line through this method a careful job has to be done.
Admasu M . Page 2
MTU Time series Analysis chapter -3
This method is to estimate the trend pattern by divide the series in to equal parts and
computing the averages of each part.
Example: Estimate the trend pattern by semi-average method by divide it on 4 equal parts.
T 1 2 3 4 5 6 7 8 9 10 11 12
Yt 9 8 9 12 9 12 11 7 13 9 11 12
S-AM= 8.67 11 10.33 10.67
𝑇̂t
15
10
Yt
5 Tt -hat
error
0
1 2 3 4 5 6 7 8 9 10 11 12
-5
Merits:
This method is simple to understand as compare to moving average method and
method of least squares.
This is an objective method of measuring trend as everyone who applies this
method is bound to get the same result.
Demerits:
The method assumes straight line relationship between the plotted points
regardless of the fact whether that relationship exists or not.
The main drawback of this method is if we add some more data to the
original data then whole calculation is to be done again for the new data to
get the trend values and the trend line also changes.
As the A.M of each half is calculated, an extreme value in any half will
greatly affect the points and hence trend calculated through these points
may not be precise enough for forecasting the future.
iii) Least Square Method
Admasu M . Page 3
MTU Time series Analysis chapter -3
Suppose that all observations from the origin of time through the current period; say Y 1, Y2,
Y3,…, YN are available. The least squares criterion is to choose μ so as to minimize sum of
𝑑𝑆𝑆𝐸
the squares of error (SSE); i. e. SSE = ∑𝑁 2
𝑡=1(𝑌𝑡 − 𝜇̂ ) . From ̂
= 0 one can obtains 𝜇̂ =
𝑑𝜇
1
∑ 𝑌𝑡 . Therefore, 𝜇̂ is the estimates of trend pattern in the series.
𝑁
Example: estimate the trend for the following time series using the least square methods.
T 1 2 3 4 5 6 7 8 9 10 11 12
Data1 10 9 11 10 12 13 12 13 14 12 15 12
Data2 14 15 10 14 17 12 15 11 12 18
Estimated values for the trend component are 11.92 and 13.8 for Data1and Data2
respectively.
20
20
15 15
10 Data1 10 Data2
Tt-hat Tt-hat
5 5
0 0
1 3 5 7 9 11 1 2 3 4 5 6 7 8 9 10
slowly with time, it is reasonable to give more weights to observations nearby in time are
likely to be close in values. Here there are two moving average methods to estimate Trend
component.
Method 1: Simple Moving Average (Odd Order, k) it is denoted by kMA and calculates for
all t except for those at the most beginning and end. At each period, the oldest observation is
discarded and the nearest is included to the set.
Admasu M . Page 4
MTU Time series Analysis chapter -3
1
Formula:𝑇̂t = Mt = kMA= (𝑌𝑡−𝑚 + 𝑌𝑡−𝑚+1 + … + 𝑌𝑡 + 𝑌𝑡+1 + ⋯ + 𝑌𝑡+𝑚 ), where m =
𝑘
𝑘−1
and Ytis the midpoint in the range of k.
2
Method 2: Centered Moving Average (Even Order, k)-when we computed the average of the
1st k periods we could have placed the average in the middle of the interval of k periods. This
works well with odd periods, but not so good for even periods. So where would we place the
first moving average when k is even? Technically, the moving average would fall at t= 2.5,
3.5, …. To avoid this problem we smooth the moving averages as making moving average of
the moving averages called Centered Moving Average, CMA denoted by 2*kMA. This
1 1
method weighs the series to be averaged be assigning 2𝑘 to the first and the last series and 𝑘 to
the rest of the middle series. Means greater weighs is given to the middle set of the series and
less weighs to the two extreme series.
is even number.
Example: Consider the following series and estimate the trend pattern by taking 3, 5 and 4
period moving average methods (that is k =3, 5 and 4).
t 1 2 3 4 5 6 7 8 9 10
Yt 14 15 10 14 17 12 15 11 12 18
Solution: for instance, the first 13 in the 3rd column (3MA) is 1/3 (14+15+10), 13.625 in the
5th column (2*4MA) is 1/8 (14+2*15+2*10+2*14+17).
T 1 2 3 4 5 6 7 8 9 10
Yt 14 15 10 14 17 12 15 11 12 18
3MA - 13 13 13.7 14.33 14.67 12.67 12.67 13.67 -
5MA - - 14 13.6 13.6 13.8 13.4 13.6 - -
𝑇̂t 2*4MA - - 13.63 13.6 13.875 14.125 13.13 13.25 - -
Admasu M . Page 5
MTU Time series Analysis chapter -3
20
15
Yt
10 3*MA
5*MA
5 2*4MA
0
1 2 3 4 5 6 7 8 9 10
Therefore, the estimated trend,𝑇̂t, is either 3MA or 5MA or 2*4MA and the best one is an
estimate that have minimum mean square error (MSE) among 3MA, 5MA or 2*4MA.
In the exponential smoothing, a new estimate is the combination of the random error, (Yt –
𝑌̂t) generated in the present time period. That is 𝑌̂t = 𝑌̂t-1 + 𝛼(𝜀𝑡−1 ) or 𝑌̂t+1 = 𝑌̂t + 𝛼(𝜀𝑡 ), where
𝜀𝑡 = Yt – 𝑌̂t then; 𝑌̂t+1 = 𝑌̂t + 𝛼(Yt– 𝑌̂t) = 𝛼Yt + (1 – 𝛼)𝑌̂t , again where
Admasu M . Page 6
MTU Time series Analysis chapter -3
𝑌̂t+1 = the new estimated value for the next time period.
̂ t+1 =𝑻
Therefore,𝒀 ̂ t = 𝜶𝐘𝐭 + (1 – 𝜶)𝒀
̂ t it is known as Simple Exponential Smoothing.
Why is it called “exponential”? Let us expand the simple exponential smoothing equation
by first substituting for 𝑌̂t in the simple exponential equation to obtain:
By substituting for 𝑌̂t-1, and so forth, until we reach 𝑌̂0, we will ultimately get:
𝑇̂t = ∑𝑡−1 k 𝑡̂
𝑘=0 𝛼 (1 – 𝛼) 𝑌𝑡−𝑘 + (1 – 𝛼) 𝑌 0.
For example, the expanded equation for t=4 the smoothed value is:
𝑇̂t =∑𝑡−1 k 𝑡̂
𝑘=0 𝛼 (1 – 𝛼) 𝑌𝑡−𝑘 + (1 – 𝛼) 𝑌 0
A simple average of the most recent k observations if historical data are available,
Some subjective prediction must be made if there are no reliable past-data available.
Example: Estimate trend component by simple exponential smoothing method for the series
̂ 0 =Y1]
given below. [use 𝜶 = 0.1 and 𝒀
Admasu M . Page 7
MTU Time series Analysis chapter -3
T 1 2 3 4 5 6 7 8 9 10
Yt 14 15 10 14 17 12 15 11 12 18
Solution: from 𝑇̂t =𝛼Yt + (1 – 𝛼)𝑌̂t then;
t 1 2 3 4 5 6 7 8 9 10
Yt 14 15 10 14 17 12 15 11 12 18
𝑇̂t 14 14.1 13.7 13.7 14 13.8 14 13.7 13.5 14
20
15
10 Yt
Yt+1-hat
5 Error
0
1 2 3 4 5 6 7 8 9 10
-5
For t sufficiently large so that (1 – 𝛼)𝑡 𝑌̂0 is close to zero and the weights, 𝛼 (1 – 𝛼)k
decreases geometrically, and their sum is unity, then the exponential smoothing process gives
as unbiased estimate of μ, that means E(𝑇̂t) = μ.
Admasu M . Page 8
MTU Time series Analysis chapter -3
𝑡̂
= ∑𝑡−1 k
𝑘=0 𝛼 (1 – 𝛼) 𝐸(𝑌𝑡−𝑘 ) + (1 – 𝛼) 𝑌0
𝑡̂
= ∑𝑡−1 k
𝑘=0 𝛼 (1 – 𝛼) μ + (1 – 𝛼) 𝑌0
∞̂
= ∑∞ k
𝑘=0 𝛼 (1 – 𝛼) μ + (1 – 𝛼) 𝑌0
1
= 𝛼 ∑∞ k
𝑘=0 (1 – 𝛼) μ = 𝛼 (1−(1−𝛼)) 𝜇 = μ
What is the “best” value for 𝛼? The problem faced here is, how do we find an appropriate
value for 𝛼 ? In general the value of 𝛼 should between 0.1 and 0.9 (see ChatField, C. 2002).
But a smaller smoothing constant gives more relative weight to the observations in the more
distant past and a larger smoothing constant, within these bounds, gives more weight to the
most recent observation and less weight to the most distant observations.
In Practice, its value is finding by trial and error. This means try by taking different 𝛼′𝑠 in the
1
given interval and then compute the Mean Square Error [MSE = ∑𝑁 ̂ 2
𝑡=1(𝑌𝑡 − 𝑇𝑡 ) ] for those
𝑁
different 𝛼 value. The value that yields the smallest MSE is an appropriate value for 𝛼.
Example: Consider the following data set consisting 12 observations taken over time and
̂0 = 71 and α = 0.1 and 0.5. Which α is
estimate Trend component at time t by assuming Y
appropriate? Why?
t 1 2 3 4 5 6 7 8 9 10 11 12
Yt 71 70 69 68 64 65 72 78 75 75 75 70
Solution:
T 1 2 3 4 5 6 7 8 9 10 11 12 MSE
Yt 71 70 69 68 64 65 72 78 75 75 75 70
α = 0.1 71 70.9 70.71 70.44 69.8 69.32 69.58 70.43 70.88 71.29 71.67 71.5
α = 0.5 71 70.5 69.75 68.88 66.44 65.72 68.86 73.43 74.21 74.61 74.8 72.4
Error (0.1) 0 -0.9 -1.71 -2.44 -5.8 -4.32 2.42 7.57 4.12 3.71 3.33 -1.5 14.1
Error (0.5) 0 -0.5 -0.75 -0.88 -2.44 -0.72 3.14 4.57 0.79 0.39 0.2 -2.4 3.78
Admasu M . Page 9
MTU Time series Analysis chapter -3
Estimation of trend using 𝛼 =0.5 is better than that of 𝛼 =0.1. Because the mean square error
for 𝛼 =0.5 is smaller than 𝛼 =0.1.
100
80
Yt
60
= 0.1
40 = 0.5
Error( )
20
Error( =0.5)
0
1 2 3 4 5 6 7 8 9 10 11 12
-20
Figure 3.6: Trend estimation by Simple Exponential Smoothing Method and comparing
MSE.
A time series that exhibits a trend is a non-stationary time series. Modeling and forecasting
of such a time series is greatly simplified if we can eliminate the trend. One way to do this is
to fit a regression model describing the trend component to the data and then subtracting it
out of the original observations, leaving a set of residuals that are free of trend. The trend
models that are usually considered are the linear trend, in which the mean of Ytis expected to
change linearly with time as in E(Yt) = β0 + β1t.
Admasu M . Page 10
MTU Time series Analysis chapter -3
𝜕𝑆𝑆𝐸 𝜕𝑆𝑆𝐸
̂0 = 0 ----------------------(1) and ̂1 = 0------------------------------------(2)
𝜕𝛽 𝜕𝛽
𝜕𝑆𝑆𝐸 𝜕[(∑𝑇 ̂ ̂ 2
𝑡=1(𝑌𝑡 − 𝛽0 − 𝛽1 𝑡) ]
̂0 = ̂0 =0
𝜕𝛽 𝜕𝛽
1 1 𝑇(𝑇+1)
➱𝛽̂0 =𝑇 ∑𝑇𝑡=1 𝑌𝑡 − 𝛽̂1 ∑𝑇𝑡=1 𝑡, we know that ∑𝑇𝑡=1 𝑡 = 2
𝑇
1 (𝑇+1)
➱𝛽̂0 =𝑇 ∑𝑇𝑡=1 𝑌𝑡 − 𝛽̂1 -------------------------------------------------------(3)
2
𝜕𝑆𝑆𝐸 𝜕[(∑𝑇 ̂ ̂ 2
𝑡=1(𝑌𝑡 − 𝛽0 − 𝛽1 𝑡) ]
̂1 = ̂ =0
𝜕𝛽 𝜕𝛽1
𝑇(𝑇+1)(2𝑇+1)
➱𝛽̂0 ∑𝑇𝑡=1 𝑡 + 𝛽̂1 ∑𝑇𝑡=1 𝑡 2 = ∑𝑇𝑡=1 𝑡𝑌𝑡 , we know also ∑𝑇𝑡=1 𝑡 2 = 6
𝑇(𝑇+1) 𝑇(𝑇+1)(2𝑇+1)
➱𝛽̂0 + 𝛽̂1 = ∑𝑇𝑡=1 𝑡𝑌𝑡 -------------------------------------(4)
2 6
𝑇 𝑇
𝑇(𝑇 + 1) 1 (𝑇 + 1) 𝑇(𝑇 + 1)(2𝑇 + 1)
[ ∑ 𝑌𝑡 − 𝛽̂1 ] + 𝛽̂1 = ∑ 𝑡𝑌𝑡
2 𝑇 2 6
𝑡=1 𝑡=1
Admasu M . Page 11
MTU Time series Analysis chapter -3
2
𝑇(𝑇 − 1) (𝑇+1)
➱𝛽̂1 [ 12 ] = ∑𝑇𝑡=1 𝑡𝑌𝑡 − ∑𝑇𝑡=1 𝑌𝑡
2
12 6
➱𝛽̂1 = 𝑇(𝑇 2 − 1) ∑𝑇𝑡=1 𝑡𝑌𝑡 – 𝑇(𝑇− 1) ∑𝑇𝑡=1 𝑌𝑡 ---------------------------------------(5)
1 (𝑇+1)
𝛽̂0 =𝑇 ∑𝑇𝑡=1 𝑌𝑡 − 𝛽̂1 2
1 (𝑇+1) 12 6
➱𝛽̂0 =𝑇 ∑𝑇𝑡=1 𝑌𝑡 − [𝑇(𝑇 2 − 1) ∑𝑇𝑡=1 𝑡𝑌𝑡 – 𝑇(𝑇− 1) ∑𝑇𝑡=1 𝑌𝑡 ]
2
1 6 3(𝑇+1)
➱𝛽̂0 =𝑇 ∑𝑇𝑡=1 𝑌𝑡 − ∑𝑇𝑡=1 𝑡𝑌𝑡 + ∑𝑇𝑡=1 𝑌𝑡
𝑇(𝑇− 1) 𝑇(𝑇− 1)
2(2𝑇+1) 6
➱𝛽̂0 = 𝑇(𝑇− 1) ∑𝑇𝑡=1 𝑌𝑡 − 𝑇(𝑇− 1) ∑𝑇𝑡=1 𝑡𝑌𝑡 --------------------------------(6)
Therefore, 𝑇̂𝑡 = 𝛽̂0 + 𝛽̂1 𝑡 is the estimated of linear trend by least square method.
The magnitude of 𝛽̂1 indicates the trend (or average rate of change) and its sign indicates the
direction of the trend.
Example: Assume linearity and estimate the trend pattern from the following series by least
square method.
Month Jan Feb Mar Apr May Jun Jul Aug Sep
Price 3 6 2 10 7 9 14 12 18
Solution:
Month Jan Feb Mar Apr May Jun Jul Aug Sep Total
Price 3 6 2 10 7 9 14 12 18 81
tYt 3 12 6 40 35 54 98 96 162 506
t2 1 4 9 16 25 36 49 64 81 285
2(2𝑇+1) 6 2(2∗9+1) 6
Therefore, 𝛽̂0 = 𝑇(𝑇−1) ∑𝑇=9
𝑡=1 𝑌𝑡 − ∑𝑇=9 𝑡𝑌𝑡 = ∗ 81 − ∗ 506 = 0.58 And
𝑇(𝑇−1) 𝑡=1 9(9−1) 9(9−1)
12 6 12 6
𝛽̂1 = 𝑇(𝑇 2 −1) ∑𝑇=9
𝑡=1 𝑡𝑌𝑡 − 𝑇(𝑇−1)
∑𝑇=9
𝑡=1 𝑌𝑡 = 9(92 −1) 506 − 9(9−1)
81 = 1.68
Admasu M . Page 12
MTU Time series Analysis chapter -3
Month Jan Feb Mar Apr May Jun Jul Aug Sep
Price 3 6 2 10 7 9 14 12 18
𝑇̂t 2.26 3.94 5.62 7.30 8.98 10.66 12.34 14.02 15.70
error 0.74 2.06 -3.62 2.70 -1.98 -1.66 1.66 -2.02 2.30
𝟏
MSE = 𝑻SSE = 4.89
consider a double moving average from the single moving average, say:
Example: consider the price series above and estimate the trend by linear moving average
procedure with k =3.
Admasu M . Page 13
MTU Time series Analysis chapter -3
20
18
16
14
12
10 Price
8 Tt
6
4
2
0
Jan Feb Mar Apr May Jun Jul Aug Sep
Figure 3.7: Trend estimation by Double moving average Method from linear model
assumption.
In some cases, a linear trend is inadequate to capture the trend of a time series. A natural
generalization of the linear trend model is the polynomial trend model.
Note that the linear trend model is a special case of the polynomial trend model (p=1) For
economic time series we almost never require p > 2. That is, if the linear trend model is not
adequate, the quadratic trend model will usually work:
Our assumption at this point is that our time series, yt, can be modeled as yt = Tt(β) + εt
Where Tt is the quadratic trend model , β denotes the parameters of the quadratic trend
model, and εt denotes the other factors (i.e., the seasonal and cyclical components) that
determine yt. We don’t observe the β’s and so we will need to estimate them in order to forecast the
trend (and, eventually, y).
Admasu M . Page 14
MTU Time series Analysis chapter -3
The natural approach to estimating the quadratic trend model is the least square approach –
Choose the β’s to minimize
[ y
t 1
t Tt ( )]2 In the case of the quadratic trends this is a straightforward application of
It turns out that under the assumptions of the unobserved components model, the OLS
estimator of the linear and quadratic trend models is unbiased, consistent, and
asymptotically efficient. Further, standard regression procedures can be applied to test
hypotheses about the ’s and construct interval estimates.
Another alternative to the linear trend model is the log linear trend model, which is also
called the exponential trend model:
Tt = β0exp(β1t) or, taking natural logs on both sides, log(Tt) = log(β0) + β1t. Note that
the log of the trend component is linear.
Admasu M . Page 15