Unformatted text preview: For Interest Only For NOT on exams and NOT NOT covered in example classes covered
Chapter 19: Elementary Time Series Elementary
A. The Four Components of a A. Time Series Time Earlier, when we talked about data, x1 , x2 ,........., xn We did not mind which came first, which was next, etc. So the data set { 7, 5, 8, 4 } and the data set { 8, 7, 4, 5 } were treated as identical. In other words, we did not consider the time In element in the problem. element In some other problems, however, the time In element plays an important role: the data appear chronologically and we must take into account the order in which they appear. Together, these data form a time series. time Examples are: (i) a patient’s temperatures taken every 4 hours, (ii) monthly profits of a company, (iii) daily numbers of passengers taking the MTR, etc MTR, We shall study, in particular, the economic We timeseries, which generally has four components: components: Longterm trend, Cycle, Seasonal pattern, Longterm Irregularity Irregularity An economic timeseries generally has four components: has
1. Longterm trend (T)
The development of the series on the long run, ignoring cycles and ripples. For example, the stock market goes up in the long run, even though there may be big drops and fast surges from time to time. fast 2. Cycle (C) Cycle Recurring business activities often show phases of prosperity, recession, depression and recovery. A cycle often takes several years ( or decades ) to complete. 3. Seasonal pattern (S) 3. Seasonal A pattern of economic performance that recurs pattern year after year, due to weather, traditions, customs, culture, etc People tend to do the same thing during that period of the year, such as eating mooncakes in August and September, wearing new clothes during Chinese New Year, etc during 4. Irregularity (I) 4. Irregularity The unpredictable and occasional events that may affect the performance of the data, such as the impact of SARS. Irregular effects are often minor, but occasionally serious. serious. Question: Question: y1 , y2 ,........., yn How does a time–series, relate to the four components? relate
Answer: We shall adopt a Multiplicative model: Multiplicative y = T × S ×C × I
To explain its meaning, suppose y represents the To monthly sales volume of a company. Let us look at y03 07 , i.e. the sales volume in March 2007. Suppose we know that, according to the Trend, the sales volume is T03 07 = 2.5($m) In addition, March is the quiet season for sales, being 8% below that of a normal month, so that being
S 03 = 0.92(unitless ) Furthermore, the year 2007 presented good sales prospects as Hong Kong was experiencing a prospects period of economic recovery, of 12% up: period
C07 = 1.12(unitless ) The wild oil prices in March 2007 produced an The unexpected impact on business, causing a 5% downward slide: I 03 07 = 0.95(unitless ) downward
∴ y03 07 = 2.5 × 0.92 × 1.12 × 0.95 = 2.4472($m) B. TimeSeries Analysis (ODD Number of Data Per Year) (ODD
Question: Actually, what we know are just the yields, y1 , y2 ,........., yn but not the components, T, S, C , I. T, How can we obtain (estimate) these elements? How Answer: This is exactly what we propose to study here. The job is called timeseries analysis. timeseries The work can be very complicated. Note first that I is virtually impossible to study due to its unpredictability. C is very difficult to study. This cycle may take six years to complete, but the next cycle may take 15 years. To study cycles, usually we need a very long timeTo series, covering at least several cycles. series, Otherwise, we can hardly see the pattern. At this elementary stage, we shall only look at T and S. Thus our model will be y = T × S × CI ............(1) where C is merged with I, the irregular element to I, be ignored. be Note: Note Although we do not study it, there is another model, called the additive model: model,
y =T +S +C + I Example 1 The net profits of a large departmental store are reported three times a year for three years, as the y − values in the following table. the Assuming model (1) , find S and T. Assuming Also, forecast the net profits for the three terms of 2009. 2009.
i Data sheet and computational results for Example 1. 1.
(1) Year 2006 (2) Term 1 2 3 2007 1 2 3 2008 1 2 3 42.3 (3)
yi (4) M.A. X (5)
yi M . A. (6) S (7 ) xi 1 2 3 4 5 6 7 8 9 (8)
ti X 0.8516 1.0177 1.1095 0.8844 1.0115 1.0958 0.9059 X 1.1035 0.8812 1.0153 1.1035 0.8812 1.0153 1.1035 0.8812 1.0153 38.3326 37.1085 39.5942 41.3231 42.5556 43.4354 44.5854 46.9814 45.7993 32.7 38.4 40.2 39.5 45.6 41.1 37.5 42.4 44.1 43.6 49.2 44.9 41.4 45.7 46.5 X Computational procedures: Computational
Moving Averages: Seasonality: Year 2006 2007 2008 Mean S Term 1 X 1.1095 1.0958 1.1027 1.1035 Term 2 Term 3 0.8516 1.0177 0.8844 1.0115 0.9059 X total 0.8806 1.0146 2.9979 0.8812 1.0153 3.0000
FirstM . A. = 42.3 + 32.7 + 40.2 = 38.4 3 Adjustment: Adjustment Calculate the adjustment factor =
S adjustment = 1.0007 ×1.1027 = 1.1035 theory.total 3.0000 = = 1.0007 data.total 2.9979 Deseasonalized Series: y1 42.3 t1 = = = 38.3326 S1 1.1035 Trend: Fitting a regression line T = a + bx to bx
( x1 , t1 ), ( x2 , t 2 ),........., ( x9 , t9 ) T = 36.2256 + 1.1930x (x=1 at Term 1, 2006) Forecasts: Forecasts:
2009 Term 1 Term 2 Term 3
xi Ti S 1.1035 0.8812 1.0153 ˆ yi = Ti × S 10 11 12 48.1556 49.3486 50.5416 53.14 43.49 51.31 Solution: (See exhibits above) Solution First, we shall find the seasonal pattern. First, If we look at the nine data, we will discover the following seasonal pattern: each year, the first term value is the highest, the 2nd each term value is the lowest, and the 3rd term value is term in the middle, but closer to the 1st term value. in We take the average, called the moving average moving (M.A.), of any three consecutive terms, say for the first three data, FirstM . A. = 42.3 + 32.7 + 40.2 = 38.4 first
3 This 38.4 takes into account of all the effects of the three terms of a full year. full Hence the effects will cancel off with one another, and the Moving Average (M.A.) has no seasonal effect. We put it in Column 4 and in a position against Term 2, because 38.4, being the average of the values of three consecutive time points, should represent the status of the middle time point. the Then , we move one step down to get the 2nd M.A. Then
2 nd M . A. = 32.7 + 40.2 + 45.6 = 39.5 3 This 39.5 is also free from seasonal effects, and should be This placed against the position corresponding to the middle datum, namely, against 40.2. We keep doing this to complete column 4. Now, for Term 2, 2006, 32.7 (Column 3) is the seasonally affected value, and 38.4 (column 4) is the seasonally unaffected value. 32.7 = 0.8516 Hence the ratio 38.4 indicates the initial seasonal effect of Term 2, 2006: It is 14.84% below the norm. Similarly we compute the other ratios, and obtain Column 5. Similarly Now in column 5, all ratios pertaining to Term 2 are roughly of the same size: 0.8516, 0.8844 and 0.9059. Theoretically, they should be identical. That they are not so is due to the CI factor. CI A fair way to calculate is to take the average of these three ratios, 0.8516 + 0.8844 + 0.9059 = 0.8806
3 This is similar for Term 1 and Term 3. We have thus the second table above. Now, in that table, the three means, 1.1027, 0.8806 and 1.0146, do not add up to 3.0000 but to 2.9979. to In theory their total should be 3.0000, as each ratio represents an increase or decrease from 1. These differences should offset one another, resulting in a zero effect. That the sum is actually not 3 can again be attributed to CI. CI We make adjustments, by multiplying each “mean” by an adjustment factor = theory.total 3.0000 adjustment
data.total = 2.9979 = 1.00070049 It is advisable to put this value into the calculator’s memory. It 3 ÷ 2.9979 EXE 1.00070049 SHIFT STO M M AC 1.1027 x
RCL M EXE 1.1035
S1 = 1.1027 × 3.0000 = 1.1027 ×1.00070049 = 1.1035 2.9979 Thus, the first seasonal factor is Thus, Similarly, the second and third seasonal factors are: Similarly, S 2 = 0.8812, S3 = 1.0153
AC 0.8806 AC 1.0146 x x
RCL RCL M M EXE EXE 0.8812 1.0153 Note: To turn off the M symbol press: 0 SHIFT STO M AC SHIFT Our next job is to find the trend line, T. We put the
S1 , S2 , S3 values in Column 6. , Since model (1) is y = S × T × CI Since if we obtain the ratios y S , we shall get deseasonalized values, as in Column 8. deseasonalized values, These represent initial trend values, T, but carry but effects of CI. CI We call them tvalues. values. Thus, say, Thus, t1 = 42.3 = 38.3326 1.1035 Name the time points as 1,2,…….,9 (Column 7). Then fit a regression line to the paired data, Then ( x1 , t1 ), ( x2 , t 2 ),........., ( x9 , t9 )
This will eliminate the CI ripples. This On REGMode, this is a very simple job. The result is T = a + bx = 36.2256 + 1.1930 x The (x=1 at Term 1, 2006) The final job is forecasting. Say, for Term 1, 2009, x10 = 10 , Say,
T10 = 36.2256 + 1.1930 × 10 = 48.1556 S1 = 1.1035 and ˆ ∴ y10 = T10 × S1 = 53.14 ˆ y12 = 51.31 Similarly, y = 43.49 and ˆ11 See the last table above. C. Series with an EVEN Number of Data per Year of
Example 2: The number of serious fires that broke out in The a city were reported quarterly over 2006city 2008. 2008. Find the seasonality and trend. Forecast the four quarterly values for 2009 Forecast using a Multiplicative model without the cyclic effect. cyclic Solution: Solution:
Let us refer to the worksheet for Example 2 Let (see end of these explanations). (see The main difference between Example 1 The and Example 2 is that here, the number of data per year is even. This makes our computation of the M.A.’s a bit more complicated. bit The other steps are basically the same. The first four quarterly values have an average of: The
First 4 − quarterlyM . A. = 5 + 8 + 15 + 10 = 9.5 4 This value 9.5 should be put in the middle of the This year, i.e. 1652006 to 1582006 (three months) , i.e. between Quarter 2 and Quarter 3. months) This is an awkward position, for we cannot compare it with the second quarterly value (8) nor the third quarterly value (15). To overcome this trouble, we find the next M.A.: To
Second 4 − quarterlyM . A. = 8 + 15 + 10 + 7 = 10 4 This value should be placed in a position between the third and the fourth quarter (of 2006). Now, both 9.5 and 10 are free from seasonal effects. 9.5 + 10 CentredM . A. = = 9.75 2 They are further averaged, i.e. They This is of course, also free from seasonal effects, This and should be placed between the positions of 9.5 and 10, i.e., the third quarter. 9.5 In this way, we find the wellpositioned M.A.’s . They may be called the “Centred M.A.” with They weights 1, 2, 2, 2, 1, or, simply “M.A.”, as follows: weights
1st CentredM . A. = 1st M . A. = 5 + 2(8 + 15 + 10) + 7 = 9.75 8 Thereafter, the column for S is constructed just as in Example 1. These ratios represent the initial seasonal information. The seasonal factors are then found by averaging and adjusting , as shown in the third table. We have S1 = 0.6148, S 2 = 0.8757, S3 = 1.5363, S 4 = 0.9732 We then use these factors to deseasonalize the series, to obtain ti ' s These are the preliminary trend values. y To obtain the final trend, we fit a straight line to the paired data ( xi , ti ) , i =1,2,….,12, using REGMode. paired The result is T = 8.8689 + 0.2235 x located at Quarter 1, 2006. located where x=1 is Finally, the forecast values for the four quarters of Finally, 2009 are 7.24, 10.51, 18.78 and 12.11. 7.24, 12.11 Data and work sheet for Example 2 Data
Year 2006 Qtr 1 2 3 4 2007 1 2 3 4 2008 1 2 3 y 5 8 15 10 7 9 16 10 6 10 18 AWK M.A X X 9.750 y/M.A. X X 1.5385 0.9877 0.6747 0.8571 1.5422 0.9639 0.5581 0.8989 X S 0.6148 0.8757 1.5363 0.9732 0.6148 0.8757 1.5363 0.9132 0.6148 0.8757 1.5363 x 1 2 3 4 5 6 7 8 9 10 11 t 8.1327 9.1355 9.7637 10.2754 11.3858 10.2775 10.4146 10.2754 9.7593 11.4194 11.7165 9.5 7.5 10.5 10.5 10.25 10.5 11 11.25 10.25 10.125
10.375 10.500 10.375 10.375 10.750 11.125 X Computational procedures Computational
Moving Averages y Quarter 1 1 2 3 4 1 5 8 15 10 7 9 4Quarter 4Quarter Centred M. total M. Ave. M. Ave. 38 40 41 9.50 10.00 10.25 9.750 10.125 2007 y Quarter 4Quarter M. total 4Quarter M. Ave. Centred M. Ave. 1 2007 1 2 3 4 1 2 5 8 15 10 7 9 38 40 41 9.50 10.00 10.25 9.750 10.125 Original steps: Original 5+8+15+10=38, 38÷4=9.50 8+15+10+7=40, 40÷4=10.0 8+15+10+7=40, Combined equivalent step 9.5 + 10 = 9.75 2 5 + 2 × (8 + 15 + 10) + 7 = 9.75 First Moving Average = 8 Seasonality Seasonality
Year 2006 2007 2008 Mean S Qtr 1 X Qtr 2 X Qtr 3 Qtr 4 1.5385 0.9877 0.6747 0.8571 1.5422 0.9639 0.5581 0.8989 X X Total 0.6164 0.8780 1.5404 0.9758 4.0106 0.6148 0.8757 1.5363 0.9732 4.0000 Trend: Trend
T = 8.8689 + 0.2235x (x=1 at Qtr 1, 2006) 8.8689
Forecasts: 2009 Qtr 1 Qtr 2 Qtr 3 Qtr 4 x 13 14 15 16 T 11.7744 11.9979 12.2214 12.4449 S 0.6148 0.8757 1.5363 0.9732 y=TxS 7.24 10.51 18.78 12.11 ...
View
Full Document
 Spring '10
 Unknown
 Yi

Click to edit the document details