8
Preface and acknowledgements It is quite possible that what looked like a good match to the eye would not seem at all a good match when subjected to strict analysis. [Yule (1926, p. 26)]. Macroeconomics is about answering questions like: What will the inflation rate be the coming quarters? What explains economic cycles where booms are followed by busts? Do output and consumer prices fall if the interest rate is increased? Have all recessions been preceded by an increase in the price of crude oil? The goal of this book is to give an intuitive yet formal understanding of the basic techniques used in applied econometrics to answer questions like these. The focus is on time series econometrics with applications in macroeconomics and international finance. Throughout the book we will cover univariate and multivariate models of stationary and nonstationary time series, including structural vector autoregression (SVAR) models and instrument variable (IV) methods. Much focus is also devoted to the topic of macro- economic forecasting, using both univariate and multivariate models. The book is designed primarily for use in courses given to master students in econometrics with special emphasis on time series. However, the first parts of the book emphasising univariate methods can be used in courses given to final year under- graduates, while the parts covering forecasting and multivariate models can be used as a supplement to a reference book used in courses given to first year PhD students. We do not intend this book to be a complete reference. For more rigorous treatment of many of the topics discussed we refer the reader to Hamilton (1994) and Lutkepohl (2005). One of the guiding principles of this book is operationality, and we have emphasized ready access to the computer programs used in its preparation. The MATLAB codes, data files and descriptions are available from the website developed for this book: http://home.bi.no/a1010297/timeseries. If the link does not work, please contact one of the authors.

Applied time series for macroeconomics

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Applied time series for macroeconomics

Preface and acknowledgements

It is quite possible that what looked like a good match to the eye

would not seem at all a good match when subjected to strict analysis.

[Yule (1926, p. 26)].

Macroeconomics is about answering questions like:

� What will the inflation rate be the coming quarters?

� What explains economic cycles where booms are followed by busts?

� Do output and consumer prices fall if the interest rate is increased?

� Have all recessions been preceded by an increase in the price of crude oil?

The goal of this book is to give an intuitive yet formal understanding of the basic

techniques used in applied econometrics to answer questions like these. The focus is on

time series econometrics with applications in macroeconomics and international finance.

Throughout the book we will cover univariate and multivariate models of stationary and

nonstationary time series, including structural vector autoregression (SVAR) models and

instrument variable (IV) methods. Much focus is also devoted to the topic of macro-

economic forecasting, using both univariate and multivariate models.

The book is designed primarily for use in courses given to master students in

econometrics with special emphasis on time series. However, the first parts of the book

emphasising univariate methods can be used in courses given to final year under-

graduates, while the parts covering forecasting and multivariate models can be used as a

supplement to a reference book used in courses given to first year PhD students. We do

not intend this book to be a complete reference. For more rigorous treatment of many of

the topics discussed we refer the reader to Hamilton (1994) and Lutkepohl (2005).

One of the guiding principles of this book is operationality, and we have emphasized

ready access to the computer programs used in its preparation. The MATLAB codes,

data files and descriptions are available from the website developed for this book:

http://home.bi.no/a1010297/timeseries. If the link does not work, please contact one of

the authors.

Page 2: Applied time series for macroeconomics

The framework of the book grew out of lecture notes developed by Hilde C. Bjørnland

for master and PhD courses in applied time series econometrics at the University of Oslo

and BI Norwegian Business School. We thank in particular Ida Wolden Bache for

contributing actively to the development of these courses at an early stage.

Our work has benefited from comments by many friends and colleagues. Our grateful

thanks go to Knut Are Aastveit, Drago Bergholt, Eleonora Granziera, Steffen Grønne-

berg, Anne Sofie Jore and Bjørn Naug for having commented constructively on our work.

We would also like to thank Q. Farooq Akram for sharing his data.

We owe much to the present and past nowcasting teams of Norges Bank.1 Special

thanks to Francesco Ravazzolo, Christie Smith and Shaun Vahey for influencing and

shaping our perception of how forecasting should be done.

We have also benefited from comments by many students, especially those attending

the Master programme at the BI Norwegian Business School. Special thanks to Stefanie

Fernandez for comments on an earlier draft and to Stein-Erik Hjørring for invaluable

editorial help in the final stage.

Plan of the bookThroughout the course of this book we will present the necessary tools to study economic

time series. The book is organized as follows. The first part of this book deals with

stationary univariate time series. We start by reviewing some of the basic concepts and

definitions used in statistical analysis in Chapter 1.

In particular we review the concept of random numbers, differences between a

population and a sample, and finally the ordinary least squares estimator (OLS). Chapters

2–3 provide us with the necessary tools to describe and forecast stationary time series.

Most data in macroeconomics and finance can be described as time series: a set of

repeated observations over time of the same variable, such as consumer prices, gross

domestic product (GDP), stock prices, exchange rates, etc. Accordingly, to be able to

understand macroeconomic fluctuations and financial markets we need to learn about the

basic definitions and tools used for univariate time series analysis. An important area

of application for time series data and models is forecasting. To be able to predict or

forecast the future with a reasonable degree of accuracy is fundamental, as most decisions

taken today are based on what we think will happen in the future. We therefore devote

much emphasis on macroeconomic forecasting.

Following the analysis of stationarity, Chapters 4 and 5 introduce nonstationary time

series so that we can analyse the trend in the data and the fluctuations around the trend

(i.e., the business cycles). We will present and compare several detrending methods used

to extract the business cycle, including the popular band-pass and Hodrick-Prescott filter.

1 The views expressed are those of the authors and do not necessarily reflect those of Norges Bank.

8 PREFACE AND ACKNOWLEDGEMENTS

Page 3: Applied time series for macroeconomics

The final four chapters in this book deal with multivariate methods to study co-

movement among variables. Many of the concepts discussed there will be multivariate

extensions of the tools and concepts introduced in Chapter 2. However, some are new and

relate only to multivariate models, like the discussion of simultaneity and the

identification of structural shocks.

We start by introducing the concept of simultaneity in Chapter 6 and illustrate the

usefulness of instrumental variable (IV) regression for dealing with this problem. In

Chapter 7 we introduce vector autoregressive (VAR) models, which is used throughout

the final three chapters. We first discuss stability properties and show how one can derive

the moving average representation of the VAR. Then we discuss issues related to speci-

fication, estimation and forecasting of the VAR, and finally we introduce an important

concept called Granger causality. Chapter 8 is the main chapter on vector autoregression

techniques where we deal with the simultaneity problem first introduced in Chapter 6.

We show how various methods can be used to identify the structural vector autoregressive

(SVAR) model, and discuss how one can construct and interpret structural shocks. Key is

the study of impulse responses and variance decompositions. Chapter 9 concludes the

book with conditions and methods that permit us to work with nonstationary data in a

multivariate setting directly. Such conditions are commonly referred to as cointegration.

PREFACE AND ACKNOWLEDGEMENTS 9

Page 4: Applied time series for macroeconomics
Page 5: Applied time series for macroeconomics

ContentsPreface and acknowledgements 7

Plan of the book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1 Introduction 19

1.1 Random variables - some preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.1.1 Population moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

1.1.2 Sample moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1.1.3 A brief review of probability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

1.2 Ordinary least squares and assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . 25

1.3 Monte Carlo simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

1.3.1 Bias variance trade-off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Appendices

1.A The bootstrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

2 Time series 41

2.1 Fundamentals of time series. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

2.1.1 White noise, difference equations and lag operators . . . . . . . . . . . . 46

2.1.2 Conditional and unconditional moments . . . . . . . . . . . . . . . . . . . . 50

2.1.3 Stationarity, autocorrelation function and ergodicity . . . . . . . . . . . . 52

2.1.4 Multipliers and impulse responses . . . . . . . . . . . . . . . . . . . . . . . . . 53

2.2 Moving average (MA) processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

2.2.1 Higher order MA processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

2.3 Autoregressive (AR) processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

2.3.1 Higher order AR processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

2.3.2 Autoregressive moving average (ARMA) processes . . . . . . . . . . . . 64

2.4 Estimation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

2.4.1 OLS and AR models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

2.4.2 Lag selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

2.4.3 Structural breaks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

2.5 An example: GDP and inflation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Appendices

2.A Simulating time series data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Page 6: Applied time series for macroeconomics

3 Forecasting 77

3.1 Forecasting with autoregressive processes . . . . . . . . . . . . . . . . . . . . . . . . 78

3.1.1 Point forecast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

3.1.2 Optimal mean squared error prediction . . . . . . . . . . . . . . . . . . . . 80

3.1.3 Uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

3.2 Forecast evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

3.2.1 Bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

3.2.2 Root mean squared error (RMSE) . . . . . . . . . . . . . . . . . . . . . . . . 86

3.2.3 Comparing different forecasts . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

3.3 Forecasting experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

3.4 Model combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

3.4.1 Linear opinion pool and weights . . . . . . . . . . . . . . . . . . . . . . . . . 94

3.4.2 Diversification gains in theory. . . . . . . . . . . . . . . . . . . . . . . . . . . 94

3.4.3 Diversification gains in practice . . . . . . . . . . . . . . . . . . . . . . . . . 97

3.5 Forecasting with other time series models . . . . . . . . . . . . . . . . . . . . . . . 101

3.6 An example: Forecasting Norwegian GDP growth . . . . . . . . . . . . . . . . . 102

3.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Appendices

3.A Density forecasting and evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

3.A.1 Evaluating density forecasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

4 Nonstationarity 109

4.1 Deterministic trends. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

4.2 Stochastic trends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

4.2.1 Random walk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

4.2.2 Random walk with drift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

4.3 Implications of nonstationarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

4.4 Tests for unit root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

4.4.1 Augmented Dickey-Fuller (ADF) test . . . . . . . . . . . . . . . . . . . . . 116

4.4.2 Unit root versus structural break . . . . . . . . . . . . . . . . . . . . . . . . . 120

4.4.3 KPSS test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

4.5 Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

4.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

12 CONTENTS

Page 7: Applied time series for macroeconomics

5 Trend and Cycles 125

5.1 Statistical detrending methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

5.2 Deterministic trend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

5.3 Linear filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

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

5.3.2 Band pass filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

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

5.5 An example: Stylized facts of business cycles . . . . . . . . . . . . . . . . . . . . 140

5.6 Spurious cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

5.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Appendices

5.A Spectral analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

5.A.1 Linear filters - Implications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

6 Simultaneity 155

6.1 Simultaneous equation bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

6.2 Instrumental variable regression (IV) . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

6.2.1 Instrumental variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

6.2.2 Instrumental variables estimation. . . . . . . . . . . . . . . . . . . . . . . . . 163

6.3 Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

6.4 An example: Return to education . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

6.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

Appendices

6.A The general IV regression model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

7 Vector autoregression (VAR) 175

7.1 The VAR model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

7.1.1 The companion form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

7.1.2 Stability of VARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

7.1.3 Wold representation/decomposition theorem . . . . . . . . . . . . . . . . 179

7.2 Moving average representation of a VAR . . . . . . . . . . . . . . . . . . . . . . . . 180

7.3 Estimating a VAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

7.3.1 Choice of variables and lags . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

7.3.2 An example: A VAR model for GDP and unemployment . . . . . . . 187

7.4 VAR forecasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

7.4.1 Point forecast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

7.4.2 MSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

7.4.3 Uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

7.4.4 Forecast failure in macroeconomics. . . . . . . . . . . . . . . . . . . . . . . 192

7.5 Granger causality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

7.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

Appendices

7.A Short introduction to linear algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

CONTENTS 13

Page 8: Applied time series for macroeconomics

8 Structural vector autoregression (SVAR) 199

8.1 Identification – Cholesky decomposition . . . . . . . . . . . . . . . . . . . . . . . . 201

8.2 A structural VAR model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

8.2.1 From structural to reduced form VAR . . . . . . . . . . . . . . . . . . . . . 204

8.2.2 Identification of the structural model . . . . . . . . . . . . . . . . . . . . . . 205

8.3 The impulse response function (IRF) . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

8.3.1 Forecast error variance decomposition . . . . . . . . . . . . . . . . . . . . . 211

8.4 Two empirical examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

8.4.1 Effects of monetary policy shocks. . . . . . . . . . . . . . . . . . . . . . . . 213

8.4.2 Effects of oil price shocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

8.5 Alternative restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

8.5.1 Long-run restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

8.5.2 A special case of long-run restrictions. . . . . . . . . . . . . . . . . . . . . 224

8.5.3 Sign restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

8.6 An example: The exchange rate puzzle revisited. . . . . . . . . . . . . . . . . . . 227

8.7 Limitation of the VAR approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

8.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

9 Cointegration 235

9.1 Spurious regressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

9.2 Cointegration defined. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

9.3 Testing for cointegration – single equation . . . . . . . . . . . . . . . . . . . . . . . 241

9.3.1 Engle-Granger approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

9.3.2 An example: Consumption and income . . . . . . . . . . . . . . . . . . . . 243

9.4 Error Correction Model (ECM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

9.5 Cointegration in a multivariate setting . . . . . . . . . . . . . . . . . . . . . . . . . . 248

9.5.1 Vector error correction model (VECM) . . . . . . . . . . . . . . . . . . . . 249

9.5.2 Testing for cointegration – the Johansen approach . . . . . . . . . . . . 251

9.5.3 Identification of the cointegrating relations . . . . . . . . . . . . . . . . . 252

9.5.4 Cointegration and common trends . . . . . . . . . . . . . . . . . . . . . . . . 254

9.5.5 Weak exogeneity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

9.6 An example: Purchasing power parity (PPP). . . . . . . . . . . . . . . . . . . . . . 255

9.7 Final comments: VAR in levels or differences . . . . . . . . . . . . . . . . . . . . 259

9.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

Index 263

Bibliography 267

14 CONTENTS