You are on page 1of 13

23/07/2012

Econometrics by Example (Gujarati)

Chapter 16

Economic Forecasting

L Vn Chn UEH, 2012

Chap 9-1

16.1 Forecasting with Regression Models


2

Consider the following consumption function: PCEt = 0 + 1PDIt + ut where PCE = per capita personal consumption expenditure, PDI = per capita personal disposable income in chained 2005 dollars. Table 16.1 contains data on the US for 1960-2008. We use the observations from 1960-2004 to estimate the function and save the last 4 observations to evaluate the estimated model. Plot the data and run the OLS regression. (16.1)

L Vn Chn UEH, 2012

23/07/2012

16.1 Forecasting with Regression Models


3

Estimated consumption function:

E = -1083.978 + 0.9537PDIt PC t
The estimated model looks good, although there is strong evidence of positive serial correlation in the error term because the DurbinWatson value is low. We subject the residuals to unit root tests and found there is no evidence of unit root. We can use this regression to forecast the future values of PCE, E | PDI . e.g. PC
2005 2005

L Vn Chn UEH, 2012

16.1 Forecasting with Regression Models


4

Some special terms used in forecasting: 1. Point forecasts and interval forecasts: in point forecasts, we provide a single value, whereas in interval forecasts, we obtain a range, or an interval. 2. Ex post and ex ante forecasts: in the ex post forecast period, we know the values of the regressand and regressors. In the ex ante forecast, we estimate the values of the regressand but we may not know the values of the regressors with certainty.

L Vn Chn UEH, 2012

23/07/2012

16.1 Forecasting with Regression Models


5

3. Conditional and unconditional forecasts: in conditional forecasts, we forecast the regressand conditional on the assumed values of the regressors, also called scenario analysis. In unconditional forecasts, we know the values of the regressors with certainty. Given per capita PDI for 2005 of $31,318 billions, the best mean predicted value of PCE for 2005 is:

E PC 2005 = -1083.978 + 0.9537*31,318 = 28783.998


The actual value of PCE for 2005 is $29,771 billion. The forecast error is $987 billion. need to estimate the forecast error.
L Vn Chn UEH, 2012

16.1 Forecasting with Regression Models


6

If the error term in (16.1) is normally distributed, letting Y = PCE and + X is normally distributed with mean ( X = PDI, then Y ) 2005 0 1 2005 and variance 2

) = 2 1 + ( X 2005 X ) var(Y 2005 2 n (Xi X ) 2 2 = u t2 /( n 2) . Since we do not know , we estimate it as


We can establish a 95% confidence interval for true E(Y2005):

- t/2se( Y ); Y )) (Y + t/2se( Y 2005 2005 2005 2005 ) is the standard error. where = 5%, and se( Y 2005
The 95% confidence interval for Y2005 is ($28,552 billion, $29,019 billion).
L Vn Chn UEH, 2012

23/07/2012

16.1 Forecasting with Regression Models


7

If we connect such confidence intervals, we obtain a confidence band. Run the regression and graph the forecasts. The variance (and the forecast error) increases as X value moves further away from its mean value. The table gives some measures of the quality of the forecast: root mean squared error, mean absolute error, mean absolute percent error, and Theil inequality coefficient. Theil inequality coefficient lies between 0 and 1. The closer it is to 0, the better is the model.

L Vn Chn UEH, 2012

16.1 Forecasting with Regression Models


8

The Durbin-Watson statistic suggests that the error term suffers from first-order positive serial correlation. If we take into account this serial correlation, the forecast error can be made smaller. Run the regression, assuming the error term follows AR(1). Compare with the previous results. Graph the forecasts. The confidence band is narrower.

L Vn Chn UEH, 2012

23/07/2012

16.2 Box-Jenkins method: ARIMA model


9

The BJ time series models allow Yt to be explained by the past, or lagged, values of Yt itself and the current and lagged values of white noise error term t. The BJ methodology is bases on the assumption that the time series under study, Yt, is stationary. Autoregressive (AR) model Consider the following model: Yt = B0 + B1Yt-1 + B2Yt-2 + + BpYt-p + t Model (16.6) is called an AR(p). The value of p is determined using some criterion such as AIC.
L Vn Chn UEH, 2012

(16.6)

16.2 Box-Jenkins method: ARIMA model


10

Moving average (MA) model Yt = C0 + C1t + C2t-1 + + Cq+1t-q (16.7) Yt is a weighted, or moving, average of the current and past white noise error terms. Model (16.7) is called the MA(q) model. Autoregressive moving average (ARMA) model We can combine the AR and MA models and form what is called the ARMA(p,q) model, with p autoregressive terms and q moving average terms.

L Vn Chn UEH, 2012

23/07/2012

16.2 Box-Jenkins method: ARIMA model


11

Autoregressive integrated moving average (ARIMA) model In an ARIMA(p,d,q) model, d denotes the number of times a time series has to be differenced to make it stationary. If a time series is already stationary, then an ARIMA(p,d,q) becomes an ARMA(p,q) model.

L Vn Chn UEH, 2012

16.2 Box-Jenkins method: ARIMA model


12

How to determine the appropriate model? 4 steps Step 1: Identification. Determine the appropriate values of p, d, and q by the correlogram and partial correlogram. Step 2: Estimation. Estimate the parameters of the chosen model. Step 3: Diagnostic checking. Check if the residuals from the fitted model are white noise. If they are, we can accept the chosen model. If they are not, we have to start afresh. BJ methodology is an iterative process. Step 4: Forecasting. Ultimate test lies in the models forecasting performance, within and outside the sample period.
L Vn Chn UEH, 2012

23/07/2012

16.3 ARMA model of IBM closing prices


13

Table 13.6 contains daily closing prices of IBM stock from 4 January 2000 to 20 August 2002. Log of IBM daily closing prices (LNCLOSE) were nonstationary, but the first differences of these prices (DLNCLOSE) were stationary. Consider the correlogram of DLNCLOSE up to 50 lags. The correlogram produces autocorrelation (AC) and partial autocorrelation (PAC). The ACF shows correlation of current DLNCLOSE with its values at various lags. The PACF shows the correlation between observations after controlling for the effects of intermediate lags.
L Vn Chn UEH, 2012

16.3 ARMA model of IBM closing prices


14

Table 16.5 Typical patterns of ACF and PACF Type of model AR(p) Typical pattern of ACF Typical pattern of PACF

Decays exponentially or with Significant spikes through damped sine wave pattern lags p or both Significant spikes through lags q Exponential decay Declines exponentially Exponential decay

MA(q) ARMA(p,q)

In the AR(p) case, the ACF declines exponentially but the PACF cuts off after p lags. The opposite happens to an MA(q) process.
L Vn Chn UEH, 2012

23/07/2012

16.3 ARMA model of IBM closing prices


15

Our example: neither AC nor PAC functions shows the neat pattern described in Table 16.5. Recall that the standard error of a correlation coefficient is

1 / n = 1 / 739 0.037
The 95% confidence interval is (-0.0725,0.0725). It seems that both ACF and PACF correlations at lags 4, 18, 22, 35, and 43 seem to be statistically significant.

L Vn Chn UEH, 2012

16.3 ARMA model of IBM closing prices


16

Since we do not have a neat pattern of the ACF and PACF, we can proceed by trial and error. First, suppose we fit an AR model at lags 4, 18, 22, 35, and 43. Eviews: ls DLNCLOSE c AR(4) AR(18) AR(22) AR(35) AR(43) Coefficients of AR(35) and AR(43) are not individually significant. Test the residuals for serial correlation. This model may be a candidate. Second, we estimate an AR model at lags 4, 18, and 22. The residuals seem to be randomly distributed. AIC and SIC suggest we choose this model.
L Vn Chn UEH, 2012

23/07/2012

16.3 ARMA model of IBM closing prices


17

Similarly, we estimate an MA model at lags 4, 18, 22, 35, and 43. And we end up with an MA model at lags 4, 18, and 22. Which model should we choose? AR(4,18,22) or MA(4,18,22)? AIC and SIC suggests the MA model. Can we develop an ARMA model? After some experimentation, we obtain the model ARMA[(4,22),(4,22)]. Test the residuals for unit root, and the Breusch-Godfrey test of autocorrelation. ARMA[(4,22),(4,22)] is probably an appropriate model.
L Vn Chn UEH, 2012

16.3 ARMA model of IBM closing prices


18

Forecasting with ARIMA In static forecasts, we use the actual current and lagged values of the forecast variable. In dynamic forecasts, after the first period forecast, we use the previously forecast values of the forecast variable. Do the static and dynamic forecasts in Eviews. Based on the Theil coefficient, the dynamic forecast does not do as well as the static forecast. If there is an error in the previously forecast value(s), that error will be carried forward.
L Vn Chn UEH, 2012

23/07/2012

16.4 VAR
19

VAR was developed by Sims (2011 Nobel Laureate). Bivariate VAR Consider a system of 2 variables, e.g. three and six-month T-bill rates (TB3 and TB6) in Table 14.8, in a VAR:

TB 3t = A1 + B jTB3t j + C jTB 6t j + u1t


j =1 p j =1 p

TB 6t = A2 + D jTB 3t j + E jTB 6 t j + u 2t
j =1 j =1

where us are white noise error terms, called impulses or innovations or shocks.
L Vn Chn UEH, 2012

16.4 VAR (cont.)


20

1) Each equation contains only its own lagged values and the lagged values of the other variables (no current values). 2)The number of lagged values of each variable can be different, but in most cases we use the same number. 3) The above system is called a VAR(p) model. 4) The above system can be extended to several variables. 5) If we consider several variables in the system with several lags for each variable, the system becomes quickly unwieldy. 6) In the above system, there can be at most 1 cointegrating relationship between 2 variables. In general, an n-variable VAR system can have at most (n 1) cointegrating relationships.
L Vn Chn UEH, 2012

10

23/07/2012

16.4 VAR (cont.)


21

Use Johansens methodology (not mentioned) to know the number of cointegrating relationships among n variables. We will choose the number of lagged terms on the basis of AIC or SIC. A critical requirement of VAR is that the time series under consideration are stationary. Three possibilities: 1) Both TB3 and TB6 time series are I(0), estimate by OLS. 2) Both TB3 and TB6 time series are I(1), take the first differences and estimate by OLS.

L Vn Chn UEH, 2012

16.4 VAR (cont.)


22

3) If the 2 series are I(1), but cointegrated, then we have to use the vector error correction model (VECM): Step 1: Estimate the cointegrating relation between the 2 rates: TB6t = B0 + B1TB3t + B2t + B3t2 + ut (16.10)

t . Step 2: Obtain the residuals, u t is stationary, it is the error correction (EC) term. Provided that u
Step 3: Estimate the bivariate VAR using the EC term t 1 + v1t TB6t = 0 + 1 u t 1 + v2t TB3t = 2 + 3 u This VECM ties short-run dynamics to long-run relations via the EC term. 1 and 3 are error correction coefficients.
L Vn Chn UEH, 2012

11

23/07/2012

16.5 Granger Causality Test


23

Consider a question in the consumption function: What is the relationship between PCE and PDI? Does PCE PDI or does PDI PCE?

Estimate the bivariate VAR:

LPCEt = j LPCE t j + j LPDI t j + 1t + u1t

(16.22) (16.23)

LPDI t = j LPDI t j + j LPCEt j + 2t + u 2t


j =1 j =1

j =1 m

j =1 m

where L stands for logarithm, and t is the time, and u1t and u2t are assumed to be uncorrelated.

L Vn Chn UEH, 2012

16.5 Granger Causality Test (cont.)


24

There are 4 cases: 1) Unidirectional causality from LPCE to LPDI occurs if the estimated j are significant as a group and the estimated j are not. 2) Unidirectional causality from LPDI to LPCE occurs if the estimated j are significant as a group and the estimated j are not. 3) Feedback or bilateral causality occurs if the estimated j and j are significant. 4) Independence occurs if the estimated j and j are not significant.

L Vn Chn UEH, 2012

12

23/07/2012

16.5 Granger Causality Test (cont.)


25

To implement the test, consider regression (16.22): 1) Regress current LPCE on all lagged LPCE terms and other variables but do not include lagged LPDI terms obtain restricted RSSr. 2) Estimate (16.22) 3) Null H0: obtain unrestricted RSSu.

1 = 2 = = m = 0

4) Use the F test:

F=

( RSS r RSS u ) / m RSS u /(n k )

L Vn Chn UEH, 2012

13

You might also like