Docsity

Topic 2 Time Series Analysis Final, Apuntes de Marketing de Ventas

Vista previa parcial del texto

¡Descarga Topic 2 Time Series Analysis Final y más Apuntes en PDF de Marketing de Ventas solo en Docsity!

Topic 2:

Times series analysis techniques

Index

1. Introduction

2. Basic techniques

3. Smoothing techniques

4. Times Series Decomposition

Readings&links

  • This slides and class notes.
  • Valderrey Sanz, Pablo (2012): Predicción económica y empresarial. Ed. Starbook. (note: you might use this book to complete your class notes, but keep in mind we won’t use some of the software the author uses).
  • Hyndman, R. and Athana-sopou-los, G.. Forecasting: principles and practice. Ed. Otext.com Available in paperback and online at https://www.otexts.org/fpp/
  • Diebold, Francis X. Elements of Forecasting (2006). 4th Ed. South Western. Cengage Learning.

Times Series Analysis

Basic

Techniques

ð Past value ð Average ð Weighted average

Smoothing

techniques

ðSimple exponential smoothing ðOther exponential smoothing

Times Series

Decomposition

ARIMA models

Classification of the main Time Series Analysis techniques

1. Introduction

@ How to evaluate results?! Forecast accuracy basic measures

Mean Error Mean Squared Error (MSE) Mean Absolute Error (MAE) Average of the sum of all forecast errors for the historical data. Average of the sum of all squared forecast errors for the historical data. It is the average of the sum of all absolute values of all the forecast errors. One major difference between MSE and MAE is that the MSE measure is influenced much more by large forecast errors than by small errors. Forecast Error et = Yt - Ft where Y is real data and F the forecast

@ When to use basic techniques? Series in which:
  • Values vary around a constant value (the underlying mean)
  • Variance around the mean is constant over time Thus, if the time series involves a trend (unless it is a pure linear one), cyclical or season pattern, then these techniques can´t be directly used. Case 1: Weekly sales Period Sales Period Sales Period Sales 1 5.3 10 6.5 19 5. 2 4.4 11 5.1 20 5. 3 5.4 12 5.8 21 5. 4 5.8 13 5 22 6. 5 5.6 14 6.2 23 5. 6 4.8 15 5.6 24 6 7 5.6 16 6.7 25 5. 8 5.6 17 5. 9 5.4 18 5.

2. Basic Time Series Techniques

b) Average and Moving average

Next method would be average of the previous periods: An sophistication of the use of an average is applying a “moving average”. Moving average Average of prior periods that is continually recomputed by adding each new data at the same time old data is dropped so the "period window" used has always the same length. For instance, for a 3 period average s= The smaller the number k, the more weight is given to recent periods. The greater the number k, the less weight is given to more recent periods.

  • A large k is desirable when there are wide, infrequent fluctuations in the series
  • A small k is most desirable when there are sudden shifts in the level of series

Period Sales MA3 MA4 MA 24 6.00 5.90 5.70 5. 25 5.80 5.97 5.93 5. 26 5.67 5.93 5. ME 0.07 0.06 0. MSE 0.40 0.35 0. MAE 0.51 0.48 0. If we apply this techniques to case one variable, the following forecast are obtained The more observations are included in the moving average, the greater the smoothing effect.

Definition

  • They are a group of techniques that forecast future using the average behavior of past data. They differ among themselves in the used weight distribution for past values.
  • The more weight on most recent data, the more responsive to changes is the forecast (less smooth). They called "smoothing techniques” because they "smooth" the pattern of the serie to obtain a value for the future.
a) Single Exponential smoothing

It is a special case of the weighted moving averages method in which we emphasize recent information and systematically discount old information. The Simple Exponential Smoothing method is used for forecasting a time series when there is no trend or seasonal pattern, but the mean (or level) of the time series yt is slowly changing over time.

3. Smoothing Techniques

1 2 1 1 1 1

− − − −

t t t t t t t t t

y ( )y ( ) F
y ( )[ y ( )F ]
F y ( ) F

α α α α α α α α α α t t t F = α y + ( − α )F

1 The forecast F t+ is based on weighting the most recent observation y t with a weight α and weighting the most recent forecast F t with a weight of 1- α. where Ft + 1 = forecast value for period t + 1 ; Yt = actual value for period t Ft = forecast (smoothed value for period t ) α = smoothing constant (0 < α < 1) 1 1 3 3 2 2 F (^) 1 y ( 1 ) y 1 ( 1 ) y ( 1 ) y ( 1 ) y t t t t t t −

+ =^ α^ +^ α −^ α −+^ α −^ α − +^ α −^ α − +!+^ α −^ α

If this substitution process is repeated by replacing F t- by its components, F t- by its components, and so on the result is: Therefore, F t+ is the weighted moving average of all past observations. As the first value , F 1 is not known, we can use the first observed value Y 1.

This is the same as

Ft+1 = Ft + α (Yt – Ft)

Exponential Sm oothing (.1) 0 10 0 2 0 0 3 0 0 4 0 0 50 0 6 0 0 70 0 0 10 2 0 3 0 4 0 50 6 0 P e r i o d Exponential Smoothing (α = .1)

How Much Smoothing Is There?

Actual Data Smoothed time series with α = 0. A “flat” smoothed series The lower the value of α, the more “smooth” the time series will become.

Exponential Sm othing ( .7) 0 10 0 2 0 0 3 0 0 4 0 0 50 0 6 0 0 70 0 0 10 2 0 3 0 4 0 50 6 0 P e r i o d Exponential Smoothing (α = .7) and one period ahead Actual Data Smoothed time series with α = 0. Very sensitive to most recent time series value – not much smoothing The higher the value of α, the more “sensitive” the estimated time series will become.

b) Other Exponential smoothing

Moving average and single exponential smoothing technique are useful when the series analyzed have no trend nor seasonal components. Forecasting series with trend by moving average

  • When there is trend, a single moving average (and also a single exponential smoothing technique) will commit a systematic error.
  • In a series with trend, the historical error equals the difference between single moving average and double moving average. Example of systematic error in series with trend estimated by single moving average Thus: 3 3 33 t (^) t t t t t e y M e' M M = − = − Original serie 10 11 12 13 14 15 16 17 18 19 20 21 M3 11 12 13 14 15 16 17 18 19 M33 12 13 14 15 16 17 M3+ (M3-M33) 16 17 18 19 20 21 e 2 2 2 2 2 2 e' 2 2 2 2 2 2 ( ) 3 3 3 33 F (^) t M (^) t e't M (^) t M (^) t Mt = + = + −

Double exponential smoothing (Holt’s smoothing method)

  • Holt’s two parameter exponential smoothing method is an extension of simple exponential smoothing. It adds a growth factor (or trend factor) to the smoothing equation as a way of adjusting for the trend.
  • It is also an application of the concept of double moving average to smoothing techniques. What about future estimations, meaning Forecasting Ft+1? Single moving average: 1 ( 1 1 ) 1 t y^ t^ y^ t^ ...^ yt^ s s F (^) + =^ +^ −^ +^ + −^ − Double moving average: (^1) 2 1 t^ t^ t s s ss t t t t s ss t t t a b h a M ( M M ) b ( M M ) s F (^) +

Where h is the number of forecasted periods and s the number of periods considered in the moving average window.