Problem 1

(a) Bivariate Reduced Form VAR

Defining all the variables needed in this problem and then differentiate them to produce \(y_{1,t}\) and \(y_{2,t}\)

However for SP500 Data, since the data is daily, we need to change them into quarterly data

Estimating the VAR model from 1951Q1 to 2014Q4, looking at the smallest AIC, the proper lags will be equal to two

## $selection
## AIC(n)  HQ(n)  SC(n) FPE(n) 
##      2      2      1      2 
## 
## $criteria
##                    1             2             3             4
## AIC(n) -1.465126e+01 -1.470486e+01 -1.469229e+01 -1.466603e+01
## HQ(n)  -1.461704e+01 -1.464783e+01 -1.461245e+01 -1.456337e+01
## SC(n)  -1.456626e+01 -1.456319e+01 -1.449395e+01 -1.441102e+01
## FPE(n)  4.335513e-07  4.109277e-07  4.161332e-07  4.272205e-07
##                    5             6             7             8
## AIC(n) -1.464883e+01 -1.462725e+01 -1.461845e+01 -1.459013e+01
## HQ(n)  -1.452337e+01 -1.447897e+01 -1.444736e+01 -1.439622e+01
## SC(n)  -1.433716e+01 -1.425891e+01 -1.419344e+01 -1.410845e+01
## FPE(n)  4.346529e-07  4.441705e-07  4.481426e-07  4.610779e-07
## 
## VAR Estimation Results:
## ========================= 
## Endogenous variables: y1, y2 
## Deterministic variables: const 
## Sample size: 254 
## Log Likelihood: 1154.493 
## Roots of the characteristic polynomial:
## 0.4454 0.4454 0.304 0.304
## Call:
## VAR(y = y.z, p = 2, type = "const")
## 
## 
## Estimation results for equation y1: 
## =================================== 
## y1 = y1.l1 + y2.l1 + y1.l2 + y2.l2 + const 
## 
##        Estimate Std. Error t value Pr(>|t|)    
## y1.l1 0.2450402  0.0614771   3.986 8.84e-05 ***
## y2.l1 0.0230968  0.0064046   3.606 0.000375 ***
## y1.l2 0.0793493  0.0595434   1.333 0.183872    
## y2.l2 0.0263004  0.0065720   4.002 8.29e-05 ***
## const 0.0046278  0.0007233   6.398 7.75e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.008038 on 249 degrees of freedom
## Multiple R-Squared: 0.2309,  Adjusted R-squared: 0.2185 
## F-statistic: 18.68 on 4 and 249 DF,  p-value: 1.91e-13 
## 
## 
## Estimation results for equation y2: 
## =================================== 
## y2 = y1.l1 + y2.l1 + y1.l2 + y2.l2 + const 
## 
##        Estimate Std. Error t value Pr(>|t|)  
## y1.l1  0.256054   0.609111   0.420   0.6746  
## y2.l1  0.106501   0.063457   1.678   0.0945 .
## y1.l2 -0.819353   0.589953  -1.389   0.1661  
## y2.l2 -0.040573   0.065115  -0.623   0.5338  
## const  0.013836   0.007167   1.931   0.0547 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.07964 on 249 degrees of freedom
## Multiple R-Squared: 0.02087, Adjusted R-squared: 0.00514 
## F-statistic: 1.327 on 4 and 249 DF,  p-value: 0.2605 
## 
## 
## 
## Covariance matrix of residuals:
##          y1       y2
## y1 6.46e-05 0.000087
## y2 8.70e-05 0.006342
## 
## Correlation matrix of residuals:
##        y1     y2
## y1 1.0000 0.1359
## y2 0.1359 1.0000

(b) Granger Causality Test

To further test about the instantaneous causality existence, Granger Causality Test for both variable is conducted below:

## $Granger
## 
##  Granger causality H0: y1 do not Granger-cause y2
## 
## data:  VAR object varp
## F-Test = 0.96654, df1 = 2, df2 = 498, p-value = 0.3811
## 
## 
## $Instant
## 
##  H0: No instantaneous causality between: y1 and y2
## 
## data:  VAR object varp
## Chi-squared = 4.6072, df = 1, p-value = 0.03184
## $Granger
## 
##  Granger causality H0: y2 do not Granger-cause y1
## 
## data:  VAR object varp
## F-Test = 15.762, df1 = 2, df2 = 498, p-value = 2.305e-07
## 
## 
## $Instant
## 
##  H0: No instantaneous causality between: y2 and y1
## 
## data:  VAR object varp
## Chi-squared = 4.6072, df = 1, p-value = 0.03184

There is no indication of instantaneous causality, the predicting power is low for both variables.

(C) Restricted VAR

First, estimating the restricted VAR model that eliminates the lags

## 
## VAR Estimation Results:
## ========================= 
## Endogenous variables: y1, y2 
## Deterministic variables: const 
## Sample size: 254 
## Log Likelihood: 1139.086 
## Roots of the characteristic polynomial:
## 0.4867 0.2014 0.2014 0.1565
## Call:
## VAR(y = y.z, p = 2, type = "const")
## 
## 
## Estimation results for equation y1: 
## =================================== 
## y1 = y1.l1 + y1.l2 + const 
## 
##        Estimate Std. Error t value Pr(>|t|)    
## y1.l1 0.3301391  0.0628607   5.252 3.21e-07 ***
## y1.l2 0.0761755  0.0628199   1.213    0.226    
## const 0.0044907  0.0007616   5.896 1.19e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.008497 on 251 degrees of freedom
## Multiple R-Squared: 0.4906,  Adjusted R-squared: 0.4845 
## F-statistic: 80.59 on 3 and 251 DF,  p-value: < 2.2e-16 
## 
## 
## Estimation results for equation y2: 
## =================================== 
## y2 = y1.l1 + y2.l1 + y1.l2 + y2.l2 + const 
## 
##        Estimate Std. Error t value Pr(>|t|)  
## y1.l1  0.256054   0.609111   0.420   0.6746  
## y2.l1  0.106501   0.063457   1.678   0.0945 .
## y1.l2 -0.819353   0.589953  -1.389   0.1661  
## y2.l2 -0.040573   0.065115  -0.623   0.5338  
## const  0.013836   0.007167   1.931   0.0547 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.07964 on 249 degrees of freedom
## Multiple R-Squared: 0.03656, Adjusted R-squared: 0.01721 
## F-statistic:  1.89 on 5 and 249 DF,  p-value: 0.09665 
## 
## 
## 
## Covariance matrix of residuals:
##           y1       y2
## y1 7.278e-05 0.000087
## y2 8.700e-05 0.006342
## 
## Correlation matrix of residuals:
##        y1     y2
## y1 1.0000 0.1281
## y2 0.1281 1.0000
##    y1.l1 y2.l1 y1.l2 y2.l2 const
## y1     1     0     1     0     1
## y2     1     1     1     1     1
## [[1]]
##        y1.l1     y2.l1
## y1 0.3301391 0.0000000
## y2 0.2560542 0.1065012
## 
## [[2]]
##          y1.l2       y2.l2
## y1  0.07617549  0.00000000
## y2 -0.81935297 -0.04057338

Second, estimating restricted VAR model eliminating all variables with t-statistics less than 2

## 
## VAR Estimation Results:
## ========================= 
## Endogenous variables: y1, y2 
## Deterministic variables: const 
## Sample size: 254 
## Log Likelihood: 1150.599 
## Roots of the characteristic polynomial:
## 0.2734     0     0     0
## Call:
## VAR(y = y.z, p = 2, type = "const")
## 
## 
## Estimation results for equation y1: 
## =================================== 
## y1 = y1.l1 + y2.l1 + y2.l2 + const 
## 
##        Estimate Std. Error t value Pr(>|t|)    
## y1.l1 0.2734178  0.0577607   4.734 3.70e-06 ***
## y2.l1 0.0226323  0.0064051   3.533 0.000488 ***
## y2.l2 0.0266285  0.0065775   4.048 6.88e-05 ***
## const 0.0050198  0.0006618   7.585 6.55e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.00805 on 250 degrees of freedom
## Multiple R-Squared: 0.5446,  Adjusted R-squared: 0.5374 
## F-statistic: 74.76 on 4 and 250 DF,  p-value: < 2.2e-16 
## 
## 
## Estimation results for equation y2: 
## =================================== 
## y2 = const 
## 
##       Estimate Std. Error t value Pr(>|t|)  
## const  0.01017    0.00501    2.03   0.0434 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.07984 on 253 degrees of freedom
## Multiple R-Squared: 0.01602, Adjusted R-squared: 0.01213 
## F-statistic: 4.119 on 1 and 253 DF,  p-value: 0.04344 
## 
## 
## 
## Covariance matrix of residuals:
##           y1        y2
## y1 6.506e-05 8.224e-05
## y2 8.224e-05 6.477e-03
## 
## Correlation matrix of residuals:
##        y1     y2
## y1 1.0000 0.1267
## y2 0.1267 1.0000
##    y1.l1 y2.l1 y1.l2 y2.l2 const
## y1     1     1     0     1     1
## y2     0     0     0     0     1
## [[1]]
##        y1.l1      y2.l1
## y1 0.2734178 0.02263225
## y2 0.0000000 0.00000000
## 
## [[2]]
##    y1.l2      y2.l2
## y1     0 0.02662845
## y2     0 0.00000000

(d) StargazerX

First, loading the source:

The ouput for all three models are

## 
## =======================================================================================
##                                                      y                                 
##                             VARP Y1               VARP Y2               VARPY1         
##                               (1)                   (2)                   (3)          
## ---------------------------------------------------------------------------------------
## y1.l1                      0.245***                0.256               0.330***        
##                             (0.061)               (0.609)               (0.063)        
##                                                                                        
## y2.l1                      0.023***               0.107*                               
##                             (0.006)               (0.063)                              
##                                                                                        
## y1.l2                        0.079                -0.819                 0.076         
##                             (0.060)               (0.590)               (0.063)        
##                                                                                        
## y2.l2                      0.026***               -0.041                               
##                             (0.007)               (0.065)                              
##                                                                                        
## const                      0.005***               0.014*               0.004***        
##                             (0.001)               (0.007)               (0.001)        
##                                                                                        
## ---------------------------------------------------------------------------------------
## Observations                  254                   254                   254          
## R2                           0.231                 0.021                 0.491         
## Adjusted R2                  0.219                 0.005                 0.485         
## Residual Std. Error    0.008 (df = 249)      0.080 (df = 249)      0.008 (df = 251)    
## F Statistic         18.685*** (df = 4; 249) 1.327 (df = 4; 249) 80.588*** (df = 3; 251)
## =======================================================================================
## Note:                                                       *p<0.1; **p<0.05; ***p<0.01
## 
## ====
## asis
## ----
## 
## ======================================================================================
##                                                     y                                 
##                            VARPY2                VARPY1                 VARPY2        
##                             (1)                    (2)                    (3)         
## --------------------------------------------------------------------------------------
## y1.l1                      0.256                0.273***                              
##                           (0.609)                (0.058)                              
##                                                                                       
## y2.l1                      0.107*               0.023***                              
##                           (0.063)                (0.006)                              
##                                                                                       
## y1.l2                      -0.819                                                     
##                           (0.590)                                                     
##                                                                                       
## y2.l2                      -0.041               0.027***                              
##                           (0.065)                (0.007)                              
##                                                                                       
## const                      0.014*               0.005***                0.010**       
##                           (0.007)                (0.001)                (0.005)       
##                                                                                       
## --------------------------------------------------------------------------------------
## Observations                254                    254                    254         
## R2                         0.037                  0.545                  0.016        
## Adjusted R2                0.017                  0.537                  0.012        
## Residual Std. Error   0.080 (df = 249)      0.008 (df = 250)       0.080 (df = 253)   
## F Statistic         1.890* (df = 5; 249) 74.756*** (df = 4; 250) 4.119** (df = 1; 253)
## ======================================================================================
## Note:                                                      *p<0.1; **p<0.05; ***p<0.01
## 
## ====
## asis
## ----

(e) Impulse Response Function

First we have to plot the IRF and FEVD of the VAR model based on Choleski Decomposition

And the FEVD

##             y1        y2
## [1,] 1.0000000 0.0000000
## [2,] 0.8607464 0.1392536
## [3,] 0.8591922 0.1408078
## [4,] 0.8591882 0.1408118
##              y1        y2
## [1,] 0.01847382 0.9815262
## [2,] 0.02623100 0.9737690
## [3,] 0.02642786 0.9735721
## [4,] 0.02642813 0.9735719

Now if we reversed the order of the variable, there are changes in the result showing that order does matter.

##             y2          y1
## [1,] 1.0000000 0.000000000
## [2,] 0.9935239 0.006476147
## [3,] 0.9934082 0.006591832
## [4,] 0.9934079 0.006592058
##              y2        y1
## [1,] 0.01847382 0.9815262
## [2,] 0.18059627 0.8194037
## [3,] 0.18207471 0.8179253
## [4,] 0.18207906 0.8179209