Applied time series for macroeconomics (second edition)

Page 1


Hilde C. Bjørnland

Appliedtimeseriesformacroeconomics

Appliedtimeseriesformacroeconomics

HildeC.BjørnlandLeifAndersThorsrud

# GyldendalNorskForlagAS2015 2.utgave,2.opplag2015

ISBN978-82-05-48089-6

Omslagsdesign:GyldendalAkademisk = HildeC.BjørnlandogLeifA.Thorsrud Layoutogsats:GammagrafiskAS(VegardBrekke)

Figurer:HildeC.BjørnlandogLeifA.Thorsrud Brødtekst:TimesRoman10,4pt/12,2dd

Papir:90gAmberGraphic

Trykk:Dimograf,Polen32015

Allehenvendelserombokenkanrettestil GyldendalAkademisk Postboks6730St.Olavsplass 0130Oslo

www.gyldendal.no/akademisk akademisk@gyldendal.no

Detma ˚ ikkekopieresfradennebokenistridmeda ˚ ndsverkloveneller avtaleromkopieringinnga ˚ ttmedKOPINOR,interesseorganfor rettighetshaveretila ˚ ndsverk.Kopieringistridmedlovelleravtalekan medføreerstatningsansvaroginndragning,ogkanstraffesmedbøter ellerfengsel.

AlleGyldendalsbøkererprodusertimiljøsertifisertetrykkerier. Se www.gyldendal.no/miljo

ToChristiane,EdvardandTrond

AinaandLars

Prefaceandacknowledgements

Macroeconomicsisaboutansweringquestionslike:

Whatwilltheinflationratebethecomingquarters?

Whatexplainseconomiccycleswhereboomsarefollowedbybusts?

Dooutputandconsumerpricesfalliftheinterestrateisincreased?

Haveallrecessionsbeenprecededbyanincreaseinthepriceofcrudeoil?

Thegoalofthisbookistogiveanintuitiveyetformalunderstandingofthebasictechniquesusedinappliedeconometricstoanswerquestionslikethese.Thefocusisontime serieseconometricswithapplicationsinmacroeconomicsandinternationalfinance. Throughoutthebookwewillcoverunivariateandmultivariatemodelsofstationaryand nonstationarytimeseries,includingstructuralvectorautoregression(SVAR)modelsand instrumentalvariable(IV)methods.Muchfocusisalsodevotedtothetopicofmacroeconomicforecasting,usingbothunivariateandmultivariatemodels.

Mostoftheeconometricmodelscoveredinthisbookcanbeestimatedusingordinary leastsquares.However,withvaryingdepth,wealsocovertheMaximumlikelihood estimatoranddifferentinstrumentalvariableestimatorslikeTwo-stageleastsquaredand GeneralizedMethodofMoments.

Thebookisdesignedprimarilyforuseintimeseriescoursesgiventomasterstudents ineconomicsandbusiness.However,thefirstpartsofthebookemphasisingunivariate methodscanbeusedincoursesgiventofinalyearunder-graduates,whiletheparts coveringforecastingandmultivariatemodelscanbeusedasasupplementtoareference bookusedincoursesgiventofirstyearPhDstudents.Wedonotintendthisbooktobea completereference.Formorerigoroustreatmentofmanyofthetopicsdiscussedwerefer thereadertoHamilton(1994)andLutkepohl(2005).

Oneoftheguidingprinciplesofthisbookisoperationality,andwehaveemphasized readyaccesstothecomputerprogramsusedinitspreparation.TheMATLABcodes, datafilesanddescriptionsareavailablefromthewebsitedevelopedforthisbook: http://www.timeseries.no.Ifthelinkdoesnotwork,pleasecontactoneoftheauthors.

TheframeworkofthebookgrewoutoflecturenotesdevelopedbyHildeC.Bjørnland formasterandPhDcoursesinappliedtimeserieseconometricsattheUniversityofOslo andBINorwegianBusinessSchool.WethankinparticularIdaWoldenBachefor contributingactivelytothedevelopmentofthesecoursesatanearlystage.

Ourworkhasbenefitedfromcommentsbymanyfriendsandcolleagues.Ourgrateful thanksgotoKnutAreAastveit,DragoBergholt,EleonoraGranziera,Steffen Grønneberg,AnneSofieJoreandBjørnNaugforhavingcommentedconstructivelyon ourwork.WewouldalsoliketothankQ.FarooqAkramforsharinghisdata.

WeowemuchtothepresentandpastnowcastingteamsofNorgesBank.1 Special thankstoFrancescoRavazzolo,ChristieSmithandShaunVaheyforinfluencingand shapingourperceptionofhowforecastingshouldbedone.

Wehavealsobenefitedfromcommentsbymanystudents,especiallythoseattending theMasterprogrammeattheBINorwegianBusinessSchool.SpecialthankstoStefanie FernandezforcommentsonanearlierdraftandtoStein-ErikHjørringforinvaluable editorialhelpinthefinalstage.

Planofthebook

Throughoutthecourseofthisbookwewillpresentthenecessarytoolstostudyeconomic timeseries,withampleapplicationstomacroeconomicsandfinance.Thebookis organizedasfollows.InChapter1westartbyreviewingsomeofthebasicconceptsand definitionsusedinstatisticalanalysis.Thatis,wereviewtheconceptofrandomnumbers, differencesbetweenapopulationandasample,andfinallytheordinaryleastsquares estimator(OLS).

Chapters2–5dealwithunivariatetimeseriesandmodels.Inparticular,Chapters2–3 provideuswiththenecessarytoolstodescribeandforecaststationarytimeseries.Most datainmacroeconomicsandfinancecanbedescribedastimeseries:asetofrepeated observationsovertimeofthesamevariable,suchasconsumerprices,grossdomestic product(GDP),stockprices,exchangerates,etc.Accordingly,tobeabletounderstand macroeconomicfluctuationsandfinancialmarketsweneedtolearnaboutthebasicdefinitionsandtoolsusedforunivariatetimeseriesanalysis.Animportantareaofapplication fortimeseriesdataandmodelsisforecasting.Tobeabletopredictorforecastthefuture withareasonabledegreeofaccuracyisfundamental,asmostdecisionstakentodayare basedonwhatwethinkwillhappeninthefuture.Wethereforedevotemuchemphasison macroeconomicforecasting.

Followingtheanalysisofstationarity,Chapters4and5introducenonstationarytime seriessothatwecananalysethetrendinthedataandthefluctuationsaroundthetrend (i.e.,thebusinesscycles).Wewillpresentandcompareseveraldetrendingmethodsused toextractthebusinesscycle,includingthepopularHodrick-Prescottandtheband-pass

1 TheviewsexpressedarethoseoftheauthorsanddonotnecessarilyreflectthoseofNorgesBank.

filter.Thelatterfilteroperatesonwhatisknownasthefrequencybandofatimeseries. Hence,thischapteralsodefinessomeofthebasicslinkingthetimedomaintothe frequencydomain.

Chapters6–9dealwithmultivariatemethodstostudyco-movementamongvariables. Manyoftheconceptsdiscussedtherewillbemultivariateextensionsofthetoolsand conceptsintroducedinChapter2.However,somearenewandrelateonlytomultivariate models,likethediscussionofsimultaneityandtheidentificationofstructuralshocks. WestartbyintroducingtheconceptofsimultaneityinChapter6andillustratethe usefulnessofinstrumentalvariable(IV)regressionfordealingwiththisproblem.TheIV andTwo-stageleastsquaresestimatorsaredescribed,andwealsogiveabriefintroductiontotheGeneralizedMethodofMoments(GMM)estimator.TheGMMmethod hasproventobeaveryefficientwaytoestimatetheparametersoftherationalexpectationmodelsthatarewidelyusedinmacroeconomics.

InChapter7weintroducevectorautoregressive(VAR)models,whichisusedthroughoutthenextthreechapters.Wefirstdiscussstabilitypropertiesandshowhowonecan derivethemovingaveragerepresentationoftheVAR.Thenwediscussissuesrelatedto specification,estimationandforecastingoftheVAR,andfinallyweintroduceanimportant conceptcalledGrangercausality.Chapter8isthemainchapteronvectorautoregression techniqueswherewedealwiththesimultaneityproblemfirstintroducedinChapter6. Weshowhowvariousmethodscanbeusedtoidentifythestructuralvectorautoregressive (SVAR)model,anddiscusshowonecanconstructandinterpretstructuralshocks,suchas monetarypolicy,aggregatedemandandsupplyshocks.Keyisthestudyofimpulse responsesandvariancedecompositions.

InChapter9weexplaintheconditionsandmethodsthatpermitustoworkwith nonstationarydatainamultivariatesettingdirectly.Suchconditionsarecommonlyreferred toascointegration.Weshowhowonecanusecointegrationasacommontoolforthe analysisoflong-runrelationshipsbetweenmacroeconomictimeseries.Asanexampleof apotentialcointegrationrelationshipderivedfromeconomictheory,wediscussthe theoryofpurchasingpowerparity.

Thefinalchapterofthebook,Chapter10,introducesandexplainstheso-calledstatespacerepresentation,theKalmanFilter,andhowtoestimatestate-spacemodelsusing Maximumlikelihoodtechniques.Togetherthestate-spacerepresentationandtheKalman Filtertoolsareusedinawidevarietyofsettingsintimeseriesanalysis.Theycanfor examplebeusedtoestimateunobservedeconomicvariables,likethetrendandthecycle, toestimatetheparametersoftimeseriesmodels,infermissingvalues,andforconditional forecasting.Assuch,thefilterappliestostationary,nonstationary,uni-andmultivariate modelsalike.

1.1.1Populationmoments ..................................23

1.1.2Samplemoments.....................................23

1.1.3Abriefreviewofprobability ............................26

1.2Ordinaryleastsquaresandassumptions..........................27

1.3MonteCarlosimulations .....................................36

1.3.1Biasvariancetrade-off................................39

Appendices

2.1Fundamentalsoftimeseries..................................48

2.1.1Whitenoise,differenceequationsandlagoperators...........48

2.1.2Conditionalandunconditionalmoments ....................52

2.1.3Stationarity,autocorrelationfunctionandergodicity...........54

2.1.4Multipliersandimpulseresponses........................55

2.2Movingaverage(MA)processes...............................56

2.2.1HigherorderMAprocesses .............................58

2.3Autoregressive(AR)processes................................59

2.3.1HigherorderARprocesses .............................64

2.3.2Autoregressivemovingaverage(ARMA)processes...........66 2.4Estimation...............................................67

2.4.1OLSandARmodels..................................67

2.4.2Lagselection.......................................68

2.4.3Structuralbreaks.....................................70

2.5Anexample:GDPandinflation...............................70

2.6Summary................................................76

Appendices

2.ASimulatingtimeseriesdata...................................77

3.1Forecastingwithautoregressiveprocesses .......................80

3.1.1Pointforecast......................................81

3.1.2Optimalmeansquarederrorprediction...................82

3.1.3Uncertainty........................................84

3.2Forecastevaluation........................................87

3.2.1Bias.............................................88

3.2.2Rootmeansquarederror(RMSE) .......................88

3.2.3Comparingdifferentforecasts..........................91

3.3Forecastingexperiment.....................................92

3.4Modelcombination ........................................95

3.4.1Linearopinionpoolandweights........................96

3.4.2Diversificationgainsintheory..........................96

3.4.3Diversificationgainsinpractice.........................99

3.5Forecastingwithothertimeseriesmodels.......................103

3.6Anexample:ForecastingNorwegianGDPgrowth.................104

3.7Summary...............................................107 Appendices

3.ADensityforecastingandevaluation............................108

3.A.1Evaluatingdensityforecasts. ...........................108

4Nonstationarity111

4.1Deterministictrends.......................................113

4.2Stochastictrends. .........................................114

4.2.1Randomwalk......................................114

4.2.2Randomwalkwithdrift..............................116

4.3Implicationsofnonstationarity...............................117

4.4Testsforunitroot.........................................118

4.4.1AugmentedDickey-Fuller(ADF)test....................118

4.4.2Unitrootversusstructuralbreak........................122

4.4.3KPSStest.........................................123

4.5Persistence..............................................124

4.6Summary...............................................127

5TrendandCycles129

5.1Statisticaldetrendingmethods................................132

5.2Deterministictrend........................................133

5.3Linearfilters............................................134

5.3.1Hodrick-Prescott(HP)filter............................135

5.3.2Bandpassfilters....................................137

5.4Beveridge-Nelson(BN)Decomposition.........................140

5.5Anexample:Stylizedfactsofbusinesscycles....................144

5.6Spuriouscycles..........................................149

5.7Summary...............................................150

Appendices

5.ASpectralanalysis..........................................151

5.A.1Linearfilters-Implications............................156

6Simultaneity159

6.1Simultaneousequationbias..................................160

6.2Instrumentalvariableregression(IV)...........................163

6.2.1Instrumentalvariables................................163

6.2.2Instrumentalvariablesestimators........................166

6.2.3ThegeneralIVregressionmodel........................169

6.3Identification............................................170

6.4GeneralizedMethodofMoments(GMM).......................173

6.4.1MethodofMoments:Intuition ..........................174

6.4.2GeneralizedMethodofMomentsEstimator................174

6.4.3GMMandOLSestimator.............................177

6.4.4GMMandIVestimator...............................177

6.4.5Anexample:TheConsumption-BasedAssetPricingModel....178

6.4.6Anexample:TheNewKeynesianPhillipsCurve............181

6.5Summary...............................................183

Appendices

6.AEstimatingthegeneralIVregressionmodel......................184

6.A.1Weakinstrumentsreconsidered.........................185

6.A.2Overidentificationtest................................185

6.BAnexample–Returntoeducation............................186

7Vectorautoregression(VAR)189

7.1TheVARmodel..........................................190

7.1.1Thecompanionform.................................191

7.1.2StabilityofVARs...................................192

7.1.3Woldrepresentation/decompositiontheorem................193

7.2MovingaveragerepresentationofaVAR.......................194

7.3EstimatingaVAR........................................199

7.3.1Choiceofvariablesandlags...........................200

7.3.2Anexample:AVARmodelforGDPandunemployment......201

7.4VARforecasts...........................................203

7.4.1Pointforecast......................................203

7.4.2MSE. ............................................204

7.4.3Uncertainty........................................205

7.4.4Forecastfailureinmacroeconomics......................206

7.5Grangercausality.........................................206

7.6Summary...............................................209

Appendices

7.AShortintroductiontolinearalgebra............................210

8Structuralvectorautoregression(SVAR)213

8.1Identification–Choleskydecomposition........................215

8.2AstructuralVARmodel ....................................217

8.2.1FromstructuraltoreducedformVAR ....................218

8.2.2Identificationofthestructuralmodel.....................219

8.3Theimpulseresponsefunction(IRF)...........................222

8.3.1Forecasterrorvariancedecomposition....................225

8.4Twoempiricalexamples....................................227

8.4.1Effectsofmonetarypolicyshocks.......................227

8.4.2Effectsofoilpriceshocks.............................232

8.5Alternativerestrictions .....................................234

8.5.1Long-runrestrictions.................................235

8.5.2Aspecialcaseoflong-runrestrictions ....................238

8.5.3Signrestrictions....................................239

8.6Anexample:Theexchangeratepuzzlerevisited ..................241

8.7LimitationoftheVARapproach ..............................245

8.8Summary...............................................247

9Cointegration249

9.1Spuriousregressions.......................................250

9.2Cointegrationdefined......................................254

9.3Testingforcointegration–singleequation......................255

9.3.1Engle-Grangerapproach..............................255

9.3.2Anexample:Consumptionandincome ...................257

9.4ErrorCorrectionModel(ECM)...............................259

9.5Cointegrationinamultivariatesetting ..........................262

9.5.1Vectorerrorcorrectionmodel(VECM) ...................263

9.5.2Testingforcointegration–theJohansenapproach...........265

9.5.3Identificationofthecointegratingrelations. ................266

9.5.4Cointegrationandcommontrends .......................268

9.5.5Weakexogeneity....................................269

9.6Anexample:Purchasingpowerparity(PPP).....................269

9.7Finalcomments:VARinlevelsordifferences....................273

9.8Summary...............................................275

10State-SpaceModelsandtheKalmanFilter277

10.1State-spacerepresentations..................................278

10.1.1AR-modelsinstate-space .............................279

10.1.2VARsinstate-space.................................280

10.1.3ARMAinstate-space ................................282

10.1.4Unobservedcomponentsmodelinstate-space..............284

10.2TheKalmanFilter........................................285

10.2.1Prediction.........................................286

10.2.2Updating.........................................287

10.2.3Smoothing........................................288

10.2.4Missingvalues,forecastingandchoosingstartingvalues......288

10.2.5KalmanFiltersummary...............................290

10.3Filteringexamples........................................292 10.4Parameterestimation......................................294

10.4.1Maximumlikelihood(ML)............................294

10.4.2TheKalmanFilterandMLestimation....................295 10.5Applications.............................................297

10.5.1EstimatinganARMA(1,1).............................297

10.5.2Anunobservedcomponentsmodel(UC)..................299

10.5.3Otherapplications...................................302 10.6Summary...............................................303

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.