1 / 29

Time series Decomposition

Time series Decomposition. Farideh Dehkordi-Vakil Speaker : Yongqian Sun. Introduction. One approach to the analysis of time series data is based on smoothing past data in order to separate the underlying pattern in the data series from randomness .

imock
Download Presentation

Time series Decomposition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Time series Decomposition Farideh Dehkordi-Vakil Speaker:YongqianSun

  2. Introduction • One approach to the analysis of time series data is based on smoothing past data in order to separate the underlying pattern in the data series from randomness. • The underlying pattern then can be projected into the future and used as the forecast.

  3. Introduction • The underlying pattern can also be broken down into sub patterns to identify the component factors that influence each of the values in a series. • This procedure is called decomposition. • Decomposition methods usually try to identify two separate components of the basic underlying pattern that tend to characterize economics and business series. • Trend Cycle • Seasonal Factors

  4. Introduction • The Trend Cycle represents long term changes in the level of series. • The Seasonal factor is the periodic fluctuations of constant length that is usually caused by known factors such as rainfall, month of the year, temperature, timing of the Holidays, etc. • The decomposition model assumes that the data has the following form: Data = Pattern + Error = f (trendcycle, Seasonality , error)

  5. Decomposition Model • Mathematical representation of the decomposition approach is: • Yt is the time series value (actual data) at period t. • St is the seasonal component ( index) at period t. • Tt is the trend cycle component at period t. • Et is the irregular (remainder) component at period t.

  6. Decomposition Model • The exact functional form depends on the decomposition model actually used. Two common approaches are: • Additive Model • Multiplicative Model

  7. Decomposition Model • An additive model is appropriate if the magnitude of the seasonal fluctuation does not vary with the level of the series. • Time plot of U.S. retail Sales of general merchandise stores for each month from Jan. 1992 to May 2002.

  8. Decomposition Model • Multiplicative model is more prevalent with economic series since most seasonal economic series have seasonal variation which increases with the level of the series. • Time plot of number of DVD players sold for each month from April 1997 to June 2002.

  9. Decomposition Model • Transformations can be used to model additively, when the original data are not additive. • We can fit a multiplicative relationship by fitting an additive relationship to the logarithm of the data, since if • Then

  10. Trend-Cycle Estimation • HowtoestimateTrend-Cycle • Moving Average • Simple moving average • Centered moving average • Local Regression Smoothing • Least squares estimates

  11. Simple Moving Average • Simple moving average can be defined for any odd order. A moving average of order k, or MA(k) where k is an odd integer is defined as the average consisting of an observation and the m = (k-1)/2 points on either side. • For example for MA(3)

  12. Simple Moving Average • The idea behind the moving averages is that observations which are nearby in time are also likely to be close in value. • The average of the points near an observation will provide a reasonable estimate of the trend-cycle at that observation. • The average eliminate some of the randomness in the data, and leaves a smooth trend-cycle component.

  13. Example: Weekly Department Store Sales • Calculation of MA(3) and MA(5) smoother for the weekly department store sales. • In applying a k-term moving average, m=(k-1)/2 neighboring points are needed on either side of the observation. • Therefore it is not possible to estimate the trend-cycle close to the beginning and end of series. • To overcome this problem a shorter length moving average can be used.

  14. Example: Weekly Department Store Sales

  15. Simple Moving Average • The number of points included in a moving average affects the smoothness of the resulting estimate. • As a rule, the larger the value of k the smoother will be the resulting trend-cycle estimate. • Determining the appropriate length of a moving average is an important task in decomposition methods.

  16. Centered Moving Average • The simple moving average required an odd number of observations to be included in each average. This was to ensure that the average was centered at the middle of the data values being averaged. • What about moving average with an even number of observations? • For example MA(4)

  17. Centered Moving Average • To calculate a MA(4), the trend cycle at time 3 can be calculated asfollws:

  18. Centered Moving Average • The first and the last term in this average have weights of 1/8 and all the other terms have weights of 1/4. • Therefore a 2MA(4) smoother is equivalent to a weighted moving average of order 5. • In general a 2 MA(k) smoother is equivalent to a weighted moving average of order k+1 with weights 1/k for all observations except for the first and the last observation in the average, which have weights 1/2k.

  19. Least squares estimates • The general procedure for estimating the pattern of a relationship is through fitting some functional form in such a way as to minimize the error component of equation data = pattern + Error • The name least squares is based on the fact that this estimation procedure seeks to minimize the sum of the squared errors in the above equation.

  20. Least squares estimates • A major consideration in forecasting is to identify and fit the most appropriate pattern (functional form) so as to minimize the MSE(meansquareerror). • A possible functional form is a straight line. • ThentheMSEcanbedescribedasfollows: min Usetheabovetwoformulates,wecanobtain:

  21. Example:Least squares estimates Yt= -9.4995 + 9.5004 t (I have neglected some intermediate computational process.)

  22. Conclude:Trend-Cycle Estimation • Instead of fitting one straight line to the entire dataset, a series of straight lines will be fitted to sections of the data. • A straight trend line is notalways appropriate, there are many time series where some curved trend is better.Thenthetrendmaybelikethese:

  23. SeasonalAdjustment • Howtodeterminetheseasonalfactors • ForAdditivemodel • Averagebyseasons • Formultiplicativemodel • Calculatetheseasonalindexesusetheaveragebyseasons

  24. AdditiveSeasonal Adjustment

  25. MultiplicativeSeasonal Adjustment

  26. Example: Seasonal Adjustment

  27. Example: Seasonal Adjustment

  28. Conclude: : Seasonal Adjustment • Thispartonlyintroducedoneofthesimplestmethodstocalculatetheseasonalfactor. • Therearesomemorecomplexapproaches:movingaveragebyseasonswithweights, curve fitting algorithmusingcos(x).etc.

  29. conclusion

More Related