VECM model with exogenous variables

93 views
Skip to first unread message

Jacob Monrad

unread,
Apr 8, 2024, 10:56:08 AMApr 8
to pystatsmodels
Hello,

I am designing a VECM model to predict the values of two endogenous variables, also taking in the values of four exogenous variables.

Some context regarding the model:
I am trying to implement a VECM with exogenous variables along the lines of how Søren Johansen derived it " Cointegration in partial systems and the efficiency of single-equation analysis*"(1991). Where such a model is described as a "conditional" model, basically: 
The model predicts the behaviour of the endogenous variables, conditional on the history of the endogenous and exogenous variables and the contemporaneous change in the exogenous variables. 

 For this, I am using the "VECM" module in "statsmodels.tsa.vector_ar.vecm". 

This is how I made inputs to the VECM module:
The 4 exogenous variables enter the cointegrating relation along with the endogenous variables, and their lagged differences also enter the model. The exogenous variables in levels are therefore put in the "exog_coint" argument, and their precomputed lagged differences are put in the "exog" argument. Lag orders and the cointegration rank are determined beforehand.

My question/concern is this:
Naturally, one cannot in general assume that the cointegrating relation only affects the endogenous variables, as it may affect the dynamics of all the variables in the system. The exception is if the exogenous variables are in fact weakly exogenous to the estimation of the cointegrating matrix. In that case the general VECM formulation can be decomposed into a conditional model, as described above, and a marginal model for the exogenous variables. 
I thought some visualization could be helpful, so I included a picture of these equations, snipped from the paper: " Testing Weak Exogeneity and the Order of Cointegration in UK Money Demand Data" by Søren Johansen: 
conditional_and_marginal_VECM.png
Thus, I am trying to implement a model on the form of equation(8) in the picture. I am wondering if your VECM module contains the terms and factors that account for the covariance of the error term (terms containing "w"/omega, for instance the first term in (8))? I have not found it anywhere in the source code (accounting for "self.sigma_u" or something like that), but I might of course have misunderstood the something. If this isn't done in the VECM.fit() function or elsewhere, do you have any suggestions to how this can be done, or if it's possible to omit this problem without invalidating the model?

I apologise for a tedious mail, I am just trying to clarify my problem.
Thank you in advance for any help!

Best regards, Jacob

Reply all
Reply to author
Forward
0 new messages