Time-Series Analysis Dr. Seetha Bandara Dept. of Economics MA_ECON
Time Series Patterns A time series is a sequence of observations on a variable measured at successive points in time or over successive periods of time. The measurements may be taken every hour, day, week, month, or year, or at any other regular interval
Time series and forcasting If the historical data are restricted to past values of the variable to be forecast, the forecasting procedure is called a time series method and the historical data are referred to as a time series. The objective of time series analysis is to discover a pattern in the historical data or time series and then extrapolate the pattern into the future; the forecast is based solely on past values of the variable and/or on past forecast errors.
Cont, Quantitative forecasting methods can be used when (1) past information about the variable being forecast is available, (2) the information can be quantified, and (3) it is reasonable to assume that the pattern of the past will continue into the future. In such cases, a forecast can be developed using a time series method or a causal method.
BICYCLE SALES TIME SERIES PLOT
TREND REPRESENTED BY A LINEAR FUNCTION FOR THE BICYCLE SALES TIME SERIES
Linear trend equation
Cont,
Cont,
Cont,
SUMMARY OF LINEAR TREND CALCULATIONS FOR THE BICYCLE SALES TIME SERIES
The Importance of Business Forecasting Time-Series Data: data obtained at regular periods of time. Very often, we are trying to predict the future. The procedure is called forecasting. The managerial topic is strategic planning.
Types of Forecasting Qualitative: very subjective and judgmentoriented. Usually a panel of experts is polled and their opinions are. One process is called the Delphi Method. Quantitative: uses historical data and mathematical techniques. Time-series: base the future values of a variable entirely on past and present values of the variable. Us. Causal: include other related variables in the model in addition to past values of the predicted variable.
Components of a time series Any time series can contain some or all of the following components: Trend (T) Cyclical (C) Seasonal (S) Irregular (I)
Cont, These components may be combined in different ways. It is usually assumed that they are multiplied or added, i.e., yt = T C S I yt = T + C + S + I To correct for the trend in the first case one divides the first expression by the trend (T). In the second case it is subtracted
Trend component (Secular Trend or General Trend) The secular trend is the main component of a time series which results from long term effect of socio-economic and political factors. This trend may show the growth or decline in a time series over a long period. This is the type of tendency which continues to persist for a very long period. Prices, export and imports data, for example, reflect obviously increasing tendencies over time. The trend is the long term pattern of a time series. A trend can be positive or negative depending on whether the time series exhibits an increasing long term pattern or a decreasing long term pattern. If a time series does not show an increasing or decreasing pattern then the series is stationary in the mean.
Cyclical component (Cyclical Movements) These are long term oscillation occurring in a time series. These oscillations are mostly observed in economics data and the periods of such oscillations are generally extended from five to twelve years or more. These oscillations are associated to the well known business cycles. These cyclic movements can be studied provided a long series of measurements, free from irregular fluctuations is available. Any pattern showing an up and down movement around a given trend is identified as a cyclical pattern. The duration of a cycle depends on the type of business or industry being analyzed.
Seasonal component (Seasonal Movements) Seasonality occurs when the time series exhibits regular fluctuations during the same month (or months) every year, or during the same quarter every year. For instance, retail sales peak during the month of December. These are short term movements occurring in a data due to seasonal factors. The short term is generally considered as a period in which changes occur in a time series with variations in weather or festivities. For example, it is commonly observed that the consumption of ice-cream during summer us generally high and hence sales of an ice-cream dealer would be higher in some months of the year while relatively lower during winter months. Employment, output, export etc. are subjected to change due to variation in weather. Similarly sales of garments, umbrella, greeting cards and fire-work are subjected to large variation during festivals like Valentine s Day, Eid, Christmas, New Year etc. These types of variation in a time series are isolated only when the series is provided biannually, quarterly or monthly.
Irregular component (Irregular Fluctuations-Randomness) This component is unpredictable. Every time series has some unpredictable component that makes it a random variable. In prediction, the objective is to model all the components to the point that the only component that remains unexplained is the random component. These are sudden changes occurring in a time series which are unlikely to be repeated, it is that component of a time series which cannot be explained by trend, seasonal or cyclic movements.it is because of this fact these variations some-times called residual or random component. These variations though accidental in nature, can cause a continual change in the trend, seasonal and cyclical oscillations during the forthcoming period. Floods, fires, earthquakes, revolutions, epidemics and strikes etc,. are the root cause of such irregularities.
Model and Components The most basic model is the classical multiplicative model. Y i = T i * C i * S i * I i Y i is the dependent variable T i is the trend component C i is the cyclical component S i is the seasonal component I i is the irregular component Sometimes the subscript i is shown as a
Components Trend long term behavior e.g. several years Seasonal regular behavior within a 12 month period Cyclical up and down behavior that repeats; intensity might not be constant Irregular similar to OLS residual; what s left over after removing TSC.
What does the model mean? The value of Y at any time is the product of Trend, Cyclical, Seasonal, and Irregular components at that time. Annual data does not have S i. Quarterly or Monthly data does have S i.
Smoothing the Annual Time Series Remember: annual data has NO Seasonal component. Plot the data. If there is no apparent trend component, then Smoothing is a good approach. There is no apparent trend. The two techniques of interest are: Moving Averages and Exponential Smoothing.
Moving Averages There are several ways to do this. We ll use the text rules: Select an odd number of observations to average. Call this odd number L. Example: L = 3. The first MA(3) = (Y 1 +Y 2 +Y 3 )/3 The second MA(3) = (Y 2 +Y 3 +Y 4 )/3 Etc. Plot the value of the MA against the date, or period, of the middle value in the average.
More on Moving Averages The first (L-1)/2 and the last (L-1)/2 observations will not have a smoothed value to plot against. L should not be too large. What does your text recommend for maximum L? Greater L means more smooth. Moving Averages cannot be used to forecast.
Exponential Smoothing ES can be used to forecast 1 period into the future. All of the previously occurring data points are used to obtain each smoothed data point. Newer observations are given more weight. Formula 16.3 and 16.4.
Least-Squares Trend Fitting and Forecasting Y = T*C*S*I If the data set shows no trend, try smoothing the data. If the data set shows a trend, try fitting a trend model: Least Squares (x = time, or some coded value) Other, eg. Double Exponential
Least-Squares: Linear Trend Typically code the X values as 0 for the first observation, 1 for the second, etc. Linear use everything you know about simple linear regression; there s a nice interpretation on page 670. Check the r 2 and p-values.
Quadratic Trend Model Look at the scatter plot of the data. Quadratic or 2 nd degree polynomial the model appears in Equation 16.6. Check r 2 and p-values of F test. Interpretations are more difficult with this model.
Exponential Trend Model when a series increases at a rate such that the percentage difference from value to value is constant. The models are given on page 672. Check r 2 and p-values of F test.
Time Series Forecasting of Monthly or Quarterly Data It shows typical data that requires a Seasonal component in the multiplicative model (Y=TCSI). The data is quarterly. Thus the coded date is expressed in number of quarters. Use dummy variables to tell the equation which quarter.
Equation What does it mean? How do you use it? This type of model captures both Trend and Seasonal. How do you decide which model is best?
Calculating a 5-Year Moving Average Example Year Sales ($M) 2003 4 2004 6 2005 5 2006 8 2007 9 2008 5 2009 4 2010 3 2011 7 2012 8
(4M + 6M + 5M + 8M + 9M) / 5 = 6.4M The average sales for the second subset of five years (2004 2008), centered around 2006, is 6.6M: (6M + 5M + 8M + 9M + 5M) / 5 = 6.6M The average sales for the third subset of five years (2005 2009), centered around 2007, is 6.6M: (5M + 8M + 9M + 5M + 4M) / 5 = 6.2M Continue calculating each five-year average, until you reach the end of the set (2009-2013). This gives you a series of points (averages) that you can use to plot a chart of moving averages. The following Excel table shows you the moving averages calculated for 2003-2012 along with a scatter plot of the data: