Forecasting on test data in VAR

I am refering to this article-

I want to forecast on my test data. I have both endog and exog variables.

I am trying this-

prediction = res.forecast(test,steps=len(train),exog_future=test[xvar])

but its not working. Please help me.

© Copyright 2013-2019 Analytics Vidhya