@arks the error “A wrong lag/lead of a variable in VarOrdering” likely means that you declared more variables than you have equations. to be sure, first try counting the number of endogenous model variables and compare to the number of model equations. assuming you find more declared variables than equations, you will need to remove the endogenous variables that are never referenced in your model equations. I just ran into the same error in my own code and it turned out I had 90 variables and 89 equations. once I found the extra variable, the error stopped.