Академический Документы
Профессиональный Документы
Культура Документы
Itisusefultodecomposethismeaninto components t = Tt + St + Ct
Tt =Trend St=Seasonal Ct=Cycle
Components
Trend
Verylongterm(decades) Smooth
Seasonal
Patternswhichrepeatannually Maybeconstantorvariable
Cycle
Businesscycle Correlationover27years
Itisusefultoconsiderthecomponentsseparately WestartwiththeTrend
TrendForecasting
Apuretrendmodelhasnoseasonalorcycle
t = Tt
Inapuretrendmodel,theoptimalpoint forecastforyt+h is t=Tt . AnactualforecastisanestimateofTt .
ModelingTrend
Mosttrendmodelsareverysimple Simplestpossibletrendisaconstant
Tt = 0
Thismightseemoverlysimple,butis appropriateforstationary timeseries
Aseriesnotgrowingorchangingovertime Manyseriesreportedaspercentagechanges
U.S.PersonalConsumption(Quarterly) MonthlyPercentageChange
Estimation
IfE(yt+h | t)=t=Tt =0thentheoptimalforecast isthemean 0 =E(yt+h) Theestimateof0 isthesamplemean
1 T b0 = yt + h T t =1
Estimation
InSTATA,usetheregress command SeeSTATAHandout onwebsite Samplemeanisestimatedconstant
FittedValues
Fittedvaluesarethesamplemean
t = t = b0 y
InSTATAusethepredict command
Thiscreatesavariableypoffittedvalues
Plotactualagainstfitted
OutofSample
Pointforecastsarethesamplemean
T + h = b0 y
OutofSample
ForecastErrors
Theforecasterroret isthedifference betweentherealizedvalueandthe conditionalmean.
et = yt + h t
orequivalently
yt + h = t + et
Wecallet theforecasterror.
Residuals
Theresidualsaretheinsamplefittederrors. Thedifferencebetweentherealizedvalueand theinsampleforecast.
t = yt + h t e = yt + h b0
CalculateandPlotResiduals
EstimationUncertainty
Thesamplemean
1 T b0 = yt + h T t =1
EstimationVariance
Underclassicalconditions,
var(b0 ) =
2
T
ForecastVariance
Whenthesamplemeanb0 isusedasthe forecastforyT+h thenthepredictionerroris
yT + h b0 = eT + h + 0 b0
T 1 = 1 + 2 T
StandardDeviationofForecast
Thestandarddeviationoftheforecastisthe estimate 1
2 sT + h = 1 + T
Thisisslightlylargerthantheregression standarddeviation
NormalForecastIntervals
LetT+h beaforecastforyT+h ThepredictionerrorisyT+h T+h LetsT+h bethest.deviationoftheforecast Ifthepredictionerrorsarenormallydistributed, the(1)%forecastintervalendpointsare
T + h + sT + h z / 2 LT + h = y T + h + sT + h z1 / 2 UT +h = y
DeficiencyofNormalIntervals
Thenormalforecastintervalisbasedonthe assumption thatthepredictionerrorsare normallydistributed. Thisrequiresthattheconditionaldistribution ofyT+h benormal,whichisrarelyvalid. Instead,wecancomputeforecastintervals basedontheempiricaldistributionofthe forecastresiduals.
Empircal ForecastIntervals
Lett+h befittedvaluesforyt+h withresiduals
t = yt + h y t +h e
EmpiricalForecastIntervals
Thebasicmethodtoobtainforecastintervals isthesameforanyregressionmodel yt + h = t + et The(1)%forecastintervalendpointsare
LT + h = T + q / 2 U T + h = t + q1 / 2
Quantiles
Thexth quantile ofasetofnumbersisthe valueqx suchthatx%aresmallerthanqx and(1x)%arelargerthanqx. Youcanfindqx bysortingthedata. InSTATA,usetheqreg command
(forquantile regresion)
OutofSample
MeanShifts
Sometimesthemeanofaserieschangesover time Itcandriftslowly,orchangequickly
Possiblyduetoapolicychange
Inthiscase,forecastingbasedonaconstant meanmodelcanbemisleading
StateandLocalGovernmentSpending PercentageGrowthRate(Quarterly)
Averagefor19472009:3.6% Butthishasnotbeenthetypicalrateinrecentyears.
Alternatives
Subsampleestimation
Estimatethemeanonsubsamples Forecastsarebasedonthemostrecent
DummyVariableformulation
t = 0 + 1d t d t = 1(t )
isthebreakdate
Thedatewhenthemeanshifts Thecoefficient0 isthemeanbeforet= Thecoefficient1 istheshiftatt= Thesum0+1 isthemeanaftert=
Forecast
LinearRegressionyt+h ondt Example
StateandLocalGovernmentPercentageGrowth Meanbreaksin1970q1and2002q1
Fitted
Outofsampleforecastfallsfrom3.6%to0.6%!
ShouldyouuseMeanShifts?
Onlyaftergreathesitationandconsideration. Shoulduseshiftsandbreaksreluctantlyandwith care. Doyouhaveamodelorexplanation? Whatistheforecastingpowerofameanshift?
Iftheyhavehappenedinthepast,willtherebemore inthefuture?
Yet,iftherehasbeenanobviousshift,asimple constantmeanmodelwillforecastterribly.
HowtoSelectBreakdates
Judgmental
Datesofknownpolicyshifts Importantevents Economiccrises
Informaldatabased
Visualinspection
Formaldatabased
Estimateregressionformanypossiblebreakdates Selectonewhichminimizessumofsquarederror Thisistheleastsquaresbreakdate estimator