We may consider vector autoregression models as an expansion of single variable autoregressive models. VAR(p) is a representation form for VAR models and the figure p corresponds to the number of lagged terms in the regression. In its most simplistic form VAR models include two dependent variables and their lagged values. Following representation can be considered as the most simplistic form of VAR models:
\[ \begin{pmatrix} Y_{1t}\\ Y_{2t} \end{pmatrix} = \begin{pmatrix} \beta_{11} & \beta_{12} \\ \beta_{21} & \beta_{22} \end{pmatrix} * \begin{pmatrix} Y_{1(t-1)}\\ Y_{2(t-1)} \end{pmatrix} + \begin{pmatrix} \epsilon_{y1} \\ \epsilon_{y2} \end{pmatrix} \]
Basically, such a model implies that everything depends on everything. In order to exemplify such a situation I tried to focus on treasury fixed income securities of United States. We are going to use 3-months, 2-year and 5-year government bond yields for such an exercise. To do this we need “vars” package. The function we are going to use from vars package is “VAR” function and we can check out their arguments from the following manual(p. 45). Required data is uploaded to moodle system.
https://cran.r-project.org/web/packages/vars/vars.pdf
install.packages("vars", repos = "https://cran.r-project.org")
##
## The downloaded binary packages are in
## /var/folders/_8/f2m9fdt162ng6nj45842hhsc0000gn/T//RtmpqLSG4v/downloaded_packages
library(vars)
## Loading required package: MASS
## Loading required package: strucchange
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
## Loading required package: sandwich
## Loading required package: urca
## Loading required package: lmtest
library(urca)
library(readr)
X3month <- read_csv("Downloads/GS3M.csv")
## Parsed with column specification:
## cols(
## DATE = col_date(format = ""),
## GS3M = col_double()
## )
threemyield = X3month[,2]
threemyield <- as.numeric(unlist(threemyield))
summary(ur.df(threemyield))
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression none
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.71196 -0.03643 0.00840 0.07113 0.78794
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z.lag.1 -0.005673 0.002404 -2.360 0.0188 *
## z.diff.lag 0.454997 0.046836 9.715 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1619 on 355 degrees of freedom
## Multiple R-squared: 0.2294, Adjusted R-squared: 0.225
## F-statistic: 52.83 on 2 and 355 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic is: -2.3599
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau1 -2.58 -1.95 -1.62
X2yearyield <- read_csv("Downloads/GS2.csv")
## Parsed with column specification:
## cols(
## DATE = col_date(format = ""),
## GS2 = col_double()
## )
twoyyield <- X2yearyield[,2]
twoyyield <- as.numeric(unlist(twoyyield))
summary(ur.df(twoyyield))
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression none
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.59160 -0.10567 0.00176 0.10954 0.70786
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z.lag.1 -0.005591 0.002591 -2.158 0.0316 *
## z.diff.lag 0.405171 0.048030 8.436 8.42e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1985 on 355 degrees of freedom
## Multiple R-squared: 0.1817, Adjusted R-squared: 0.1771
## F-statistic: 39.43 on 2 and 355 DF, p-value: 3.447e-16
##
##
## Value of test-statistic is: -2.1578
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau1 -2.58 -1.95 -1.62
GS5 <- read_csv("Downloads/GS5.csv")
## Parsed with column specification:
## cols(
## DATE = col_date(format = ""),
## GS5 = col_double()
## )
fiveyyield <- GS5[,2]
fiveyyield <- as.numeric(unlist(fiveyyield))
summary(ur.df(fiveyyield))
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression none
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.62174 -0.13337 0.00098 0.14510 0.70113
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z.lag.1 -0.005091 0.002583 -1.971 0.0495 *
## z.diff.lag 0.310463 0.050052 6.203 1.54e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2192 on 355 degrees of freedom
## Multiple R-squared: 0.1102, Adjusted R-squared: 0.1052
## F-statistic: 21.98 on 2 and 355 DF, p-value: 9.974e-10
##
##
## Value of test-statistic is: -1.9711
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau1 -2.58 -1.95 -1.62
At this point, we have imported our data and ran the necessary ADF tests. At 95% confidence level, we found that these series are stationary. Now we can proceed to VAR estimation of the variables. To do this we need to specify our variables of interest as a data frame.
tbond_df <- data.frame(threemyield, twoyyield, fiveyyield)
bond_var1 <- VAR(tbond_df)
summary(bond_var1)
##
## VAR Estimation Results:
## =========================
## Endogenous variables: threemyield, twoyyield, fiveyyield
## Deterministic variables: const
## Sample size: 358
## Log Likelihood: 705.028
## Roots of the characteristic polynomial:
## 0.9877 0.9454 0.9454
## Call:
## VAR(y = tbond_df)
##
##
## Estimation results for equation threemyield:
## ============================================
## threemyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 0.71482 0.02645 27.024 < 2e-16 ***
## twoyyield.l1 0.47548 0.04596 10.344 < 2e-16 ***
## fiveyyield.l1 -0.22890 0.02687 -8.518 4.72e-16 ***
## const 0.09166 0.02436 3.763 0.000196 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.159 on 354 degrees of freedom
## Multiple R-Squared: 0.9952, Adjusted R-squared: 0.9951
## F-statistic: 2.426e+04 on 3 and 354 DF, p-value: < 2.2e-16
##
##
## Estimation results for equation twoyyield:
## ==========================================
## twoyyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 -0.15525 0.03538 -4.388 1.51e-05 ***
## twoyyield.l1 1.25164 0.06148 20.359 < 2e-16 ***
## fiveyyield.l1 -0.12405 0.03594 -3.451 0.000626 ***
## const 0.06334 0.03258 1.944 0.052654 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.2126 on 354 degrees of freedom
## Multiple R-Squared: 0.9917, Adjusted R-squared: 0.9916
## F-statistic: 1.406e+04 on 3 and 354 DF, p-value: < 2.2e-16
##
##
## Estimation results for equation fiveyyield:
## ===========================================
## fiveyyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 -0.08087 0.03828 -2.113 0.0353 *
## twoyyield.l1 0.15017 0.06652 2.258 0.0246 *
## fiveyyield.l1 0.91111 0.03889 23.429 <2e-16 ***
## const 0.05681 0.03525 1.612 0.1079
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.23 on 354 degrees of freedom
## Multiple R-Squared: 0.9885, Adjusted R-squared: 0.9884
## F-statistic: 1.013e+04 on 3 and 354 DF, p-value: < 2.2e-16
##
##
##
## Covariance matrix of residuals:
## threemyield twoyyield fiveyyield
## threemyield 0.02527 0.02349 0.01882
## twoyyield 0.02349 0.04520 0.04486
## fiveyyield 0.01882 0.04486 0.05291
##
## Correlation matrix of residuals:
## threemyield twoyyield fiveyyield
## threemyield 1.0000 0.6951 0.5148
## twoyyield 0.6951 1.0000 0.9173
## fiveyyield 0.5148 0.9173 1.0000
Now, we are going to try to use information criteria to determine lag length, in other words p parameter of the VAR(p) specification.
bond_var2 <- VAR(tbond_df, ic = "AIC")
summary(bond_var2)
##
## VAR Estimation Results:
## =========================
## Endogenous variables: threemyield, twoyyield, fiveyyield
## Deterministic variables: const
## Sample size: 358
## Log Likelihood: 705.028
## Roots of the characteristic polynomial:
## 0.9877 0.9454 0.9454
## Call:
## VAR(y = tbond_df, ic = "AIC")
##
##
## Estimation results for equation threemyield:
## ============================================
## threemyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 0.71482 0.02645 27.024 < 2e-16 ***
## twoyyield.l1 0.47548 0.04596 10.344 < 2e-16 ***
## fiveyyield.l1 -0.22890 0.02687 -8.518 4.72e-16 ***
## const 0.09166 0.02436 3.763 0.000196 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.159 on 354 degrees of freedom
## Multiple R-Squared: 0.9952, Adjusted R-squared: 0.9951
## F-statistic: 2.426e+04 on 3 and 354 DF, p-value: < 2.2e-16
##
##
## Estimation results for equation twoyyield:
## ==========================================
## twoyyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 -0.15525 0.03538 -4.388 1.51e-05 ***
## twoyyield.l1 1.25164 0.06148 20.359 < 2e-16 ***
## fiveyyield.l1 -0.12405 0.03594 -3.451 0.000626 ***
## const 0.06334 0.03258 1.944 0.052654 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.2126 on 354 degrees of freedom
## Multiple R-Squared: 0.9917, Adjusted R-squared: 0.9916
## F-statistic: 1.406e+04 on 3 and 354 DF, p-value: < 2.2e-16
##
##
## Estimation results for equation fiveyyield:
## ===========================================
## fiveyyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 -0.08087 0.03828 -2.113 0.0353 *
## twoyyield.l1 0.15017 0.06652 2.258 0.0246 *
## fiveyyield.l1 0.91111 0.03889 23.429 <2e-16 ***
## const 0.05681 0.03525 1.612 0.1079
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.23 on 354 degrees of freedom
## Multiple R-Squared: 0.9885, Adjusted R-squared: 0.9884
## F-statistic: 1.013e+04 on 3 and 354 DF, p-value: < 2.2e-16
##
##
##
## Covariance matrix of residuals:
## threemyield twoyyield fiveyyield
## threemyield 0.02527 0.02349 0.01882
## twoyyield 0.02349 0.04520 0.04486
## fiveyyield 0.01882 0.04486 0.05291
##
## Correlation matrix of residuals:
## threemyield twoyyield fiveyyield
## threemyield 1.0000 0.6951 0.5148
## twoyyield 0.6951 1.0000 0.9173
## fiveyyield 0.5148 0.9173 1.0000
As you can observe, Akaike information criteria returns to one lag and our two models becomes identical. Let us try a different number of lags and compare the estimates.
bond_var3 <- VAR(tbond_df, p=2)
summary(bond_var3)
##
## VAR Estimation Results:
## =========================
## Endogenous variables: threemyield, twoyyield, fiveyyield
## Deterministic variables: const
## Sample size: 357
## Log Likelihood: 749.919
## Roots of the characteristic polynomial:
## 0.975 0.9653 0.8361 0.3973 0.329 0.1186
## Call:
## VAR(y = tbond_df, p = 2)
##
##
## Estimation results for equation threemyield:
## ============================================
## threemyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + threemyield.l2 + twoyyield.l2 + fiveyyield.l2 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 0.98223 0.07743 12.685 < 2e-16 ***
## twoyyield.l1 0.56150 0.12443 4.513 8.76e-06 ***
## fiveyyield.l1 -0.25804 0.09640 -2.677 0.00778 **
## threemyield.l2 -0.17509 0.06983 -2.507 0.01262 *
## twoyyield.l2 -0.24431 0.12874 -1.898 0.05856 .
## fiveyyield.l2 0.10592 0.09840 1.076 0.28246
## const 0.06518 0.02369 2.751 0.00625 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.1501 on 350 degrees of freedom
## Multiple R-Squared: 0.9957, Adjusted R-squared: 0.9956
## F-statistic: 1.341e+04 on 6 and 350 DF, p-value: < 2.2e-16
##
##
## Estimation results for equation twoyyield:
## ==========================================
## twoyyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + threemyield.l2 + twoyyield.l2 + fiveyyield.l2 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 -0.15633 0.10247 -1.526 0.12801
## twoyyield.l1 1.57673 0.16467 9.575 < 2e-16 ***
## fiveyyield.l1 -0.10673 0.12757 -0.837 0.40335
## threemyield.l2 0.10979 0.09241 1.188 0.23562
## twoyyield.l2 -0.49581 0.17038 -2.910 0.00384 **
## fiveyyield.l2 0.05550 0.13021 0.426 0.67019
## const 0.04889 0.03135 1.559 0.11986
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.1986 on 350 degrees of freedom
## Multiple R-Squared: 0.9927, Adjusted R-squared: 0.9926
## F-statistic: 7953 on 6 and 350 DF, p-value: < 2.2e-16
##
##
## Estimation results for equation fiveyyield:
## ===========================================
## fiveyyield = threemyield.l1 + twoyyield.l1 + fiveyyield.l1 + threemyield.l2 + twoyyield.l2 + fiveyyield.l2 + const
##
## Estimate Std. Error t value Pr(>|t|)
## threemyield.l1 -0.20203 0.11275 -1.792 0.0740 .
## twoyyield.l1 0.36835 0.18119 2.033 0.0428 *
## fiveyyield.l1 1.06240 0.14037 7.569 3.38e-13 ***
## threemyield.l2 0.19351 0.10168 1.903 0.0579 .
## twoyyield.l2 -0.32307 0.18747 -1.723 0.0857 .
## fiveyyield.l2 -0.11301 0.14328 -0.789 0.4308
## const 0.05859 0.03450 1.698 0.0903 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.2186 on 350 degrees of freedom
## Multiple R-Squared: 0.9896, Adjusted R-squared: 0.9894
## F-statistic: 5550 on 6 and 350 DF, p-value: < 2.2e-16
##
##
##
## Covariance matrix of residuals:
## threemyield twoyyield fiveyyield
## threemyield 0.02253 0.02033 0.01659
## twoyyield 0.02033 0.03945 0.03965
## fiveyyield 0.01659 0.03965 0.04777
##
## Correlation matrix of residuals:
## threemyield twoyyield fiveyyield
## threemyield 1.0000 0.6818 0.5059
## twoyyield 0.6818 1.0000 0.9133
## fiveyyield 0.5059 0.9133 1.0000
Our model became unstable with the inclusion of second lag. We can safely say that AIC did not fail us. Now let us continue to use our initial model as a benchmark and obtain impulse response coefficients.
irf(bond_var1)
##
## Impulse response coefficients
## $threemyield
## threemyield twoyyield fiveyyield
## [1,] 0.1589526 0.1477795 0.1184067
## [2,] 0.1567846 0.1456006 0.1172187
## [3,] 0.1544708 0.1433575 0.1159844
## [4,] 0.1520328 0.1410623 0.1147102
## [5,] 0.1494904 0.1387260 0.1134017
## [6,] 0.1468618 0.1363589 0.1120642
## [7,] 0.1441634 0.1339701 0.1107028
## [8,] 0.1414104 0.1315680 0.1093219
## [9,] 0.1386164 0.1291602 0.1079257
## [10,] 0.1357940 0.1267535 0.1065179
## [11,] 0.1329543 0.1243540 0.1051022
##
## $twoyyield
## threemyield twoyyield fiveyyield
## [1,] 0.00000000 0.1528468 0.1790047
## [2,] 0.03170035 0.1691043 0.1860465
## [3,] 0.06047855 0.1836576 0.1923401
## [4,] 0.08652896 0.1966245 0.1979322
## [5,] 0.11003573 0.2081163 0.2028678
## [6,] 0.13117317 0.2182382 0.2071892
## [7,] 0.15010614 0.2270893 0.2109371
## [8,] 0.16699043 0.2347634 0.2141497
## [9,] 0.18197313 0.2413487 0.2168638
## [10,] 0.19519299 0.2469284 0.2191137
## [11,] 0.20678079 0.2515806 0.2209325
##
## $fiveyyield
## threemyield twoyyield fiveyyield
## [1,] 0.00000000 0.00000000 0.08275705
## [2,] -0.01894343 -0.01026578 0.07540103
## [3,] -0.03568190 -0.01926129 0.06868929
## [4,] -0.05038772 -0.02708915 0.06257701
## [5,] -0.06322258 -0.03384545 0.05702184
## [6,] -0.07433806 -0.03962014 0.05198388
## [7,] -0.08387616 -0.04449731 0.04742550
## [8,] -0.09196974 -0.04855548 0.04331129
## [9,] -0.09874300 -0.05186793 0.03960792
## [10,] -0.10431194 -0.05450296 0.03628409
## [11,] -0.10878479 -0.05652415 0.03331040
##
##
## Lower Band, CI= 0.95
## $threemyield
## threemyield twoyyield fiveyyield
## [1,] 0.14048942 0.12482398 0.09671657
## [2,] 0.13594071 0.12094337 0.09481384
## [3,] 0.13315570 0.11645142 0.09225001
## [4,] 0.12812349 0.11203472 0.08946039
## [5,] 0.12312401 0.10667120 0.08585188
## [6,] 0.11824592 0.10108519 0.08147372
## [7,] 0.11298787 0.09588444 0.07737642
## [8,] 0.10799781 0.09144748 0.07453031
## [9,] 0.10236163 0.08704216 0.07213445
## [10,] 0.09706141 0.08278164 0.06978614
## [11,] 0.09196772 0.07872878 0.06748907
##
## $twoyyield
## threemyield twoyyield fiveyyield
## [1,] 0.00000000 0.1388645 0.1601088
## [2,] 0.02283971 0.1489545 0.1598392
## [3,] 0.04361439 0.1513498 0.1553224
## [4,] 0.06234778 0.1542461 0.1508142
## [5,] 0.07892416 0.1581977 0.1474092
## [6,] 0.09295473 0.1622838 0.1451167
## [7,] 0.10477288 0.1639636 0.1428516
## [8,] 0.11469186 0.1648097 0.1408189
## [9,] 0.12296787 0.1650920 0.1392304
## [10,] 0.12969137 0.1648134 0.1377850
## [11,] 0.13511522 0.1635757 0.1360795
##
## $fiveyyield
## threemyield twoyyield fiveyyield
## [1,] 0.00000000 0.00000000 0.071345337
## [2,] -0.02370837 -0.01637309 0.061692648
## [3,] -0.04417020 -0.03103652 0.050202184
## [4,] -0.06225988 -0.04421444 0.038274801
## [5,] -0.07796806 -0.05613255 0.026009003
## [6,] -0.08918930 -0.06794650 0.014661681
## [7,] -0.10140437 -0.07805601 0.004109599
## [8,] -0.11300935 -0.08730557 -0.005750446
## [9,] -0.12340863 -0.09578839 -0.016011162
## [10,] -0.13377909 -0.10349275 -0.023643520
## [11,] -0.14342680 -0.11198364 -0.031097836
##
##
## Upper Band, CI= 0.95
## $threemyield
## threemyield twoyyield fiveyyield
## [1,] 0.1751102 0.1668809 0.1358504
## [2,] 0.1699878 0.1661688 0.1357545
## [3,] 0.1688814 0.1661654 0.1355112
## [4,] 0.1691444 0.1656719 0.1348630
## [5,] 0.1700823 0.1650737 0.1346765
## [6,] 0.1685613 0.1642322 0.1340779
## [7,] 0.1671936 0.1631802 0.1333661
## [8,] 0.1665461 0.1614868 0.1325486
## [9,] 0.1654555 0.1591588 0.1316330
## [10,] 0.1639294 0.1567253 0.1306266
## [11,] 0.1621645 0.1542109 0.1300987
##
## $twoyyield
## threemyield twoyyield fiveyyield
## [1,] 0.00000000 0.1618559 0.1892755
## [2,] 0.04103479 0.1812434 0.1984599
## [3,] 0.07659337 0.1994057 0.2053159
## [4,] 0.10807932 0.2162222 0.2139357
## [5,] 0.13567742 0.2321234 0.2211843
## [6,] 0.16107475 0.2469899 0.2292287
## [7,] 0.18244060 0.2602207 0.2365329
## [8,] 0.20265971 0.2719017 0.2428694
## [9,] 0.22111233 0.2821174 0.2478229
## [10,] 0.23636251 0.2910189 0.2518403
## [11,] 0.24946400 0.2986774 0.2550701
##
## $fiveyyield
## threemyield twoyyield fiveyyield
## [1,] 0.00000000 0.0000000000 0.08932872
## [2,] -0.01416599 -0.0029297437 0.08521793
## [3,] -0.02501331 -0.0042372399 0.08279100
## [4,] -0.03280902 -0.0041434268 0.08159541
## [5,] -0.03782213 -0.0028650540 0.08079185
## [6,] -0.04120080 -0.0005976726 0.08001711
## [7,] -0.04272607 0.0024804500 0.07926523
## [8,] -0.04265290 0.0062077629 0.07853090
## [9,] -0.04119899 0.0104387683 0.07780940
## [10,] -0.03808895 0.0150432852 0.07804035
## [11,] -0.03361355 0.0199056551 0.07882307
There is a crucial question: How can I interpret the following impulse response coefficients. To investigate this let’s obtain impulse responses individually and plot them.
threeir_two <- irf(bond_var1, impulse = "twoyyield", response = "threemyield")
plot(threeir_two)
threeir_five <- irf(bond_var1, impulse = "fiveyyield", response = "threemyield")
plot(threeir_five)
twoir_five <- irf(bond_var1, impulse = "fiveyyield", response = "twoyyield")
plot(twoir_five)
twoir_three <- irf(bond_var1, impulse = "threemyield", response = "twoyyield")
plot(twoir_three)
fiveir_two <- irf(bond_var1, impulse = "twoyyield", response = "fiveyyield")
plot(fiveir_two)
fiveir_three <- irf(bond_var1, impulse = "threemyield", response = "fiveyyield")
These are all the basic parts of constructing a VAR model. If we would like to make inferences about the US yield curve, inclusion of a wider maturity span would be necessary. This is a simplified model that is constructed to give a basic understanding of mechanics of VAR models. Since they are beyond the scope is this course we will not focus on structural vars, vector error correction models, structural breaks and their diagnostic environment etc.