390 Lecture 6

download 390 Lecture 6

of 66

Transcript of 390 Lecture 6

  • 7/28/2019 390 Lecture 6

    1/66

    TrendModels

    Atrendmodelis

    where Timet isthetimeindex.

    InSTATA,Timet isanintegersequence,normalizedto

    bezeroatfirstobservationof1960. Mostcommonmodels

    LinearTrend

    ExponentialTrend QuadraticTrend

    TrendswithChangingSLope

    )( tt TimegT =

  • 7/28/2019 390 Lecture 6

    2/66

    Warning:

    BeskepticalofTrendModels Whileinsomecases,trendforecastingcanbe

    useful. Inmanycases,itcanbehazardous.

    WewillexaminesomeofthetrendexamplesinChapter5ofDieboldstext

    Theydidnotforecastwelloutofsample. Aconstructivealternativeistoforecastgrowth

    rates,aswedidforconsumptionexpenditure.

  • 7/28/2019 390 Lecture 6

    3/66

    Example1

    LaborForceParticipationRate FromBLS

    Monthly,19482009,Seasonallyadjusted

    MenandWomen,ages25+

    Percentageofpopulationinlaborforce(employedplusunemployeddividedbypopulation)

    Dieboldestimateson19481992

    Wewillestimateon19481992,forecast19932009

  • 7/28/2019 390 Lecture 6

    4/66

    WomensLaborParticipationRate

    19481992

  • 7/28/2019 390 Lecture 6

    5/66

    MensLaborParticipationRate

    19481992

  • 7/28/2019 390 Lecture 6

    6/66

    LinearTrendModel

    Thelaborforceparticipationrateshavebeen

    smoothlyandlinearlyincreasing(forwomen)andsmoothlyandlinearlydecreasing(formen)over19481992

    Thissuggestsalineartrend

    Inthismodel, 1 istheexpectedperiodtoperiodchangeinthetrendT

    t

    tt TimeT 10 +=

  • 7/28/2019 390 Lecture 6

    7/66

    Example2

    RetailSales,CurrentDollars FromCensusBureau

    Monthly,19552001,seasonallyadjusted Thisparticularseriesdiscontinuedafter2001

    Dieboldestimatesupto1991

    Wewillforecast1992current

  • 7/28/2019 390 Lecture 6

    8/66

    RetailSales

    19551993

  • 7/28/2019 390 Lecture 6

    9/66

    QuadraticTrends

    Theretailsalesserieshasbeenincreasing

    smoothlyover19551993,butnotlinearly. Tomodelthiswewilluseaquadratictrend

    2

    210 ttt TimeTimeT ++=

  • 7/28/2019 390 Lecture 6

    10/66

    Example3

    TransactionVolume,S&PIndex FromYahooFinance

    (SimilartoNYSEseriesinDiebold)

    Weekly,1950current

    Dieboldestimateson19551993,forecasts1994

    Wewillforecast19942001

  • 7/28/2019 390 Lecture 6

    11/66

    TransactionVolume

  • 7/28/2019 390 Lecture 6

    12/66

    ExponentialTrend

    Tomodelthiswewilluseanexponentialtrend

    Theexponentialtrendislinearaftertaking

    (natural)logarithms

    Thisistypicallyestimatedbyalinearmodelaftertakinglogsofthevariabletoforecast

    tTimet eT 10 +=

    ( ) tt TimeT 10ln +=

  • 7/28/2019 390 Lecture 6

    13/66

    Ln(Volume)

    Inlogarithms,trendisroughlylinear.

  • 7/28/2019 390 Lecture 6

    14/66

    ExponentialTrends

    Mosteconomicserieswhicharegrowing

    (aggregateoutput,suchasGDP,investment,consumption)areexponentiallyincreasing

    Percentagechangesarestableinthelongrun

    Theseseriescannotbefitbyalineartrend

    Wecanfitalineartrendtotheir(natural)

    logarithm

  • 7/28/2019 390 Lecture 6

    15/66

    LinearModels

    Thelinearandquadratictrendsarebothlinear

    regressionmodelsoftheform

    or

    where x1t=Timet

    x2t=Timet2

    ttt xx 22110 ++=

    tt x110 +=

  • 7/28/2019 390 Lecture 6

    16/66

    Example4

    RealGDP FromBEA

    Quarterly,19472009

    Wewillestimateon19471990,forecast1991

    2009 Alsouseanexponentialtrend

  • 7/28/2019 390 Lecture 6

    17/66

    RealGDP

  • 7/28/2019 390 Lecture 6

    18/66

    Ln(RealGDP)

  • 7/28/2019 390 Lecture 6

    19/66

    LinearForecasting

    Thegoalistoforecastfutureobservations

    givenalinearfunctionofobservables Inthecaseoftrendestimation,these

    observablesarefunctionsofthetimeindex

    Inothercases,theywillbeotherfunctionsofthedata

    Inthemodeltheforecastfor yt+h is t+h=b0+b1xt where b0and b1 areestimates

    tt x10 +=

  • 7/28/2019 390 Lecture 6

    20/66

    Estimation

    Howshouldweselect b0 and b1 ?

    Thegoalistoproduceaforecastwithlowmeansquareerror(MSE)

    Thebestlinearforecastisthelinearfunction

    0+1xt thatminimizestheMSE

    WedonotknowtheMSE,butwecanestimateitbyasampleaverage

    ( ) ( )2102

    thththt xyEyyE = +++

  • 7/28/2019 390 Lecture 6

    21/66

    SumofSquaredErrors

    Sampleestimateofmeansquareerroristhesumofsquarederrors

    Thebestlinearforecastisthelinearfunction 0+1xtthatminimizestheMSE,orexpectedsumofsquarederrors.

    Oursampleestimateofthebestlinearforecastisthe

    linearfunctionwhichminimizesthe(sample)sumofsquarederrors.

    Thisiscalledtheleastsquaresestimator

    ( ) ( )=

    +=

    n

    tthtn xy

    nS

    1

    2

    10101,

  • 7/28/2019 390 Lecture 6

    22/66

    LeastSquares

    Theleastsquaresestimates(b0,b1)arethe

    valueswhichminimizethesumofsquarederrors

    Thisproducesestimatesofthebestlinear

    predictor thelinearfunction 0+1xt that

    minimizestheMSE

    ( ) ( )=

    +=

    n

    tthtn xy

    nS

    1

    2

    1010

    1,

  • 7/28/2019 390 Lecture 6

    23/66

    MultipleRegressors

    Therearemultipleregressors

    Forexample,thequadratictrend

    Thebestlinearpredictoristhelinearfunction

    0+1x1t+2x2t thatminimizestheMSE

    2

    210 ttt TimeTimeT ++=

    ttt xx 22110 ++=

    ( ) ( )2221102

    tthththt xxyEyyE = +++

  • 7/28/2019 390 Lecture 6

    24/66

    MultipleRegression

    Thesampleestimateofthebestlinear

    predictorarethevalues(b0,b1,b2)whichminimizethesumofsquarederrors

    InSTATA,usetheregress command

    ( ) ( )=

    + =

    n

    ttthtn xxynS 1

    2

    22110210

    1,,

  • 7/28/2019 390 Lecture 6

    25/66

    Example1

    WomensLaborForceParticipationRate

  • 7/28/2019 390 Lecture 6

    26/66

    RegressionEstimation

  • 7/28/2019 390 Lecture 6

    27/66

    InSampleFit

  • 7/28/2019 390 Lecture 6

    28/66

    Residuals

    Residualsaredifferencebetweendataand

    fittedregressionline

    tht

    thtt

    Timebby

    Tye

    10

    =

    =

    +

    +

  • 7/28/2019 390 Lecture 6

    29/66

    ResidualPlot

  • 7/28/2019 390 Lecture 6

    30/66

    InSampleFit

    Computewithpredict command

    Fitlooksgood

  • 7/28/2019 390 Lecture 6

    31/66

    Forecast

    Forecastisthelinearfunctionwithestimated

    coefficients

    Computewithpredict command

    hThT TimebbT ++ += 10

  • 7/28/2019 390 Lecture 6

    32/66

    ForecastIntervals

    Computeresiduals

    Computequantiles ofresiduals

    Theseareconstantovertime

    Addtopredictedvalues

    Identicaltoconstantmeancase

    tht

    thtt

    Timebby

    ye

    10

    =

    =

    +

    +

  • 7/28/2019 390 Lecture 6

    33/66

    OutofSampleForecast

    Outofsamplepredictionmightbetoolow.

  • 7/28/2019 390 Lecture 6

    34/66

    OutofSample

    WomensLaborForceParticipation

    No:Predictionwaswaytoohigh!

  • 7/28/2019 390 Lecture 6

    35/66

    MensLaborForceParticipationRate

  • 7/28/2019 390 Lecture 6

    36/66

    Estimation

  • 7/28/2019 390 Lecture 6

    37/66

    InSampleFit

  • 7/28/2019 390 Lecture 6

    38/66

    Residuals

  • 7/28/2019 390 Lecture 6

    39/66

    Forecast

    EndofSamplelooksworrying

  • 7/28/2019 390 Lecture 6

    40/66

    OutofSample

    MensLaborForceParticipation

    LinearTrendTerrible

  • 7/28/2019 390 Lecture 6

    41/66

    Example2

    RetailSales

  • 7/28/2019 390 Lecture 6

    42/66

    LinearandQuadraticTrend

  • 7/28/2019 390 Lecture 6

    43/66

    LinearandQuadraticTrend

  • 7/28/2019 390 Lecture 6

    44/66

    Forecast

  • 7/28/2019 390 Lecture 6

    45/66

    Residuals

  • 7/28/2019 390 Lecture 6

    46/66

    ActualValues

  • 7/28/2019 390 Lecture 6

    47/66

    Example3:Volume

  • 7/28/2019 390 Lecture 6

    48/66

    EstimatingLogarithmicTrend

  • 7/28/2019 390 Lecture 6

    49/66

    FittedTrend

  • 7/28/2019 390 Lecture 6

    50/66

    Residuals

  • 7/28/2019 390 Lecture 6

    51/66

    Forecast

  • 7/28/2019 390 Lecture 6

    52/66

    OutofSample

  • 7/28/2019 390 Lecture 6

    53/66

    ForecastingLevelsfromaForecastofLogs

    Let Yt beaseriesandyt=ln(Yt)itslogarithm

    Supposetheforecastforthelogisalineartrend:E(yt+h | t)=Tt= 0+ 1 Timet

    Thenaforecastfor Yt is exp(Tt)

    If[LT ,UT]isaforecastintervalfor yT+h Then[exp(LT),exp(UT)] isaforecastintervalforYT+h

    Inotherwords,justtakeyourpointandintervalforecasts,andapplytheexponentialfunction. InSTATA,usegenerate command

  • 7/28/2019 390 Lecture 6

    54/66

    ForecastinLevels

  • 7/28/2019 390 Lecture 6

    55/66

    OutofSample

  • 7/28/2019 390 Lecture 6

    56/66

    Example4:RealGDP

  • 7/28/2019 390 Lecture 6

    57/66

    Ln(RealGDP)

  • 7/28/2019 390 Lecture 6

    58/66

    Estimation

  • 7/28/2019 390 Lecture 6

    59/66

    FittedTrend

  • 7/28/2019 390 Lecture 6

    60/66

    Residuals

  • 7/28/2019 390 Lecture 6

    61/66

    Forecastofln(RGDP)

  • 7/28/2019 390 Lecture 6

    62/66

    ForecastofRGDP(inlevels)

  • 7/28/2019 390 Lecture 6

    63/66

    OutofSample

  • 7/28/2019 390 Lecture 6

    64/66

    ProblemswithTrendForecasts

    Trendforecastsunderstateuncertainty Actualuncertaintyincreasesatlongforecast

    horizons.

    Shorttermtrendforecastscanbequitepoorunlesstrendlinedupcorrectly

    Longtermtrendforecastsaretypicallyquitepoor,astrendschangeoverlongtimeperiods

    Itispreferredtoworkwithgrowthrates,andreconstructlevelsfromforecastedgrowthrates(moreonthislater).

  • 7/28/2019 390 Lecture 6

    65/66

    TrendModels

    IhopeIveconvincedyoutobeskepticalof

    trendbasedforecasting. Theproblemisthatthereisnoeconomic

    theoryforconstanttrends,andchangesin

    thetrendfunctionarenotapparentbefore

    theyoccur.

    Itisbettertoforecastgrowthrates,andbuildlevelsfromgrowth.

    Final Trend Forecast

  • 7/28/2019 390 Lecture 6

    66/66

    FinalTrendForecast

    WorldRecord 100metersprint