Presentation is loading. Please wait.

Presentation is loading. Please wait.

Time Series and Forecasting

Similar presentations


Presentation on theme: "Time Series and Forecasting"— Presentation transcript:

1 Time Series and Forecasting
Session 8

2 Time Series, Forecasting & Index Numbers
Using Statistics Trend Analysis Seasonality and Cyclical Behavior The Ratio-to-Moving-Average Method Exponential Smoothing Methods Index Numbers Using the computer Summary and Review of Terms

3 8-1 Using Statistics A time series is a set of measurements of a variable that are ordered through time. Time series analysis attempts to detect and understand regularity in the fluctuation of data over time. Regular movement of time series data may result from a tendency to increase or decrease through time - trend- or from a tendency to follow some cyclical pattern through time - seasonality or cyclical variation. Forecasting is the extrapolation of series values beyond the region of the estimation data. Regular variation of a time series can be forecast, while random variation cannot.

4 The Random Walk A random walk: Zt- Zt-1=at or equivalently:
The difference between Z in time t and time t-1 is a random error. 5 4 3 2 1 t Z R a n d o m W l k There is no evident regularity in a random walk, since the difference in the series from period to period is a random error. A random walk is not forecastable.

5 A Time Series as a Superposition of Cyclical Functions
A Time Series as a Superposition of Two Wave Functions and a Random Error (not shown) 5 4 3 2 1 - t z In contrast with a random walk, this series exhibits obvious cyclical fluctuation. The underlying cyclical series - the regular elements of the overall fluctuation - may be analyzable and forecastable.

6 8-2 Trend Analysis: A Linear Model
Year Loans Time MTB > Regress 'Loans' 1 'Time' Regression Analysis The regression equation is Loans = Time Predictor Coef Stdev t-ratio p Constant Time s = R-sq = 98.5% R-sq(adj) = 98.2% 7 2 - 3 8 T i m e L o a n s 1 R S q u r d = . 9 5 Y 6 + 4 X t f D E x p l Example 12-1

7 Example 8-2 Year Line Fit Plot y = 26.23x - 52065 100 200 300 400 1988
SUMMARY OUTPUT Regression Statistics Multiple R R Square Adjusted R Square Standard Error Observations 9 ANOVA df SS MS F Significance F Regression 1 1.2256E-05 Residual 7 Total 8 Coefficients t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0% Intercept E-05 X Variable 1 Year Line Fit Plot y = 26.23x 100 200 300 400 1988 1990 1992 1994 1996 1998 Year Price

8 Trend Analysis: An Exponential Model
MTB > let 'LOGLoan' = loge('Loans') MTB > Name c5 = 'FITS1' MTB > Regress 'LOGLoan' 1 'Time'; SUBC> Fits 'FITS1'; SUBC> Constant. Regression Analysis The regression equation is LOGLoan = Time 8 cases used 1 cases contain missing values Predictor Coef Stdev t-ratio p Constant Time s = R-sq = 99.6% R-sq(adj) = 99.5% MTB > let 'FITS' = expo(‘FITS1’) 1 9 6 5 4 3 2 8 7 Y e a r L o n s

9 8-3 Seasonality and Cyclical Behavior
88 87 86 1 9 8 7 6 t P a s e n g r M o h l y N u m b f A i 89 90 91 92 93 94 95 5 4 3 2 Y E G : J F D O S T When a cyclical pattern has a period of one year, it is usually called seasonal variation. A pattern with a period of other than one year is called cyclical variation.

10 Time Series Decomposition
Types of Variation Trend (T) Seasonal (S) Cyclical (C) Random or Irregular (I) Additive Model Zt=Tt+ St+ Ct+ It Multiplicative Model Zt=(Tt )(St )(Ct )(It)

11 Estimating an Additive Model with Seasonality
An additive regression model with seasonality: Zt=0+ 1 t+ 2 Q1+ 3 Q2 + 4 Q3 + at where Q1=1 if the observation is in the first quarter, and 0 otherwise; Q2=1 if the observation is in the second quarter, and 0 otherwise; Q3=1 if the observation is in the third quarter, and 0 otherwise.

12 8-4 The Ratio-to-Moving- Average Method
A moving average of a time series is an average of a fixed number of observations that moves as we progress down the series. Time, t: Series, Zt: Five-period moving average: Time, t: Series, Zt: ( )/5=15.4 ( )/5=15.6 ( )/5=16.0 ( )/5=17.6

13 Comparing Original Data and Smoothed Moving Average
1 5 2 t Z O r i g n a l S e s d F v - P o M A Moving Average: “Smoother” Shorter Deseasonalized Removes seasonal and irregular components Leaves trend and cyclical components

14 Ratio-to-Moving Average
Ratio-to-Moving Average for Quarterly Data Compute a four-quarter moving-average series. Center the moving averages by averaging every consecutive pair and placing the average between quarters. Divide the original series by the corresponding moving average. Then multiply by 100. Derive quarterly indexes by averaging all data points corresponding to each quarter. Multiply each by 400 and divide by sum.

15 Ratio-to-Moving Average: Example 8-2
1 5 7 6 4 3 S a l e s T i m A c t u o h d M D : P E L n g v r 2 . 9 8 F - Q Simple Centered Ratio Moving Moving to Moving Quarter Sales Average Average Average 1992W 170 * * * 1992S 148 * * * 1992S 141 * 1992F 1993W 1993S 1993S 1993F 1994W 1994S 1994S 1994F 1995W 1995S 1995S * * 1995F * *

16 Seasonal Indexes: Example 8-2
Quarter Year Winter Spring Summer Fall Sum Average Sum of Averages = Seasonal Index = (Average)(400)/400.07 Seasonal Index

17 Deseasonalized Series: Example 8-2
Seasonal Deseasonalized Quarter Sales Index (S) Series(Z/S)*100 1992W 1992S 1992S 1992F 1993W 1993S 1993S 1993F 1994W 1994S 1994S 1994F 1995W 1995S 1995S 1995F Original Deseasonalized - - - 1 9 2 F S W 7 6 5 4 3 t a l e s O r i g n d o y A j u

18 The Cyclical Component: Example 8-2
1 8 7 6 5 4 3 2 9 F S W t a l e s T r n d L i M o v g A The cyclical component is the remainder after the moving averages have been detrended. In this example, a comparison of the moving averages and the estimated regression line: illustrates that the cyclical component in this series is negligible.

19 Example 8-2 using Excel The centered moving average, ratio to moving average, seasonal index, and deseasonalized values were determined using the Ratio-to-Moving-Average method (implemented with formulas).

20 Example 8-2 using Excel Comparison of actual sales data given in Example 12-2 for versus predicted sales fit using (1) the trend model determined linear regression and (2) the seasonal index estimated from Ratio-to-Moving-Average method. The trend equation and seasonal index were used to calculate forecasts of sales for 1998 and 1999. Quarter Sales Trend Seas Indx Fit/Forcast 1994 W 170 169.8 S 148 97.448 S 141 91.291 Model Fit/Forecast F 150 1995 W 161 S 137 148.64 97.448 S 132 91.291 180 F 158 1996 W 157 160 S 145 97.448 S 128 143.11 91.291 Sales F 134 Sales 140 1997 W 160 Fit/Forecast S 139 97.448 120 S 130 91.291 F 144 1998 W 100 S 97.448 S 91.291 122.57 4 8 12 16 20 24 F 1999 W 145.44 Period (Fall 1993 = 0) S 97.448 S 129.84 91.291

21 Forecasting a Multiplicative Series: Example 8-2

22 Multiplicative Series: Review

23 8-5 Exponential Smoothing Methods
Smoothing is used to forecast a series by first removing sharp variation, as does the moving average. Exponential smoothing is a forecasting method in which the forecast is based in a weighted average of current and past series values. The largest weight is given to the present observations, less weight to the immediately preceding observation, even less weight to the observation before that, and so on. The weights decline geometrically as we go back in time. - 5 1 . 4 3 2 L a g W e i h t s D c l n G o B k T m d S u Weights Decline as we go back in Time -10 Weight Lag

24 The Exponential Smoothing Model

25 Example 8-3 Day Z w=.4 w=.8 16 * Original data: Smoothed, w=0.4: Smoothed, w=0.8: ----- D a y 1 5 9 6 4 3 2 w = . E x p o n e t i l S m h g : d 8

26 8-6 Index Numbers An index number is a number that measures the relative change in a set of measurements over time. For example: the Dow Jones Industrial Average (DJIA), the Consumer Price Index (CPI), the New York Stock Exchange (NYSE) Index.

27 Index Numbers: Example 8-4
Index Index Year Price = =100 Y e a r P i c n d I x ( 1 9 8 2 = ) o f N t u l G s 5 Original Index (1982) Index (1989)

28 Consumer Price Index Example 12-5: Adjusted Year Salary Salary
C P I Y e a r 4 5 3 2 1 9 8 7 6 Consumer Price index (CPI): 1967=100

29 Using the Computer: Example 8-2 (1)
MTB > %Decomp 'Sales' 4; SUBC> Start 1. Time Series Decomposition Data Sales Length NMissing 0 Trend Line Equation Yt = *t Seasonal Indices Period Index

30 Using the Computer: Example 8-2 (2)

31 Using the Computer: Example 8-2 (3)


Download ppt "Time Series and Forecasting"

Similar presentations


Ads by Google