6313f07timeseries

Upload: kanika-aggarwal

Post on 09-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 6313f07timeseries

    1/32

    Time SeriesForecasting

    Outline:

    1. Measuring forecast error

    2. The multiplicative time series model

    3. Nave extrapolation4. The mean forecast model

    5. Moving average models

    6. Weighted moving average models

    7. Constructing a seasonal index using a centeredmoving average

    8. Exponential smoothing

  • 8/8/2019 6313f07timeseries

    2/32

    Forecast error

    Month/Year

    (1)Forecasted

    Value

    (2)ActualValue

    (3) = (2) (1)

    Error July 2000 $390 $423 $33

    Aug 2000 450 429 -21

    Sept 2000 289 301 12

    Forecasting Convenience Store Ice Sales

  • 8/8/2019 6313f07timeseries

    3/32

    3 measures of forecast error

    Mean absolute deviationMean square error

    Root mean square error.

  • 8/8/2019 6313f07timeseries

    4/32

    Actual

    Predicted

    Time Average Absolute Error ( AAE ) is given by:

    !

    !m

    t

    t t Y Y

    m

    AAE 1

    1

    Where Yt is the actual value of variable that we seek toforecast and is the fitted or forecasted value of thevariable.

    t Y

  • 8/8/2019 6313f07timeseries

    5/32

  • 8/8/2019 6313f07timeseries

    6/32

    Actual

    Predicted

    Time R oot M ean Square Error (root M SE ) is given by:

    2

    1

    )(1

    t

    m

    t

    t Y Y

    m

    root M SE !

    !

    R oot MSE is a statisticthat is typically is reported by forecasting software

    applications

  • 8/8/2019 6313f07timeseries

    7/32

    T he time path of a variable(such as monthly sales of building materials by supply stores) is produced by theinteraction of 4 factors or components.T hesecomponents are:

    1. T he trend component(T )2. T he seasonal component(S)3. T he cyclical component(C); and4. T he irregular component(I)

  • 8/8/2019 6313f07timeseries

    8/32

    Th e trend component ( T)

    T rend is the gradual, long-run (or secular) evolutionof the variables that we are

    seeking to forecast.

  • 8/8/2019 6313f07timeseries

    9/32

    F actors affecting t he trend component of atime series

    P opulation changesDemographic changes. For example, spending for

    healthcare services is likely to rise due to the aging

    of the population.Sales of fast food are up due tothe secular increase in the female labor forceparticipation rate.

    T echnological change.Sales of music on DVD have

    slumped due toIpods.T ypewriter sales haveplumetted.

    C hanges in consumer tastes and preferences.

  • 8/8/2019 6313f07timeseries

    10/32

    -60

    -40

    -20

    0

    20

    40

    10 20 30 40 50 60 70 80 90 100

    Linear tre nd s

    Trend = 10 25t

    Trend = -50 + .8t

  • 8/8/2019 6313f07timeseries

    11/32

    0

    1000

    2000

    3000

    4000

    10 20 30 40 50 60 70 80 90 100

    Non-lin ear, increas ing tre nd

    Trend = 10 + .3t + .3t2

  • 8/8/2019 6313f07timeseries

    12/32

    -5000

    -4000

    -3000

    -2000

    -1000

    0

    1000

    10 20 30 40 50 60 70 80 90 100

    Non-lin ear, decreas ing tre nd

    Trend = 10 - .4t - .4t 2

  • 8/8/2019 6313f07timeseries

    13/32

    The seasonal component (S)

    M any series display a regular pattern of variability depending on the time of year.For example, sales of toys and scotch

    whiskey peak in December each year.

    Ice cream sales are higher in summer

    months than in winter months.Car sales tend typically to be strong

    in May and June and weaker inNovember and December.

  • 8/8/2019 6313f07timeseries

    14/32

    The cyclical component (C)

    T he time path of a series can be influenced by businesscycle fluctuations.

    For example, we expect housing starts to decline in thecontractionary phase of the business cycle.T he same holds true for federal or state tax receiptsT he time path of spending for consumer durable goods

    is also shaped by cyclical forces.Spending for capital goods is likewise cyclical.T he movie industry has the reputation for being

    counter-cyclicalfor example, it flourished duringthe Depression.

  • 8/8/2019 6313f07timeseries

    15/32

    Th e irregular component (I )

    T he irregular component of the series, sometimescalledw hite noise , is the remaining variability(relativeto trend) that cannot be explained by seasonal orcyclical factors.T he irregular component is anunexpected, non-recurring factor that affects the series.For example, hamburger sales plunge due to panic

    about E-C oli bacteria.P roduction of trucks slumps because of a strike at a

    GM parts plant in Ohio.Airline slump after 9/11.A cold snap affects July ice cream sales in upstate NY.

  • 8/8/2019 6313f07timeseries

    16/32

    If you have a well-designedforecasting model, then forecastingerrors should be mainly accounted

    for by irregular factors

  • 8/8/2019 6313f07timeseries

    17/32

    Th e model

    t t t t t I C S T Y vvv!

    Where:Y

    t is the value of the time series variable in period t(month t, quarter t, etc.)T t trend component of the series in period t S t is the seasonal component of the series in period t

    C t is the cylical component of the series at period t; and I t is the irregular component of the series in period t.

  • 8/8/2019 6313f07timeseries

    18/32

  • 8/8/2019 6313f07timeseries

    19/32

    Th e Problem: F orecast Sales of HomeF urnis hing Stores, October -D ecember, 2007

    T he data:We have monthly data of sales of home

    furniture stores January 1992 to July 2007(187 monthly observations).

    T he data are expressed in millions of current dollars, not seasonally adjusted

  • 8/8/2019 6313f07timeseries

    20/32

    t Yr Mo $1 1992 1 14602 1992 2 14533 1992 3 15564 1992 4 16225 1992 5 16756 1992 6 17597 1992 7 1789

    8 1992 8 18149 1992 9 1721

    10 1992 10 183911 1992 11 192512 1992 12 2246

    " " " "" " " "

    187 2007 7 4803

    The D ata

  • 8/8/2019 6313f07timeseries

    21/32

    1000

    2000

    3000

    4000

    5000

    6000

    7000

    92 94 96 98 00 02 04 06

    Sales of Home Furnishing Stores, 1992-2007(millions of dollars, NSA)

    Year/Month

    Source: Economagic.com

  • 8/8/2019 6313f07timeseries

    22/32

    OLS is a method of finding the line, or curve, of best fit.

    T he trend function of best fit is the one thatminimizes the squared sum of the vertical distancesof the sample points(the actual monthly values of home furnishing sales) from the trend line(fittedvalues of monthly building materials sales).

    Our first step is to estimate thetrend component of our series.This is accomplished using a

    ordinary least squares, or OLS for short.

  • 8/8/2019 6313f07timeseries

    23/32

    Let:Yt be the actual value of furniture store sales in

    month t;

    Let t be the trend value of furniture store salesin month t.T he trend function we are seekingsatisfies the following condition:

    2

    187

    1)(. t t

    t Y Y M IN

    !

  • 8/8/2019 6313f07timeseries

    24/32

    We estimate a linear trend function wit h Excel.It is displayed on t he nextslide.

  • 8/8/2019 6313f07timeseries

    25/32

    y = 17 .62 x + 1475 .

    0

    1000

    2000

    3000

    4000

    5000

    6000

    7000

    0 20 40 60 80 100 120 140 160 180 200

    L inear Trend L ine Fitted toHome Furnishing Data

    t

    R 2 = 0 .8 3

  • 8/8/2019 6313f07timeseries

    26/32

    1000

    2000

    3000

    4000

    5000

    6000

    7000

    92 94 96 98 00 02 04 06

    Actual TREND

    Year/Month

    Actual and Trend Values of Hom Furniture Sales (in millions)

  • 8/8/2019 6313f07timeseries

    27/32

    Month IndexJan 0.8799Feb 0.8475Mar 0.9823

    Apr 0.9004May 0.9939Jun 1.0197Jul 0.9729

    Aug 1.0487

    Sep 1.0042Oct 0.9962Nov 1.123Dec 1.2969

    If you sum t hemont hly values anddivide by 12 , youget 1 .00 .

    Later we s how asimple tec hniquefor computing a

    seasonal index.

    Seasonal Index

  • 8/8/2019 6313f07timeseries

    28/32

    Performing an in -sample forecast of homefurnis hing sales

    A n in-sample forecast means we are forecastinghome furshing sales for those months for which wealready have data that have been used to estimate the

    trend, seasonal, and other components . Comparingforecasted, or fitted values of home furnishing saleswith actual time series data gives us an idea of howwell this performs.

    We will assume that the cyclical index is equal to 1(Ct = 1). This is a poor assumption since our periodcontains two business cycle contractions.

  • 8/8/2019 6313f07timeseries

    29/32

    t t t Apr S F vv!9 8

    71.532,2$19 00.0]1475)7662.17[( 9 8 !vvv! A pr

    Lets give an example how weuse this model to Home

    furnishing sales for a particular month, say, A pril199 8 . t = 76 for this month

  • 8/8/2019 6313f07timeseries

    30/32

    1000

    2000

    3000

    4000

    5000

    6000

    7000

    94 96 98 00 02 04 06

    Multiplcative model Home furnishing sales (millions)

    In-Sample Forecas t of Home Furnishing Sales Us ing Multiplicative Model

    Year/Month

  • 8/8/2019 6313f07timeseries

    31/32

    -300

    -200

    -100

    0

    100

    200

    300

    94 96 98 00 02 04 06

    Res i ls f I -samp le ecas t f me ish i a les i milli s)

    Recess i is shaded

    Year / th275.103$! M SE

  • 8/8/2019 6313f07timeseries

    32/32

    t Yr/Mo Trend Seasonal Cyclical Forecast190 2007/Oct 4822.8 0.9962 0.999 4799.669

    191 2007/Nov 4840.42 1.123 0.979 5321.64

    192 2007/Dec 4858.04 1.2969 0.975 6142.882

    F orecasting Using t he MultiplicativeModel