of 18
8/2/2019 Forecasting 2003
1/18
FORECASTING
COMPONENTS OF TIME SERIES ANALYSIS
Depending on the kind of variability, the different components of time series analysis can
be grouped into four categories: Secular Trend Component, Cyclical Component,
Seasonal Component and Random / Irregular Component. Each component has its
specific techniques of calculations.
A. MEASUREMENT OF SECULAR TREND:
The tendency of the time series data to increase, decrease or stagnate over a long
period of time is called Secular Trend. The trend that emerges over time is usually the
result of the impact of long term factors that affect the dependent variable. Secular
Trend can be divided into two broad groups: Linear Trend and Non-Linear or
Curvilinear Trend. In the former case the functions highest power is unity and in the
latter case the functions highest power is other than unity. Depending on the nature of
the trend-function used, the long term secular trend can be measured by fitting either a
linear trend or an exponential trend or a parabolic trend.
Some of the methods of fitting the trend in times series are discussed below:
1. Free-hand Curve Fitting:
In this case the trend is represented by a straight line vis--vis the equation: Y = a + bX
The following steps are used to estimate the values of a (vertical intercept) and b
(slope of the line):
The value of a is the distance on the vertical axis from where the straight line
originates.
For the value of b find the difference between the values of the first and last time
periods and then divide this difference by the number of time periods involved.
1
8/2/2019 Forecasting 2003
2/18
Illustration:
Fit a free hand curve to the following data
Year 1998 1999 2000 2001 2002 2003 2004 2005
Yt 10 12 15 19 20 17 14 19
Solution:
The value of a is 10 ( the Yt for the first year)
The value of b is (19 10) / 8 = 1.125
Hence, the required linear equation is: Y = 10 + 1.125X
Using this equation we can calculate the theoretical values of Y for various years (1st
year = 1, 2nd year = 2, 3rd year = 3, ) and obtain the trend line (refer Fig 1).
Figure 1
2. Semi Average Method:
In this method, the total series of observations are subdivided into two parts. The
average of each part is computed and placed against the middle period. Taking the
two average points a curve is fitted, known as the semi-average curve. Further
assuming that a linear function would adequately describe the data, a trend line can
now be fitted (based on the function Y = a + bX).
The constant components of the function (viz., a and b) are estimated as under:
2
8/2/2019 Forecasting 2003
3/18
The average of the first part is taken as the intercept (ie., a)
The slope is determined with the help of the formula:
Illustration:
Fit a trend curve to the following data by method of semi-averages (the data is given
in columns 1 and 2 and the semi-averages are worked and displayed in column 3):
Year Annual Income (Rs lakhs) Semi-Averages
1980 1
1981 1.51982 1.9
1983 1.9 1.76
1984 1.95
1985 2
1986 2.1
1987 2.22
1988 2.31
1989 2.42
1990 2.5
1991 2.55 2.611992 2.1
1993 3.11
1994 3.25
1987 is taken as the year that divides the data into two equal halves (of 7 years each).
Hence, the vertical intercept (a) would be 1.76 and the slope (b) would be estimated
as: .
Hence, the trend equation would now be Y = 1.76 + 0.106X
Note: If the data has an even number of observations that choose the mid-year
value between the two mid-most years per half of the data. For instance, if the above
database was from 1980 to 1991 (12 years in all), then the mean of the first half
would be placed at 1982.5 and that of the second half would be placed at 1988.5)
3
8/2/2019 Forecasting 2003
4/18
3. Moving Average Method:
This method has the following sub-methods: Method of Moving Averages; Method of
Weighted Moving Averages; Method of Semi-Averages (which is the same as
discussed above)
a. Method of Moving Averages:
A moving average can be obtained by successively averaging overlapping groups
of two or more consecutive values in a time series.
Illustration :
Find the four yearly moving average of the following data:
Year I II III IV
2004 42 58 80 60
2005 46 60 82 64
2006 44 56 85 70
2007 48 54 89 72
Solution:
Year Quarter Sales 4-Qtly M.A. Centered 4-Qtly M.A.
2004 I 42(42+ 58+80+60)/4 = 60
(58+80+60+46)/4 = 61
(80+60+46+60)/4 = 61.5
(60+46+60+82)/4 = 62
(46+60+82+64)/4 = 63
(60+82+64+44)/4 = 62.5
(82+64+44+56)/4 = 61.5
(64+44+56+85)/4 = 62.25
(44+56+85+70)/4 = 63.75
(56+85+70+48)/4 = 64.75
(85+70+48+54)/4 = 64.25
(70+48+54+89)/4 = 65.25
(48+54+89+72)/4 = 65.75
II 58
III 80 (60+61)/2= 60.5
IV 60 (61+61.5)/2= 61.25
2005 I 46 61.75
II 60 62.5
III 82 62.75
IV 64 62
2006 I 44 61.875
II 56 63
III 85 64.25
IV 70 64.5
2007 I 48 64.75
4
8/2/2019 Forecasting 2003
5/18
II 54 65.5
III 89
IV 72
Note: When an average of even order needs to be computed, each average
should be placed at the centre of the selected data set. However, in this
case the moving average would not correspond to a particular time period,
making further analysis difficult. Hence, another set of centred moving
averages is calculated by taking the average of two previously calculated
moving averages and placing the value in-between the two previous
averages. Such centering technique is not needed when the number of
observations is odd.
b. Method of Weighted Moving Averages:
In this case the moving average value assigns equal weightage to all values. It is
also possible to assign different weights to different values (if the data needs such an
adjustment).
The weighted moving average (WMA) is calculated by using the following formula:
Illustration:
The manager of a retail store wants to forecast sales of a particular brand of soap,
which was recently introduced by a company. Sales data of the last 12 weeks is
available to the manager:
Weeks 1 2 3 4 5 6 7 8 9 10 11 12
Sales (in 000) 2 3 4 3 4 6 8 10 12 11 13 14
5
8/2/2019 Forecasting 2003
6/18
The manager decides to assign the following weights to calculate the 3-weekly
weighted average.
Weeks Last Week 2 weeks ago 3 weeks ago Total
Weights 4 3 2 9
Solution:
Weeks Sales (in 000) 3-week weighted moving average1 2 -
2 3 -
3 4 -
4 3
5 4
6 6
7 8
8 10
9 12
10 11
11 13
12 14
4. Fitting of Straight Line / Trend Line:
A straight line trend is appropriate when the growth of a time series is relatively a
constant amount. To fit the straight-line trend we apply the least square method for
fitting the regression equation Y = a + bX (Note: X denotes the time variable and Y
the observations at different points of time)
6
8/2/2019 Forecasting 2003
7/18
The two normal equations are :
(i)
.(ii)
By solving the above two equations simultaneously, we obtain a and b and therebyget the trend line equation.
Illustration:
Find the straight-line trend for the following data and then estimate the profit for the
year 2008. Also draw the trend line
Year 2000 2001 2002 2003 2004 2005 2006
Profit (Rs 00000) 30 35 40 42 45 48 50
Solution:
Year Profit (Y) X = Year - 2003 XY X2 Trend value
2000 30 -3 -90 9 322001 35 -2 -70 4 35
2002 40 -1 -40 1 38
2003 42 0 0 0 41
2004 45 1 45 1 44
2005 48 2 96 4 48
2006 50 3 150 9 51Totals 290 0 91 28
Using the normal equations we get a = 41.43 and b = 3.25
Therefore the trend line equation is : Y = 41.43 + 3.25X
We can use this equation and find the trend (theoretical) values of Y
The estimated profit in 2008 will be 41.43 + 3.25(5) = 41.43 + 16.25 = 57.68
The trend line is plotted in the following graph
7
8/2/2019 Forecasting 2003
8/18
5. Fitting of Exponential Trend:
Exponential trend is applicable where growth in time series data is nearly at a constant
rate wrt per unit time. The exponential curve is given by the equation: Yt = abx
This exponential equation can be transformed into a linear equation by taking the
logarithms of both sides: logYt = loga + X logb
The normal equations for an exponential expression are:
(i)
.(ii)
Solving these equations simultaneously we get:
and
Illustration:
The index of industrial production in India from 1975 to 1985 are presented below. Find:
the exponential trend equation and the estimated index for 1988
Year 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985
Index 100 115 130 137 135 130 140 148 155 162 180
Solution:
Year Index (Y) X Log Y X (Log Y) X2
1975 100 -5 2.0000 -10 25
1976 115 -4 2.0607 -8.2428 16
1977 130 -3 2.1139 -6.3417 9
1978 137 -2 2.1367 -4.2734 4
1979 135 -1 2.1303 -2.1303 11980 130 0 2.1139 0 0
8
8/2/2019 Forecasting 2003
9/18
1981 140 1 2.1461 2.1461 1
1982 148 2 2.1703 4.3406 4
1983 155 3 2.1903 6.5709 9
1984 162 4 2.2095 8.838 16
1985 180 5 2.2553 11.2765 25
Totals 23.527 2.1839 110
and
Therefore the exponential trend is : logYt = 2.14 + 0.02X
The estimated index for 1988 is : logYt = 2.14 + 0.02(8) = 2.14 + 0.16 = 2.3
Therefore Yt = antilog 2.3 = 199.5
B. MEASUREMENT OF SEASONAL COMPONENT:
Seasonal variation is that movement of a time series where the change occurs during a
one year period or even less than a year. Detecting and measuring the seasonal
variation of a time series data can be useful in the following ways:
i. It can help in analyzing the behaviour of the series in the past.
ii.It can be used for making projections for the future, based on examination of past
patterns.
iii. Once the seasonal variation has been calculated, we can eliminate this from the
time series and determine the cyclical patterns in the data. This is known asdeseasonalization.
Some the methods of measuring the seasonal component of time series data are:
Method of Simple Averages, Ratio-to-Trend Method or Percentage-to-Trend Method and
Ratio-to-Moving Average Method.
1. Method of Simple Averages
The steps have to be followed in this method:
The total for each period (eg month) is computed The average of period (month) is calculated
The average of the periodic averages is calculated
The seasonal indices for each month are calculated with the help of the
formula:
Illustration:
9
8/2/2019 Forecasting 2003
10/18
Calculate the seasonal indices for the following data, using the method of simple
averages:
Months 2004 2005 2006 2007 MthlyTotals
MthlyAverages
SeasonalIndices
Jan 364 394 399 347 1504 376 124.00
Feb 342 367 379 325 1413 353.25 116.50March 288 345 328 302 1263 315.75 104.13
April 262 309 360 270 1201 300.25 99.02
May 236 284 300 247 1067 266.75 87.97
June 245 279 308 230 1062 265.5 87.56
July 249 251 270 220 990 247.5 81.62
Aug 268 269 310 230 1077 269.25 88.79
Sept 250 287 300 250 1087 271.75 89.62
Oct 300 320 340 279 1239 309.75 102.15
Nov 328 328 350 280 1286 321.5 106.03
Dec 299 367 390 310 1366 341.5 112.62
3638.8
Average of monthly averages =
2. Ratio-to-Trend Method or Percentage-to-Trend Method
From the following data (columns 1, 2 & 3) do as directed:
i. Estimate the trend equation
[Note this is nothing but getting the trend values (column 7) using the least squares method
(through the normal equations)]ii.Compute the quarterly seasonal indices using the ratio-to-trend method
iii. Explain how an analyst can use these indices to set quarterly target schedules
Year Quarter (X) Sales (Y) X = Qtr - 6.5 X2 XY Y trend% of Trend
values
2004I (1) 118 -5.5 30.25 -649 128.8 91.61
II (2) 109 -4.5 20.25 -490.5 132.4 82.33
III (3) 93 -3.5 12.25 -325.5 136 68.38
IV (4) 120 -2.5 6.25 -300 139.6 85.96
2005
I (5) 126 -1.5 2.25 -189 143.2 87.99
II (6) 124 -0.5 0.25 -62 146.8 84.47
III (7) 108 0.5 0.25 54 150.4 71.81
IV (8) 139 1.5 2.25 208.5 154 90.26
2006
I (9) 143 2.5 6.25 357.5 157.6 90.74
II (10) 140 3.5 12.25 490 161.2 86.85
III (11) 127 4.5 20.25 571.5 164.8 77.06
IV (12) 155 5.5 30.25 852.5 168.4 92.04
Totals 1502 0 143 518 125.2
and Hence, Y = 125.2 + 3.6X
10
8/2/2019 Forecasting 2003
11/18
Steps to be followed in the ratio-to-trend method:
1. After estimating the trend equation (through the least square method), we obtain
the trend values for each time unit.
2. Calculate each observed value in the series (column 3) for each time period as
a percentage of the corresponding trend value (column 7)
[Note: ]
3. This step ensures that the trend (secular) values have been eliminated from the
time series.
4. In the next step, we determine if there is a seasonal effect in the time series.
For this we need to examine Column 8. There are two indicators of the
presence of seasonal effects:
a. The period-by-period ratios are similar for some periods (eg the ratio of
July for one year is similar to the ratio of July of other years), this
indicates that there is a seasonal effect on display in the data.
b. The period-by-period ratios are not similar (eg the ratio of July for one
year are similar to the ratio of July of other years). If the ratios are the
same for all period, there is no seasonal effects on display in the data.
5. Calculate the median or modified mean for each period (Note: this is done by
discarding the highest and the lowest values of a given period and the median is
calculated from the remaining data)
Quarter 2004 2005 2006 Median (Seasonal Index)
I 91.6 87.99 90.74 90.74
II 82.33 84.47 86.85 84.47
III 68.38 71.81 77.06 71.81
IV 85.96 90.26 92.04 90.26(Note: i. Each Quarters cell value is from Column 8 of the first table of this method
ii. The Median value is the mid-most value of each row)
6. The final step involves adjusting the seasonal indices in such a manner that the
average should be 100. This is done by using the formula:
11
8/2/2019 Forecasting 2003
12/18
The final adjusted seasonal indices are as follows:
Quarter Unadjusted Seasonal Indices Adjusted Seasonal Indices
I 90.74 (90.74)(1.19) = 107.98
II 84.47 (84.47) (1.19) = 100.52
III 71.81 (71.81) (1.19) = 85.45
IV 90.26 (90.26) (1.19) = 107.41
Implications:
The 1st and 4th quarters show a positive seasonal variation.
The 2nd quarter shows a very marginal positive effect
The 3rd quarter shows a negative seasonal effect
Based on these observations the executive decisions taken can be:
o increase targets during the 1st and 4th quarters;
o keep target nearly the same in the 2nd quarter; and
o have a lower target during the 3rd quarter.
3. Ratio-to-Moving Average Method
This method is similar to the ratio-to0trend method, the only difference being that in
place of the trend values, moving averages are used and observed values are
calculated as a percentage of the corresponding moving averages.
From the following data do as directed:
Year I II III IV
2004 42 58 80 60
2005 46 60 82 64
2006 44 56 85 70
2007 48 54 89 72
i. Calculate the 4-yearly moving averages
12
8/2/2019 Forecasting 2003
13/18
ii. Compute the quarterly seasonal indices using the ratio-to-moving average
method
iii. Explain how an analyst can use these indices to set quarterly target schedules
Solution:
(Solution for Q.i is in the following table)
Year Quarter Sales 4-Qtly M.A. Centered 4-Qtly M.A.
2004 I 42
(42+ 58+80+60)/4 = 60
(58+80+60+46)/4 = 61
(80+60+46+60)/4 = 61.5
(60+46+60+82)/4 = 62
(46+60+82+64)/4 = 63
(60+82+64+44)/4 = 62.5
(82+64+44+56)/4 = 61.5
(64+44+56+85)/4 = 62.25
(44+56+85+70)/4 = 63.75
(56+85+70+48)/4 = 64.75
(85+70+48+54)/4 = 64.25
(70+48+54+89)/4 = 65.25
(48+54+89+72)/4 = 65.75
II 58
III 80 (60+61)/2= 60.5
IV 60 (61+61.5)/2= 61.25
2005 I 46 61.75
II 60 62.5
III 82 62.75
IV 64 62
2006 I 44 61.875
II 56 63
III 85 64.25IV 70 64.5
2007 I 48 64.75
II 54 65.5
III 89
IV 72
(Solution for Q.ii is in the following table)
Year QuarterCentered
4-QtlyM.A.
X =Qtr - 6.5
X2 XY Y trend % of Trendvalues
2004 I (1)
II (2)
III (3) 60.5 -3.5 12.25 -211.75 71.8 84.26
IV (4) 61.25 -2.5 6.25 -153.13 80 76.56
2005 I (5) 61.75 -1.5 2.25 -92.625 88.2 70.01
II (6) 62.5 -0.5 0.25 -31.25 96.4 64.83
III (7) 62.75 0.5 0.25 31.375 104.6 59.99
IV (8) 62 1.5 2.25 93 112.8 54.96
2006 I (9) 61.875 2.5 6.25 154.69 121 51.14II (10) 63 3.5 12.25 220.5 129.2 48.76
13
8/2/2019 Forecasting 2003
14/18
III (11) 64.25 4.5 20.25 289.13 137.4 46.76
IV (12) 64.5 5.5 30.25 354.75 145.6 44.30
2007 I (13) 64.75 6.5 42.25 420.88 153.8 42.10
II (14) 65.5 7.5 56.25 491.25 162 40.43
III (15)
IV (16)
Totals 754.625 24 191 1566.8
Steps to be followed in the ratio-to-moving average method:
1. After estimating the trend equation (through the least square method), we
obtain the trend values for each time unit.
2. Calculate each observed value in the series (column 3) for each time period
as a percentage of the corresponding trend value (column 7)
[Note: ]
3. This step ensures that the trend (secular) values have been eliminated from
the time series.
4. In the next step, we determine if there is a seasonal effect in the time series.
For this we need to examine Column 8. There are two indicators of the
presence of seasonal effects:
a. The period-by-period ratios are similar for some periods (eg the ratio
of July for one year is similar to the ratio of July of other years), this
indicates that there is a seasonal effect on display in the data.
b. The period-by-period ratios are not similar (eg the ratio of July for one
year is similar to the ratio of July of other years). If the ratios are the
same for all period, there is no seasonal effects on display in the data.
5. Calculate the median or modified mean for each period (Note: this is done by
discarding the highest and the lowest values of a given period and the
median is calculated from the remaining data)
(Solution for Q.iii is in the following table)
Year I II III IV
2004 84.26 76.56
2005 70.01 64.83 59.99 54.96
2006 51.14 48.76 46.76 44.30
2007 42.10 40.43Median 51.14 48.76 59.99 54.96
14
8/2/2019 Forecasting 2003
15/18
(Seasonal Index)(Note: i. Each Quarters cell value is from Column 8 of the first table of this method
ii. The Median value is the mid-most value of each row)
6. The final step involves adjusting the seasonal indices in such a manner that
the average should be 100. This is done by using the formula:
The final adjusted seasonal indices are as follows:
Quarter Unadjusted Seasonal Indices Adjusted Seasonal Indices
I 51.14 (51.14)( 1.86) = 95.12
II 48.76 (48.76) (1.86) = 90.69III 59.99 (59.99) (1.86) = 111.58
IV 54.96 (54.96) (1.86) = 102.23
Implications:
The 3rd quarter shows a pronounced positive seasonal variation.
The 2nd quarter shows a negative effect
The 1st and 4th quarters show a marginal positive seasonal effect
Based on these observations the executive decisions taken can be:
o increase targets during the 3rd quarter;
o progressively reduce targets in the 1st and 4th quarters; and
o have a lower target during the 2nd quarter.
C. MEASUREMENT OF CYCLICAL COMPONENT:
Residual Method
15
8/2/2019 Forecasting 2003
16/18
The following data shows a high construction companys projects which were lined up for
12 years. Calculate the cyclical indices by the Residual Method
YearNo. of
projects (Y)X =
Yr - 2000.5X2 XY Y trend
% of Trendvalues
1995 15 -5.5 30.25 -82.5 16.79 89.34
1996 19 -4.5 20.25 -85.5 17.81 106.68
1997 22 -3.5 12.25 -77 18.83 116.83
1998 21 -2.5 6.25 -52.5 19.85 105.79
1999 19 -1.5 2.25 -28.5 20.87 91.04
2000 20 -0.5 0.25 -10 21.89 91.37
2001 21 0.5 0.25 10.5 22.91 91.66
2002 23 1.5 2.25 34.5 23.93 96.11
2003 28 2.5 6.25 70 24.95 112.22
2004 27 3.5 12.25 94.5 25.97 103.97
2005 25 4.5 20.25 112.5 26.99 92.63
2006 29 5.5 30.25 159.5 28.01 103.53
Totals 269 0 143 145.5
Steps to be followed in the ratio-to-moving average method:
1. After estimating the trend equation (through the least square method), we
obtain the trend values for each time unit.
2. Calculate each observed value in the series (column 2) for each time period
as a percentage of the corresponding trend value (column 6)
[Note: ]
3. This step ensures that the trend (secular) values have been eliminated from
the time series.
D. MEASUREMENT OF IRREGULAR COMPONENT:
Since irregular variations are completely random in nature, they are difficult to
model and analyze. The usual way to analyze it is to consider it as the leftover
component once the seasonal and cyclical components have been accounted for.
LIMITATIONS OF ECONOMETRIC FORECASTS
16
8/2/2019 Forecasting 2003
17/18
1. There is a need for individuals, businesses, institutions to obtain economic
predictions so as to prepare and adapt their projects. For that purpose they use
- or rely on experts who use - the best available data and what are considered
the most objective methods and models, often relying on statistics and
mathematics, to process them. But there is a risk that those analyses and
forecasts get affected by overconfidence in numbers (numeracy bias) and inunderlying rational assumptions. Actually, several flaws and obstacles,
described below, might affect as well the data as the models and methods
used to make projections.
2. Biased human and social reactions
Consumers, producers, investors, borrowers, lenders, businesses, public
institutions might react in unforeseen ways and be affected by behavioural
biases. Faulty policy implications and recommendations can arise from unrealistic
assumptions. A models foundational assumptions may give rise to a model that
is not consistent with reality. Empirical validation is imperative, if theory has to
have any confidence in the models predictive ability.
3. Non binary situations
Hard core quantification might be inappropriate when the reasoning is about
people and society, or complex systems with unknown / unmeasurable / irrelevant
probabilities
4. Non linear evolutions
Economic evolutions might be disrupted by percolations, bifurcations andother kinds of sudden jumps proper to dynamic systems. Such events disturb
simple and linear extrapolation of past trends.
5. Overconfidence in historical probabilities and in mathematical laws
Numbers and equations have the appearance of rationality, but they might have
illusive traits. Historical statistical series might be too short and therefore miss
dramatic rare events. Again, stochastic laws based on assumptions (eg.,
Gaussian assumptions) might not fully apply to the situation / relationship under
consideration. Even more important, past data become irrelevant in fully newcircumstances and situations in which uncertainty and not measurable risks are
involved.
6. Herd-instincts among experts
Experts tend to use similar equations, assumptions and data. This can bring
about a superficial consensus and thus not reveal the true forces involved in the
relationship. Again, models based on experts projections tend to give a precise
number (for example about inflation rate, GDP growth rate, earnings per share,
currency rate, stock index...). Such prevision that gives only single result ignores
all other scenarios.
17
8/2/2019 Forecasting 2003
18/18
Given the above shortcomings of an economic model or forecast, it does not mean that
economic models should be totally discarded. These shortcomings are only indicators
that economic models should be flexible on the basis of scenarios that take into account
various possible unforeseen circumstances.
18