SOME BASICS OF TIME-SERIES ANALYSIS

Similar documents
BCT Lecture 3. Lukas Vacha.

Lecture 6a: Unit Root and ARIMA Models

FE570 Financial Markets and Trading. Stevens Institute of Technology

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis

Topic 4 Unit Roots. Gerald P. Dwyer. February Clemson University

Chapter 5: Models for Nonstationary Time Series

Univariate, Nonstationary Processes

Empirical Market Microstructure Analysis (EMMA)

Cointegration, Stationarity and Error Correction Models.

Non-Stationary Time Series and Unit Root Testing

Ch 5. Models for Nonstationary Time Series. Time Series Analysis

Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book; you are not tested on them.

Chapter 2: Unit Roots

Time Series Econometrics 4 Vijayamohanan Pillai N

Lecture 2: Univariate Time Series

Advanced Econometrics

Time Series I Time Domain Methods

Econometrics of Panel Data

Lecture 5: Unit Roots, Cointegration and Error Correction Models The Spurious Regression Problem

Forecasting using R. Rob J Hyndman. 2.4 Non-seasonal ARIMA models. Forecasting using R 1

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests

A TIME SERIES PARADOX: UNIT ROOT TESTS PERFORM POORLY WHEN DATA ARE COINTEGRATED

Stationarity Revisited, With a Twist. David G. Tucek Value Economics, LLC

Some Time-Series Models

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

Forecasting. Simon Shaw 2005/06 Semester II

5 Autoregressive-Moving-Average Modeling

Circle the single best answer for each multiple choice question. Your choice should be made clearly.

APPLIED ECONOMETRIC TIME SERIES 4TH EDITION

Review Session: Econometrics - CLEFIN (20192)

at least 50 and preferably 100 observations should be available to build a proper model

On Consistency of Tests for Stationarity in Autoregressive and Moving Average Models of Different Orders

Estimation and application of best ARIMA model for forecasting the uranium price.

Forecasting using R. Rob J Hyndman. 2.3 Stationarity and differencing. Forecasting using R 1

Nonstationary Time Series:

Time Series Methods. Sanjaya Desilva

13. Time Series Analysis: Asymptotics Weakly Dependent and Random Walk Process. Strict Exogeneity

Problem set 1 - Solutions

Ch 6. Model Specification. Time Series Analysis

Time Series Analysis. James D. Hamilton PRINCETON UNIVERSITY PRESS PRINCETON, NEW JERSEY

Non-Stationary Time Series and Unit Root Testing

1 Quantitative Techniques in Practice

Testing for non-stationarity

IS THE NORTH ATLANTIC OSCILLATION A RANDOM WALK? A COMMENT WITH FURTHER RESULTS

Forecasting: principles and practice 1

ARIMA Models. Jamie Monogan. January 16, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 16, / 27

White Noise Processes (Section 6.2)

Lectures 5 & 6: Hypothesis Testing

Test for Parameter Change in ARIMA Models

Chapter 6: Model Specification for Time Series

11/18/2008. So run regression in first differences to examine association. 18 November November November 2008

Questions and Answers on Unit Roots, Cointegration, VARs and VECMs

Analysis. Components of a Time Series

Økonomisk Kandidateksamen 2004 (II) Econometrics 2 June 14, 2004

Univariate linear models

Time Series Analysis. James D. Hamilton PRINCETON UNIVERSITY PRESS PRINCETON, NEW JERSEY

7. Integrated Processes

Trends and Unit Roots in Greek Real Money Supply, Real GDP and Nominal Interest Rate

Week 5 Quantitative Analysis of Financial Markets Characterizing Cycles

7. Integrated Processes

ARIMA Models. Jamie Monogan. January 25, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 25, / 38

EASTERN MEDITERRANEAN UNIVERSITY ECON 604, FALL 2007 DEPARTMENT OF ECONOMICS MEHMET BALCILAR ARIMA MODELS: IDENTIFICATION

Decision 411: Class 9. HW#3 issues

Simulating Properties of the Likelihood Ratio Test for a Unit Root in an Explosive Second Order Autoregression

Chapter 4: Models for Stationary Time Series

Statistical Methods for Forecasting

ECON 312 FINAL PROJECT

STAT 436 / Lecture 16: Key

Automatic seasonal auto regressive moving average models and unit root test detection

Asian Economic and Financial Review. SEASONAL ARIMA MODELLING OF NIGERIAN MONTHLY CRUDE OIL PRICES Ette Harrison Etuk

Non-Stationary Time Series and Unit Root Testing

9) Time series econometrics

FinQuiz Notes

Advanced Econometrics

Autoregressive and Moving-Average Models

Classic Time Series Analysis

n. Detection of Nonstationarity

10) Time series econometrics

7 Introduction to Time Series Time Series vs. Cross-Sectional Data Detrending Time Series... 15

1 Linear Difference Equations

Univariate ARIMA Models

ESSE Mid-Term Test 2017 Tuesday 17 October :30-09:45

Covers Chapter 10-12, some of 16, some of 18 in Wooldridge. Regression Analysis with Time Series Data

6 Unit root tests for stationarity. Tests for Stationarity: Dickey-Fuller tests. U/G Econometrics

1 Regression with Time Series Variables

MODELING INFLATION RATES IN NIGERIA: BOX-JENKINS APPROACH. I. U. Moffat and A. E. David Department of Mathematics & Statistics, University of Uyo, Uyo

CHAPTER 21: TIME SERIES ECONOMETRICS: SOME BASIC CONCEPTS

Introduction to Regression Analysis. Dr. Devlina Chatterjee 11 th August, 2017

Lecture 4a: ARMA Model

The Identification of ARIMA Models

Oil price volatility in the Philippines using generalized autoregressive conditional heteroscedasticity

Trending Models in the Data

Multivariate Time Series: VAR(p) Processes and Models

Dynamic Time Series Regression: A Panacea for Spurious Correlations

Stat 565. Spurious Regression. Charlotte Wickham. stat565.cwick.co.nz. Feb

7 Introduction to Time Series

Testing for Unit Roots with Cointegrated Data

Econometrics. Week 11. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague

Gaussian Copula Regression Application

DEPARTMENT OF ECONOMICS AND FINANCE COLLEGE OF BUSINESS AND ECONOMICS UNIVERSITY OF CANTERBURY CHRISTCHURCH, NEW ZEALAND

Transcription:

SOME BASICS OF TIME-SERIES ANALYSIS John E. Floyd University of Toronto December 8, 26 An excellent place to learn about time series analysis is from Walter Enders textbook. For a basic understanding of the subject one should read pages 2 to page 225. The purpose of this note is to introduce its readers to enough of the the basic principles to allow them to begin reading at page 2. Time Series Processes A time series is a series of numbers indexed by time that portrays the time path of some variable. It is often convenient to imagine that these numbers are generated by some mathematical process. For example the series y t might be generated by the equation y t = a y t + ɛ t. () This is a first order autoregressive process first order because there is only one lag of y t on the right-hand side and autoregressive because the y t are autocorrelated in the sense that the level of the variable in each period depends on its level in a previous period. The term ɛ t is a white noise process, defined as a series of drawings of a zero-mean, constant-variance non-autocorrelated random variable. Lagging () repeatedly, we obtain y t = a y t 2 + ɛ t y t 2 = a y t 3 + ɛ t 2 y t 3 = a y t 4 + ɛ t 3 = y = a y + ɛ. Walter Enders Applied Econometric Time Series, John Wiley and Sons, 995.

Repeated substitution then yields y t = a t y + ɛ t + a ɛ t + a 2 ɛ t 2 + a 3 ɛ t 3 + +a 4 ɛ t 4 + + a t ɛ (2) The time path of y t depends critically on the parameter a. If this parameter equals zero then y t = ɛ t. (3) and y t is itself a white noise process. The variance of y t will equal the variance of ɛ t which we will denote by σ 2. If a =, y t becomes (utilising () and (2)) y t = y t + ɛ t = ɛ t + ɛ t + ɛ t 2 + + ɛ + y. (4) The series is a random walk. It wanders without limit, with y t moving either up or down in each period relative to its previous value y t by some random amount ɛ t, as can be seen by rewriting () as y t y t = ɛ t. (5) The variance of y t will equal (σ 2 + σ 2 + σ 2 + ), 2 which will grow in proportion to the number of periods over which the variance is being calculated. In the case where a = the series is said to be non-stationary or have a unit root (the root of () equals a). Its expected level at any point in time is its current level and its variance in the limit is infinity. Its future path need never pass through the level at which it started or any other level previously achieved, although there is no reason why it could not return to these levels. When a > the series explodes, with the values of y t getting larger and larger with time. This can be seen from the fact that a t will get bigger and bigger as t increases when a >. If a is negative the series oscillates around zero, doing so explosively if a <. When < a < the series is stationary as can be seen from the fact that a t gets smaller in (2) as t increases. If the ɛ t are zero beyond some point, y t will approach zero as t increases, with the speed of approach being greater, the smaller is a. The effects of each ɛ t shock will thus dissipate with 2 This follows from the fact that Var{x + y} = Var{x} + Var{y} when x and y are uncorrelated variables.

time. The variance of y t will equal [ + (a) 2 + (a 2 ) 2 + (a 3 ) 2 + ] σ 2 which will be finite in the limit as t increases. In the case were a =.9, for example, this variance will equal 5.26σ 2 in the limit. 3 The series will vary around zero with a persistence that will be greater the greater is a. Several examples of non-stationary random-walk processes with a = are plotted in the top panel of Figure B. The middle panel plots a single random-walk process along with two stationary processes based on the same ɛ t series, having a =.9 and a =.5 respectively. Testing for Stationarity Tests for stationarity involve determining whether parameters like a in () are statistically significantly less than unity in absolute value. The standard procedure is to subtract y t from both sides of () to obtain y t y t = ( a) y t + ɛ t. = δ y t + ɛ t. (6) where δ = ( a) and then test whether δ is less than zero (which is the same as testing whether a < ). 4 This test involves simply running the least-squares regression indicated by (6) and examining the t-statistic of the coefficient of y t. The problem here, as you will note from reading Enders, is that under the null-hypothesis that δ = the estimator of δ is not distributed according to the t distribution. One must use the table of critical values constructed by David Dickey and Wayne Fuller instead of the standard t-tables. A major problem here is that the test procedure just outlined has poor ability statisticians use the term low power to detect stationarity when the true value of δ is negative and close to zero (a is less than but close to unity). It is easy to see why. When we test the null-hypothesis that δ equals zero we, in effect, use the Dickey-Fuller table to determine an appropriate critical value of ˆδ, the estimated value of δ. This critical value will be the relevant entry in the Dickey-Fuller table multiplied by the standard error of ˆδ. It will be some negative number ˆδ below which ˆδ has some small 3 Here we use the relationship in the previous footnote plus the facts that Var{a x} = a 2 Var{x} and + b + b 2 + b 3 + b 4 + = b, and then set b equal to a 2. 4 Note that the symbol δ reused here with a different meaning than in the main text. 2

5 RANDOM WALK SERIES 5-5 - -5 Series Series 2 Series 3 Series 4-2 2 3 4 5 6 7 8 9 5 FIRST ORDER AUTOREGRESSIVE PROCESSES 5-5 a =. a =.9 a =.5-2 3 4 5 6 7 8 9 All Series Based on Same White-Noise Shocks 3 SECOND ORDER MOVING-AVERAGE 2 - -2-3 MA2 Process Underlying White Noise Shocks -4 2 3 4 5 6 7 8 9 White-Noise Shocks Same as in AR Processes Figure : Random-walk, Autoregressive and Moving Average Processes: Some Examples. 3

probability, say.5, of lying if δ is really zero. So if δ in fact equals zero there is only a 5% chance that we will reject the null-hypothesis of nonstationarity and conclude that y t is stationary. This means that there is a 95% chance that we will conclude that y t is non-stationary. Now suppose that a equals.999999 so that the true value of δ is -.. This means that y t is in fact stationary. But application of the test will nevertheless lead us to conclude that it is non-stationary almost 95% of the time because ˆδ will still fall below ˆδ only very slightly more than 5% of the time. If a is.8 or.9 and the true value of δ is therefore -. or -.2, the estimate ˆδ will still lie above ˆδ a high percentage of the time leading us to conclude that y t is non-stationary when in fact it is stationary. So we run a small risk, 5% in the example above, of concluding that y t is stationary when it is not, and a very high risk of concluding that y t is non-stationary when it is stationary at true values of a not far below unity. These tests must therefore be viewed with caution. ARIMA Processes Equation () is a first-order autoregressive process. A second-order autoregressive process would be represented by y t = a y t + a 2 y t 2 + ɛ t, (7) with two lags of y t, and third and higher order processes can be similarly defined. Time series are not all autoregressive processes. They can be moving average processes. An example would be an equation generating y t of the form y t = b ɛ t + b ɛ t + b 2 ɛ t 2 (8) which is a second-order moving average process second-order because it contains two lagged error terms. A second-order moving average process with b =.4, b =.3, and b 2 =.3 is presented in the bottom panel of Figure B along with the ɛ t process used to generate it. This white-noise process is the same one that was used to generate the three autoregressive processes in the middle panel of Figure B. Time series can also be combined autoregressive and moving average (ARMA) processes. Consider the equation y t = a y t + a 2 y t 2 + b ɛ t + b ɛ t + b 2 ɛ t 2. (9) 4

This defines an ARMA(2,2) process a process that is second-order autoregressive and second-order moving average. In general, an ARMA(p, q) process has p autoregressive lags and q moving average lags. We can go a step further and assume that y t above is a stationary process that is actually the first difference of another series z t i.e., y t = z t z t and that the process z t is a non-stationary autoregressive-moving average process that has to be differenced once to produce the stationary ARMA(2,2) process. It is said to be integrated of order because it has to be differenced once to produce a stationary process. If it had to be differenced twice to produce a stationary process it would be integrated of order 2, and so forth. The process z t is thus an autoregressive-integrated-moving average ARIMA(2,,2) process differencing it once produces an ARMA(2,2). In general, an ARIMA(p, d, q) process is one whose d-th difference is a stationary autoregressive-moving average process with p autoregressive lags and q moving average lags. Autocorrelation and Partial Autocorrelation Functions The autocorrelation function of a time series process is the set of correlations between the t-th term and each of n (t-j)-th terms, where j =, 2, n. The autocorrelation function for any of the above processes consists of the set of correlations r{y t, y t } r{y t, y t 2 } r{y t, y t 3 } r{y t, y t 4 } r{y t, y t 5 } r{y t, y t 6 } r{y t, y t 7 } r{y t, y t 8 } where r{x, y} is the simple correlation coefficient between x and y and n is set equal to 8. One can calculate this autocorrelation function by creating eight lags of the data series y t, with each lag being a separate series, and then calculating the simple correlations of the y t series with each of the eight 5

lag-series. 5 The autocorrelation function can be plotted as a histogram as shown for the AR() process () in the top panel of Figure B2 and the MA(2) process (8) in the third panel from the top. Such plots are called correlograms. Consider the correlation between y t and y t 2 in the correlogram shown in the top panel of Figure B2. The question arises as to whether the high degree of observed correlation arises because the twice-lagged values are directly correlated with the original series, or because they are correlated with the once-lagged values which are directly correlated with the original series. We can answer this question by calculating the partial autocorrelation function. This can be done by running a single regression of y t on all n lags of y t and extracting the regression coefficients. 6 These coefficients give the partial correlation of each of the j lagged series with the original series, holding all the other lagged series constant. The partial correlogram for the AR() series in the top panel of Figure B2 is shown in the second panel from the top, and the partial correlogram for the MA(2) process in the third panel from the top is shown in the bottom panel. As we might expect, all the partial correlations for the AR() series beyond the first are nearly zero this occurs because a direct correlation only exists between the original series and its first lag, it being a first-order process. The second-lag series is correlated with the original series only because of its correlation with the first-lag series which is directly correlated with the original series. Time series econometricians use the autocorrelation and partial autocorrelation functions of a series, along with their correlograms, to try to figure out the numbers of autoregressive and moving average lags, p and q in the ARIMA(p, d, q) process generating it. They determine d by testing the series for stationarity. If the original series is stationary then d = and the process is integrated of order zero and is an ARMA(p, q) process. If the original series is non-stationary but its first difference is stationary then d = and the process is integrated of order one i.e., an ARIMA(p,, q). If the original series has to be differenced twice to produce a stationary series then it is ARIMA(p, 2, q), and so forth. Once d has been established, the correlograms are examined to attempt to determine appropriate values for p and q. 5 Most statistical computer programs do these calculations to an approximation in order to conserve computing resources. 6 Again, conventional computer packages perform these calculations to a convenient approximation. 6

AUTOCORRELATION FUNCTION: AR PROCESS WITH a =.9.95.9.85.8.75.7.65.6 2 4 6 8 2 Lag PARTIAL AUTOCORRELATION FUNCTION: AR PROCESS WITH a =.9.9.8.7.6.5.4.3.2. -. 2 4 6 8 2 Lag AUTOCORRELATION FUNCTION: MA2 PROCESS.8.7.6.5.4.3.2. -. -.2 2 4 6 8 2 Lag.8 PARTIAL AUTOCORRELATION FUNCTION: MA2 PROCESS.6.4.2 -.2 -.4 2 4 6 8 2 Lag Figure 2: Correlograms for Autoregressive and Moving Average Processes: Some Examples. 7