Introduction to Time Series Forecasting Bernard Menezes with inputs from Kalam, Pankaj, Somsekhar, Timma
Time Series A sequence of observations of a quantifiable phenomenon recorded in increasing order of time
Time Series - Examples Stock price, Sensex Exchange rate, interest rate, inflation rate, national GDP Retail sales Electric power consumption Number of accident fatalities
Goals To UNDERSTAND the observed series To look into the future (by deducing from the observed patterns in the past)
Forecasting vs. Extrapolation
Error Measures RMSE MAE MAPE Max error
Patterns in the data Trend (linear, quadratic, S-shaped, etc.) Seasonality (by month or quarter of the year, day of the week or time of the day) Cyclicity (fashions come and go – notice the kinds of spectacle frames “fashionable” over the years)
Stationarity Should we care? Strict stationarity, covariance stationarity
Covariance, ACF, PACF What do these tell us?
Series Decomposition Many time series can be decomposed into following components Trend (T): Non-periodic component of time series Cyclical (C): Periodic component with period longer than seasonal period Seasonal (S): Recurring pattern (periodic component). Irregular (I): Residual after removing all three components above What’s the point?
Some Models for Decomposition Trend, seasonality and irregular component can combine in various ways such as Model 1: T * S * I Model 2: T * (S + I) Model 3: T + S + I The multiplicative model is more appropriate for demand sales
Cyclical Component? Generally trend and the cyclical component are analyzed/estimated together for ease of model construction
Experiment 1: MAPEs for different models
Experiment 2: Does Decomposition help? *indicates use of decomposition.
With and without Decomposition
With and without Decomposition (contd.)
Experiment 3: Which error measure do we use for the decomposed series?
Factoring expert advice How many experts do we select? Which of these is used for a particular point forecast? How do we weigh the advice of the experts? Do we dynamically change the above? How? Why?
AR1 0.5*X(t-1)+eps(t)
AR1 0.9*X(t-1)+eps(t)
AR1 0.2*X(t-1)+eps(t)
0.3*X(t-1)+0.5*X(t-2)+eps(t) AR2 0.3*X(t-1)+0.5*X(t-2)+eps(t)
MA1 0.8*eps(t-1)+eps(t)