Problem 2

Obtain monthly time series for Industrial Production Index FRED/INDPRO and for Consumer Price Index FRED/CPIAUCSL.

(a) Test the log transformed time series, log of industrial production y1,t = logIPIt and log of consumer price index y2,t = logCPIt for the presence of unit root/stationarity using either ADF, ERS or KPSS tests. Afterwards apply the same unit root/stationarity test also to the first differences ∆y1,t (which approximates the month-over-moth growth rate of the industrial production) and ∆y2,t (which approximates the month-over-moth inflation rate). We can see by the above plots that IPI seems to be stationary when we take the Log and Difference the data. CPI does not seem to be stationary when we Log Difference the data but this is OK because we need at least one of our variable to be non-stationary so we can apply the Blanchard and Quah process. We will formally test these series using unit root tests below.

#ADF Test
adf.test(lCPI)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  lCPI
## Dickey-Fuller = -1.3201, Lag order = 9, p-value = 0.8661
## alternative hypothesis: stationary
adf.test(dlCPI)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  dlCPI
## Dickey-Fuller = -4.1711, Lag order = 9, p-value = 0.01
## alternative hypothesis: stationary
adf.test(lIPI)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  lIPI
## Dickey-Fuller = -1.9666, Lag order = 9, p-value = 0.5925
## alternative hypothesis: stationary
adf.test(dlIPI)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  dlIPI
## Dickey-Fuller = -8.083, Lag order = 9, p-value = 0.01
## alternative hypothesis: stationary
#KPSS Test
kpss.test(lCPI, null = "Trend")
## 
##  KPSS Test for Trend Stationarity
## 
## data:  lCPI
## KPSS Trend = 1.4066, Truncation lag parameter = 6, p-value = 0.01
kpss.test(dlCPI, null = "Trend")
## 
##  KPSS Test for Trend Stationarity
## 
## data:  dlCPI
## KPSS Trend = 0.94792, Truncation lag parameter = 6, p-value = 0.01
kpss.test(lIPI, null="Trend")
## 
##  KPSS Test for Trend Stationarity
## 
## data:  lIPI
## KPSS Trend = 1.9984, Truncation lag parameter = 6, p-value = 0.01
kpss.test(dlIPI, null="Trend")
## 
##  KPSS Test for Trend Stationarity
## 
## data:  dlIPI
## KPSS Trend = 0.025087, Truncation lag parameter = 6, p-value = 0.1

(b) Estimate a bivariate reduced form VAR for yt = (∆y1,t,∆y2,t)′, use information criteria to select number of lags.

##     dlIPI     dlCPI 
## 0.2400088 0.2895435
##         dlIPI         dlCPI 
## -8.909444e-18  1.350663e-17

## 
## VAR Estimation Results:
## ========================= 
## Endogenous variables: dlIPI, dlCPI 
## Deterministic variables: const 
## Sample size: 813 
## Log Likelihood: -1000.592 
## Roots of the characteristic polynomial:
## 0.954 0.9275 0.9275 0.9162 0.9162 0.9118 0.9118 0.9099 0.9099 0.9045 0.9045 0.8846 0.8846 0.8741 0.8741 0.8411 0.8411 0.8407 0.8407 0.8272 0.8272 0.8135 0.8135 0.812 0.812 0.8016 0.8016 0.6191 0.6191 0.01803
## Call:
## VAR(y = y, type = "const", lag.max = 20, ic = "AIC")
## 
## 
## Estimation results for equation dlIPI: 
## ====================================== 
## dlIPI = dlIPI.l1 + dlCPI.l1 + dlIPI.l2 + dlCPI.l2 + dlIPI.l3 + dlCPI.l3 + dlIPI.l4 + dlCPI.l4 + dlIPI.l5 + dlCPI.l5 + dlIPI.l6 + dlCPI.l6 + dlIPI.l7 + dlCPI.l7 + dlIPI.l8 + dlCPI.l8 + dlIPI.l9 + dlCPI.l9 + dlIPI.l10 + dlCPI.l10 + dlIPI.l11 + dlCPI.l11 + dlIPI.l12 + dlCPI.l12 + dlIPI.l13 + dlCPI.l13 + dlIPI.l14 + dlCPI.l14 + dlIPI.l15 + dlCPI.l15 + const 
## 
##             Estimate Std. Error t value Pr(>|t|)    
## dlIPI.l1   0.2925869  0.0356604   8.205 9.47e-16 ***
## dlCPI.l1   0.2351434  0.1241722   1.894   0.0586 .  
## dlIPI.l2   0.0743108  0.0370718   2.005   0.0454 *  
## dlCPI.l2  -0.0463054  0.1341970  -0.345   0.7301    
## dlIPI.l3   0.0853135  0.0372428   2.291   0.0222 *  
## dlCPI.l3   0.0172717  0.1325722   0.130   0.8964    
## dlIPI.l4   0.0428421  0.0368595   1.162   0.2455    
## dlCPI.l4  -0.0774276  0.1301009  -0.595   0.5519    
## dlIPI.l5  -0.0798768  0.0368415  -2.168   0.0305 *  
## dlCPI.l5   0.0073740  0.1297863   0.057   0.9547    
## dlIPI.l6   0.0055639  0.0369556   0.151   0.8804    
## dlCPI.l6  -0.1009473  0.1282056  -0.787   0.4313    
## dlIPI.l7   0.0111806  0.0369840   0.302   0.7625    
## dlCPI.l7  -0.1103592  0.1276021  -0.865   0.3874    
## dlIPI.l8   0.0252498  0.0369643   0.683   0.4948    
## dlCPI.l8  -0.0156231  0.1269650  -0.123   0.9021    
## dlIPI.l9   0.0250090  0.0369497   0.677   0.4987    
## dlCPI.l9  -0.0159623  0.1242942  -0.128   0.8978    
## dlIPI.l10 -0.0065025  0.0369256  -0.176   0.8603    
## dlCPI.l10 -0.1746315  0.1242133  -1.406   0.1602    
## dlIPI.l11  0.0466541  0.0368539   1.266   0.2059    
## dlCPI.l11  0.1299747  0.1244697   1.044   0.2967    
## dlIPI.l12 -0.1729883  0.0368425  -4.695 3.14e-06 ***
## dlCPI.l12 -0.1910961  0.1247577  -1.532   0.1260    
## dlIPI.l13 -0.0269088  0.0371869  -0.724   0.4695    
## dlCPI.l13  0.1857784  0.1256367   1.479   0.1396    
## dlIPI.l14 -0.0731791  0.0370661  -1.974   0.0487 *  
## dlCPI.l14 -0.1007250  0.1259635  -0.800   0.4242    
## dlIPI.l15  0.0059760  0.0354592   0.169   0.8662    
## dlCPI.l15 -0.1690056  0.1159726  -1.457   0.1454    
## const      0.0008208  0.0299496   0.027   0.9781    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.8531 on 782 degrees of freedom
## Multiple R-Squared: 0.2427,  Adjusted R-squared: 0.2136 
## F-statistic: 8.353 on 30 and 782 DF,  p-value: < 2.2e-16 
## 
## 
## Estimation results for equation dlCPI: 
## ====================================== 
## dlCPI = dlIPI.l1 + dlCPI.l1 + dlIPI.l2 + dlCPI.l2 + dlIPI.l3 + dlCPI.l3 + dlIPI.l4 + dlCPI.l4 + dlIPI.l5 + dlCPI.l5 + dlIPI.l6 + dlCPI.l6 + dlIPI.l7 + dlCPI.l7 + dlIPI.l8 + dlCPI.l8 + dlIPI.l9 + dlCPI.l9 + dlIPI.l10 + dlCPI.l10 + dlIPI.l11 + dlCPI.l11 + dlIPI.l12 + dlCPI.l12 + dlIPI.l13 + dlCPI.l13 + dlIPI.l14 + dlCPI.l14 + dlIPI.l15 + dlCPI.l15 + const 
## 
##             Estimate Std. Error t value Pr(>|t|)    
## dlIPI.l1  -0.0000584  0.0102140  -0.006  0.99544    
## dlCPI.l1   0.4410746  0.0355659  12.402  < 2e-16 ***
## dlIPI.l2   0.0266937  0.0106182   2.514  0.01214 *  
## dlCPI.l2   0.0690632  0.0384372   1.797  0.07276 .  
## dlIPI.l3   0.0113806  0.0106672   1.067  0.28636    
## dlCPI.l3   0.0464748  0.0379718   1.224  0.22135    
## dlIPI.l4  -0.0005648  0.0105574  -0.054  0.95735    
## dlCPI.l4   0.0034564  0.0372640   0.093  0.92612    
## dlIPI.l5  -0.0132331  0.0105523  -1.254  0.21020    
## dlCPI.l5   0.0568455  0.0371739   1.529  0.12662    
## dlIPI.l6   0.0224065  0.0105850   2.117  0.03459 *  
## dlCPI.l6   0.0234519  0.0367211   0.639  0.52324    
## dlIPI.l7  -0.0014671  0.0105931  -0.138  0.88988    
## dlCPI.l7   0.0502647  0.0365483   1.375  0.16943    
## dlIPI.l8   0.0133222  0.0105875   1.258  0.20866    
## dlCPI.l8   0.0364987  0.0363658   1.004  0.31585    
## dlIPI.l9  -0.0112670  0.0105833  -1.065  0.28738    
## dlCPI.l9   0.0638678  0.0356008   1.794  0.07320 .  
## dlIPI.l10  0.0141181  0.0105764   1.335  0.18231    
## dlCPI.l10  0.0864578  0.0355776   2.430  0.01532 *  
## dlIPI.l11  0.0031138  0.0105558   0.295  0.76808    
## dlCPI.l11  0.0683808  0.0356511   1.918  0.05547 .  
## dlIPI.l12 -0.0125529  0.0105526  -1.190  0.23458    
## dlCPI.l12 -0.1527188  0.0357336  -4.274 2.16e-05 ***
## dlIPI.l13  0.0141435  0.0106512   1.328  0.18461    
## dlCPI.l13 -0.0037400  0.0359853  -0.104  0.91725    
## dlIPI.l14 -0.0058919  0.0106166  -0.555  0.57908    
## dlCPI.l14 -0.0169567  0.0360789  -0.470  0.63849    
## dlIPI.l15 -0.0025611  0.0101563  -0.252  0.80098    
## dlCPI.l15  0.0981659  0.0332173   2.955  0.00322 ** 
## const     -0.0041212  0.0085783  -0.480  0.63106    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.2444 on 782 degrees of freedom
## Multiple R-Squared: 0.4794,  Adjusted R-squared: 0.4595 
## F-statistic: 24.01 on 30 and 782 DF,  p-value: < 2.2e-16 
## 
## 
## 
## Covariance matrix of residuals:
##          dlIPI    dlCPI
## dlIPI 0.727831 0.005025
## dlCPI 0.005025 0.059710
## 
## Correlation matrix of residuals:
##        dlIPI  dlCPI
## dlIPI 1.0000 0.0241
## dlCPI 0.0241 1.0000

(c) Suppose that we want to analyze effects of two shocks - productivity shocks and demand shocks. Use Blanchard and Quah approach to obtain an SVAR model where we impose the condition that demand shocks do not affect industrial production y1,t in the long run.

## 
## SVAR Estimation Results:
## ======================== 
## 
## Call:
## BQ(x = var1)
## 
## Type: Blanchard-Quah 
## Sample size: 813 
## Log Likelihood: -1032.199 
## 
## Estimated contemporaneous impact matrix:
##         dlIPI  dlCPI
## dlIPI  0.6137 0.5927
## dlCPI -0.1655 0.1798
## 
## Estimated identified long run impact matrix:
##         dlIPI dlCPI
## dlIPI  1.2402 0.000
## dlCPI -0.7267 1.389
## 
## Covariance matrix of reduced form residuals (*100):
##         dlIPI  dlCPI
## dlIPI 72.7831 0.5025
## dlCPI  0.5025 5.9710

In order for us to use the Blanchard and Quah approach, we need to ensure that at least one of our variables is non-stationary , I(0) variables do not have a permanent component. This condition is satisfied in our CPI variable.

(d) Report and interpret the contemporaneous impact and the long run impact matrices for the SVAR.

## 
## SVAR Estimation Results:
## ======================== 
## 
## 
## Estimated contemporaneous impact matrix:
##         dlIPI  dlCPI
## dlIPI  0.6137 0.5927
## dlCPI -0.1655 0.1798
## 
## Estimated identified long run impact matrix:
##         dlIPI dlCPI
## dlIPI  1.2402 0.000
## dlCPI -0.7267 1.389

The interpretation of the above impact matricies follows:

Contemporaneous impact matrix:
A positive one standard deviation shock to productivity increases the growth of industrial production by 0.6137% and lowers inflation by -0.1655%.
A negative one standard deviation demand shock increses industrial production by 0.5927% and increases inflation by 0.1798%.

Long run impact matrix:
The long run cumulative effect of any demand shock on industrial production os zero which was set by out constraints.
The long run cumulative effect of a single positive one standard deviation shock to productivity on industrial production is an increase of 1.2402% to industrial production.

(e) Plot the cumulative IRFs based on the SVAR model from (c) and interpret them/explain what say about the effects of the two types of shocks on industrial production and prices.

From the above plots there does not seem to be a clear point where the max effect of the two shocks is seen. It seems to affect IPI and CPI at different times with a productivity shock affecting IPI at a maximum level during about the 12th quarter while CPI is affected within the first quarter and continues. The productivity shock to IPI looks to be a permananant shock where a new long run average is reached while a productivity shock to CPI has a similar effect reaching a new long run average.

In the case of a positive one standard deviation shock to productivity, IPI increases about 0.5% while CPI is almost affected about -0.5%.

In the case of a demand shock a peak influence occurs around 6th quarter for IPI while a demand shock affects CPI in an increasing manor to reach a new long run average.

(f) Construct the FEVD for the SVAR. How much of the overall fluctuations in ∆y1,t and ∆y2,t is explained in the short run by the two shocks? How about in the long run? In general, Variance decomposition separates the variation in an endogenous variable into the component shocks to the VAR. The variance decomposition provides information about the relative importance of each random innovation in the variables of our VAR. It seems that in both the long run and the short run very little of the forecast error variance can be explained by itself. There does seem to be a small amount of short run forecast error that is explained in both variables in the short run and then quickly tapers off after about 2 quarters. I think it is difficult to draw too many conclusions based on the information.