Date post: | 08-Aug-2018 |
Category: |
Documents |
Upload: | paban-raj-lohani |
View: | 224 times |
Download: | 0 times |
of 34
8/22/2019 time series components.pdf
1/34
TimeSeriesComponents
Recallthattheoptimalpointforecastofaseriesyt+h
isitsconditionalmean
Itisusefultodecomposethismeaninto
components
Tt=Trend St=Seasonal
Ct=Cycle
tttt CST ++=
( )thtt y = + |E
8/22/2019 time series components.pdf
2/34
Components
Trend Verylongterm(decades)
Smooth
Seasonal Patternswhichrepeatannually
Maybeconstantorvariable
Cycle Businesscycle
Correlationover27years Itisusefultoconsiderthecomponentsseparately
WestartwiththeTrend
8/22/2019 time series components.pdf
3/34
TrendForecasting
Apuretrendmodelhasnoseasonalorcycle
Inapuretrendmodel,theoptimalpointforecastfor yt+h ist=Tt.
Anactualforecastisanestimateof Tt.
tt T=
8/22/2019 time series components.pdf
4/34
ModelingTrend
Mosttrendmodelsareverysimple
Simplestpossibletrendisaconstant
Thismightseemoverlysimple,butisappropriateforstationary timeseries
Aseriesnotgrowingorchangingovertime Manyseriesreportedaspercentagechanges
0=tT
8/22/2019 time series components.pdf
5/34
U.S.PersonalConsumption(Quarterly)
MonthlyPercentageChange
8/22/2019 time series components.pdf
6/34
Estimation
If E(yt+h | t)=t=Tt=0 thentheoptimalforecast
isthemean 0 =E(yt+h) Theestimateof 0 isthesamplemean
Thisistheestimateoftheoptimalpointforecast
whent= 0 b0 isalsotheleastsquaresestimateinan
interceptonlymodel
=+
=T
tht
yT
b10
1
8/22/2019 time series components.pdf
7/34
InSTATA,usetheregress command
SeeSTATAHandoutonwebsite Samplemeanisestimatedconstant
Estimation
8/22/2019 time series components.pdf
8/34
FittedValues
Fittedvaluesarethesamplemean
InSTATAusethepredict command
Thiscreatesavariableypoffittedvalues
0 by tt ==
8/22/2019 time series components.pdf
9/34
Plotactualagainstfitted
8/22/2019 time series components.pdf
10/34
OutofSample
Pointforecastsarethesamplemean
InSTATA,usetsappend toexpandsample,and
predict togeneratepointforecasts.
0 by hT =+
8/22/2019 time series components.pdf
11/34
OutofSample
8/22/2019 time series components.pdf
12/34
ForecastErrors
Theforecasterror et isthedifference
betweentherealizedvalueandtheconditionalmean.
orequivalently
Wecall et theforecasterror.
thtt ye = +
ttht ey +=+
8/22/2019 time series components.pdf
13/34
Residuals
Theresidualsaretheinsamplefittederrors.
Thedifferencebetweentherealizedvalueandtheinsampleforecast.
Ingeneral,itisusefultoplottheresidualsagainsttime,toseeifanytimeseriespattern
remains.
0
by
yeht
thtt
==
+
+
8/22/2019 time series components.pdf
14/34
CalculateandPlotResiduals
8/22/2019 time series components.pdf
15/34
EstimationUncertainty
Thesamplemean
isanestimateof 0 =E(yt+h)
Theestimationerroris
=+=
T
thtyTb 10
1
( )
=
=+
=+
=
=
=
T
t
t
T
t
ht
T
t
ht
e
T
yT
yT
b
1
10
01
00
1
1
1
8/22/2019 time series components.pdf
16/34
EstimationVariance
Underclassicalconditions,
where 2=var(et) Thestandarderrorforb0 isanestimateofthe
standarddeviation
( )T
b2
0var
=
( )T
bsd2
0
=
8/22/2019 time series components.pdf
17/34
ForecastVariance
Whenthesamplemean b0 isusedasthe
forecastfor yT+h thenthepredictionerroris
whichisthesumoftheforecasterror eT+h andtheestimationuncertainty 0b0.
Theforecastvarianceis
000 beby hThT += ++
( ) ( ) ( )
2
22
000
11
varvarvar
+=
+=
+= ++
T
T
beby hThT
8/22/2019 time series components.pdf
18/34
StandardDeviationofForecast
Thestandarddeviationoftheforecastisthe
estimate
Thisisslightlylargerthantheregressionstandarddeviation
21
1
+=+T
s hT
8/22/2019 time series components.pdf
19/34
NormalForecastIntervals
LetT+h beaforecastforyT+h
Thepredictionerroris yT+h T+h Let sT+h bethest.deviationoftheforecast
Ifthepredictionerrorsarenormallydistributed,
the(1)%forecastintervalendpointsare
wherez/2 andz1/2arethe /2and1 /2quantiles ofthenormaldistribution
e.g. T+h1.64 sT+h fora90%interval
2/1
2/
+++
+++
+=
+=
zsyU
zsyL
hThThT
hThThT
8/22/2019 time series components.pdf
20/34
8/22/2019 time series components.pdf
21/34
DeficiencyofNormalIntervals
Thenormalforecastintervalisbasedonthe
assumption thatthepredictionerrorsarenormallydistributed.
Thisrequiresthattheconditionaldistributionof yT+h benormal,whichisrarelyvalid.
Instead,wecancomputeforecastintervals
basedontheempiricaldistributionofthe
forecastresiduals.
8/22/2019 time series components.pdf
22/34
Empircal ForecastIntervals
Lett+h befittedvaluesforyt+h withresiduals
Letq/2 andq1/2bethe /2and1 /2
quantiles oftheresiduals.
The(1)%forecastintervalendpointsare
2/1
2/
++
++
+=
+=
qyU
qyL
hThT
hThT
hthtt yye ++ =
8/22/2019 time series components.pdf
23/34
EmpiricalForecastIntervals
Thebasicmethodtoobtainforecastintervals
isthesameforanyregressionmodel
The(1)%forecastintervalendpointsare
where q/2 andq1/2arethe /2and1 /2
quantiles ofthedistributionof et
.
ttht ey +=+
2/1
2/
+
+
+=
+=
qU
qL
thT
ThT
8/22/2019 time series components.pdf
24/34
Quantiles
Thexth quantile ofasetofnumbersisthe
value qx suchthatx%aresmallerthanqxand(1x)%arelargerthan qx.
Youcanfindqx bysortingthedata. InSTATA,usetheqreg command
(forquantile regresion)
8/22/2019 time series components.pdf
25/34
8/22/2019 time series components.pdf
26/34
8/22/2019 time series components.pdf
27/34
OutofSample
8/22/2019 time series components.pdf
28/34
MeanShifts
Sometimesthemeanofaserieschangesover
time Itcandriftslowly,orchangequickly
Possiblyduetoapolicychange Inthiscase,forecastingbasedonaconstant
meanmodelcanbemisleading
8/22/2019 time series components.pdf
29/34
StateandLocalGovernmentSpending
PercentageGrowthRate(Quarterly) Averagefor19472009: 3.6%
Butthishasnotbeenthetypicalrateinrecentyears.
8/22/2019 time series components.pdf
30/34
Alternatives
Subsampleestimation Estimatethemeanonsubsamples
Forecastsarebasedonthemostrecent DummyVariableformulation
isthebreakdate Thedatewhenthemeanshifts
Thecoefficient 0 isthemeanbefore t=
Thecoefficient 1 istheshiftat t=
Thesum 0+1 isthemeanaftert=
( )
=
+=
td
d
t
tt
1
10
8/22/2019 time series components.pdf
31/34
Forecast
LinearRegression yt+h ondt Example
StateandLocalGovernmentPercentageGrowth
Meanbreaksin1970q1and2002q1
8/22/2019 time series components.pdf
32/34
Fitted
Outofsampleforecastfallsfrom3.6%to0.6%!
8/22/2019 time series components.pdf
33/34
ShouldyouuseMeanShifts?
Onlyaftergreathesitationandconsideration.
Shoulduseshiftsandbreaksreluctantlyandwithcare.
Doyouhaveamodelorexplanation?
Whatistheforecastingpowerofameanshift? Iftheyhavehappenedinthepast,willtherebemore
inthefuture?
Yet,iftherehasbeenanobviousshift,asimpleconstantmeanmodelwillforecastterribly.
8/22/2019 time series components.pdf
34/34
HowtoSelectBreakdates
Judgmental Datesofknownpolicyshifts
Importantevents
Economiccrises
Informaldatabased Visualinspection
Formaldatabased
Estimateregressionformanypossiblebreakdates Selectonewhichminimizessumofsquarederror
Thisistheleastsquaresbreakdate estimator