This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Time Series 2: Trend Fitting
Sections 16.216.4 Time Series 2  Trends 1 16.2 Component models Many forecasting techniques assume that behavior observed in the past will be repeated in the future. A decomposition approach assumes the series has several components of behavior that can be estimated separately, then combined together for forecasting. These components were usually assumed to be trend, seasonality and the (business) cycle.
Time Series 2  Trends 2 The three major components
Trend (TR): a longterm pattern of upward or downward movement 2. Seasonality (S): a regular pattern of fluctuations that occurs within each year of data 3. Cycle (C): a mediumterm pattern of up and down swings consisting of prosperity, recession, depression and recovery
1.
Time Series 2  Trends 3 Additive or Multiplicative?
An additive approach assumes the series is a sum of its components Yt = TRt + St + Ct + Et A multiplicative model assumes the series is a product of the components Yt = TRt St Ct Et
Et is the error or irregular component
Time Series 2  Trends 4 Cycles in unemployment rates
US Unemployment rates since 1948
12 10 8 Oct49 Jul58 May61 Aug71 Dec82 Oct09 May75 Jun92 Jun03 Percent 6 4 2 0 Sep54 Month Apr56 Aug64 Dec72 Apr81 Aug89 Dec97 Apr06 Time Series 2  Trends 5 A common simplification In order to estimate the Cycle, we need to see several periods of peaktroughpeak behavior. Since a cycle often lasts 710 years, this requires a long series, which we may not have. We often find that the length of the cycle is quite variable, which adds further difficulty. You often see Cycle and Error combined, yielding a simpler model.
Time Series 2  Trends 6 Further simplification If a series is not seasonal, perhaps because it is annual, the only components of behavior it would have is trend and "other". To see what type of underlying pattern is present, we often use a smoother to filter out irregularities. Common methods are moving averages and exponential smoothing.
Time Series 2  Trends 7 Cabot.XLS
Cabot Corporation Sales
3500 Sales Revenue 3000 2500 2000 1500 1000 1982 1985 1988 1991 1994 1997 2000 2003 2006 2009 Year What kind of trend should we use?
Time Series 2  Trends 8 Moving averages To see the overall trend, we could smooth using a moving average. This is just an average of L data points, computed over a rolling or moving horizon. The length of the average is somewhat subjective. I use L= 5 here.
Moving Average.xls uses 3 and 7. Time Series 2  Trends 9 Centered moving averages For each year of data, compute the average revenue for the L years in which the current year is the center point. For a 5year average, the CMA for 2000 uses revenue from 1998 through 2002.
M2000 = { Y1998 + Y1999 + Y2000 + Y2001 + Y2002} / 5 = _____
Time Series 2  Trends 10 Cabot revenue and CMA5
Revenue 3500 Sales Revenue 3000 2500 2000 1500 1000 1982 1985 1988 1991 1994 1997 2000 2003 2006 2009 CMA5 Year Linear trend until last six years
Time Series 2  Trends 11 Notes on using a CMA Usually pick an odd length because it is not clear how you center if even. The "center" of 19982001 is in between 1999 and 2000. CMA is not really a forecasting tool. You could use a noncentered MA if you wanted to forecast.
M2008 = { Y2004 + Y2005 + Y2006 + Y2007 + Y2008} / 5 = _____
Time Series 2  Trends 12 Noncentered MA and forecasts
Revenue 3500 Sales Revenue 3000 2500 2000 1500 1000 1982 1985 1988 1991 1994 1997 2000 2003 2006 2009 2012 Year MA5 Forecast Time Series 2  Trends 13 A regular moving average always gives Exponential smoothing the same weight to each observation (it was 1/5 in the previous graph), but uses only L pieces of data. It is more a smoothing than forecasting tool. Exponential smoothing uses all the data points, with most weight given to the most recent observations. It has a builtin forecast function.
Time Series 2  Trends 14 The smoothing function
Let W denote the smoothing weight. It usually is in the vicinity of .1 or .2, and should always be between 0 and 1. The smoothed value of the series is: Et = W Yt + (1 W) Et1 where we usually take E1 = Y1
Time Series 2  Trends 15 Cabot revenue, W=.3
Sales in 19821984 are 1588, 1558 and 1753. Take E1 = Then get E2 = E3 = E4 =
Time Series 2  Trends 16 Smoothed sales, W=.3
Revenue 3500 Sales Revenue 3000 2500 2000 1500 1000 1982 1985 1988 1991 1994 1997 2000 2003 2006 2009 SES Year Not bad through 2003
Time Series 2  Trends 17 Forecasting After we have observed the last observation, say at time period t=27 as it is for Cabot, we get the last smoothed value: E27 = W Y27 + (1 W) E26 This is our best guess as to where things will be in the future, so we project a straightline forecast at E27. If W=.8, E27 = ____
Time Series 2  Trends 18 Cabot with W=.8 and forecast
Revenue 3500 Sales Revenue 3000 2500 2000 1500 1000 1982 1985 1988 1991 1994 1997 2000 2003 2006 2009 2012 Year SES Forecast Time Series 2  Trends 19 The best value of W? One common method is to forecast one time period ahead then get forecast errors. Choose the value of W that minimizes some function of these. More on this later. Onestep ahead errors at beginning of Cabot series ____ ____ ____ Time Series 2  Trends 20 16.4 Fitting a Trend Function An alternative to smoothing is to fit some kind of a trend TRt to the data. The trend is a function of the time index t and can be extrapolated into the future simply by evaluating the trend at a future time period. For Cabot, we would compute TR28 and TR29 and TR30 ...
Time Series 2  Trends 21 Trend functions
t is the time index variable: t = 1,2,3, ... TRt = b0 + b1 t TRt = b0 + b1 t + b2 t2 TRt = b0 b1t <linear trend> <quadratic trend> <exponential trend> NOTE: fit the exponential model as log(TRt) = log(b0) + log(b1) t
Time Series 2  Trends 22 Finding a trend by regression Create the selected function of t that is in your model (for example, t and t2 for a quadratic trend). Then regress Yt on the function(s) of t The resulting Yhat equation is your trend function. To forecast, you can just use the prediction options in PhStat or the workbook at the future value of t.
Time Series 2  Trends 23 Simple regression and prediction
Simple Linear Regression Analysis Regression S tatistics Multiple R 0.6623 RSquare 0.4387 Adjusted RS quare 0.4162 Standard Error 313.3324 Observations 27
Confidence Interval Estimate Data X Value Confidence Level Intermediate Calculations Sample Size Degrees of Freedom t Value XBar, Sample Mean of X Sum of Squared Differences from XBar Standard Error of the Estimate h Statistic Predicted Y (YHat) 28 95% 27 25 2.059539 14 1638 313.3324 0.156695 2270.661 Intercept timeIndex Coefficients Standard Error 1312.5242 124.0318 34.2192 7.7419 t Stat 10.5822 4.4200 For Average Y Interval Half Width Confidence Interval Lower Limit Confidence Interval Upper Limit For Individual Response Y Interval Half Width Prediction Interval Lower Limit Prediction Interval Upper Limit 255.4483 2015.213 2526.109 694.0403 1576.621 2964.701 Time Series 2  Trends 24 Comments
1. 2. 3. 4. 5. Don't need all that detail? Yhat equation: Fit quality: Meaning of coefficients: Forecast for 2010? Time Series 2  Trends 25 Can also use Chart options
Cabot Revenue 3500 3000 2500 2000 1500 1000 500 0 0 5 10 15 time (t =1 for 1982) 20 25 30 y = 34.219x + 1312.5 2 R = 0.4387 Time Series 2  Trends 26 Adding a trend line
1. 2. 3. 4. 5. 6. On the time series plot, right click on any point on the graph. Pick "Add Trend Line". Choose what type of function you want. In Excel 2003 hit options tab. In Excel 2007 look at bottom of menu. Check box to display equation and R2 on graph. Can also choose to forecast ahead.
Time Series 2  Trends 27 Other trend functions A linear trend is appropriate if the series increases about the same amount each time period. That is not the case here. Cabot revenues in the 2000s grew faster than that. Two fairly common types of curved trends are the quadratic and exponential. Time Series 2  Trends 28 Quadratic trend
Cabot Revenue 3500 3000 2500 2000 1500 1000 500 0 0 5 10 15 time (t =1 for 1982) 20 25 30 y = 3.5377x  64.836x + 1791.3 R = 0.6653
2 2 Time Series 2  Trends 29 Quadratic trend
1. 2. 3. 4. 5. Fit quality? Equation: Meaning of coefficients When does it "turn upwards"? Forecast for 2010 Time Series 2  Trends 30 Exponential trend Textbook on page 616617 formats this as TRt = b0 b1t This multiplicative form can be made additive by log(TRt) = log(b0) + t*log(b1) So do a simple regression of log of Y on the time index t The exponential function in Excel is equivalent but has a different form.
Time Series 2  Trends 31 Exponential fit via PhStat Regress log of Revenue on time index Yhat equation (for log) is: Coefficients in model for actual Revenue t are: b0= ____ and b1=____ Forecast for 2010? Time Series 2  Trends 32 ...
View
Full
Document
This note was uploaded on 02/14/2011 for the course QMB 3250 taught by Professor Thompson during the Spring '08 term at University of Florida.
 Spring '08
 Thompson

Click to edit the document details