Conditional VAR forecast

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

dakila
Posts: 391
Joined: Tue Nov 24, 2015 4:57 pm

Re: Conditional VAR forecast

Postby dakila » Tue Apr 04, 2017 7:51 am

First, if you need logged variable you must create the logged variable before the VAR model estimation.
Then estimate the VAR model with the created series.
For example:

Code: Select all

series logy=log(y)
...
var01.bvar(prior=sznw,initcov=full,l0=0.1,l1=0.2,l3=2,mu1=0.4) 1 4  logy loginc logcons logmdcpi logccpi logwti logcpi logprod logw logemp ur ffr t10y r_aaa_m logsp500 dy_sp logfx  @ c @seas(1) @during("2008q4")

After that the confcast add-in works
For example:

Code: Select all

var01.confcast logy 2017q4 0.02

paolo.zanghieri
Posts: 19
Joined: Wed Mar 05, 2014 10:52 am

Re: Conditional VAR forecast

Postby paolo.zanghieri » Thu Apr 06, 2017 1:49 am

Thanks a lot. If I understand correctly I can fix just one variable, right?
Best
Paolo

dakila
Posts: 391
Joined: Tue Nov 24, 2015 4:57 pm

Re: Conditional VAR forecast

Postby dakila » Thu Apr 06, 2017 5:47 am

No. You can constrain more than one variable.
For example:
var01.confcast "logy logcons" "2017q4 2017q4" "0.02 0.03"

atbarbar
Posts: 1
Joined: Thu Aug 24, 2017 8:58 am

Re: Conditional VAR forecast

Postby atbarbar » Thu May 31, 2018 10:29 am

The documentation is quite difficult to understand and it does not include a more involved example in order to make things crystal-clear. What if I have a VAR defined on gdp, inlf. and urate, and I want to condition on GDP all the way from 2018Q2 to 2019Q4? IS the following correct?

var1.confcast(fsamp="2018q2 2019q4",suf=_c, graph=1) "gdp gdp gdp gdp gdp gdp gdp" "2018q2 2018q3 2018q4 2019q1 2019q2 2019q3 2019q4" "0.579 0.463 0.610 0.373 0.154 -0.053 -0.06"

And if I want to condition also on inflation? Is the following correct:

var1.confcast(fsamp="2018q2 2019q4",suf=_c, graph=1) "gdp gdp gdp gdp gdp gdp gdp cpi cpi cpi cpi cpi cpi cpi" "2018q2 2018q3 2018q4 2019q1 2019q2 2019q3 2019q4" "0.579 0.463 0.610 0.373 0.154 -0.053 -0.06 -1.55 -0.95 -1.54 -1.24 -1.29 -1.38 -1.37"

And above all, if that is correct, the documentation should make more clear that one has to write the changes from the last base period.

Also I did not understand what I have to write in the window-based interface. Do I have to write the same? or can I use shortcuts?

In general I think the implementation is very inconvenient since one most likley has the variables defined up to some time in the future, like in my case I had gdp defined all the way to 2019Q4 but I cannot submit that, I had to first compute the changes and then write down the string and than form that clunky expression. Can you please improve the procedure and put it in the standard VAR object with nex version of Eviews?

Thanks.
'
alex

'

dakila
Posts: 391
Joined: Tue Nov 24, 2015 4:57 pm

Re: Conditional VAR forecast

Postby dakila » Mon Jun 04, 2018 5:40 pm

the first one is correct.
the second one is wrong. It should be
var1.confcast(fsamp="2018q2 2019q4",suf=_c, graph=1) "gdp gdp gdp gdp gdp gdp gdp cpi cpi cpi cpi cpi cpi cpi" "2018q2 2018q3 2018q4 2019q1 2019q2 2019q3 2019q4 2018q2 2018q3 2018q4 2019q1 2019q2 2019q3 2019q4" "0.579 0.463 0.610 0.373 0.154 -0.053 -0.06 -1.55 -0.95 -1.54 -1.24 -1.29 -1.38 -1.37"

zmandalinci
Posts: 1
Joined: Mon Feb 10, 2020 6:43 am

Re: Conditional VAR forecast

Postby zmandalinci » Mon Feb 10, 2020 10:32 am

Hi All

Couple of questions if someone can help:

1- Should all the variables be in logs before VAR estimation?
2- Should the multi-period constraints be set as point constraints, or cumulative? For instance, imagine we have qoq GDP growth in the VAR (without the logs). We want to set GDP growth to +0.2 for three consecutive quarters. How would you implement this? Would below be correct?

var1.confcast(fsamp="2019q1 2019q4",suf=_c, graph=1) "gdp gdp " "2019q1 2019q2 2019q3" "+0.2 +0.2 +0.2"

Many thanks for your help in advance.

Best,

Z

dakila
Posts: 391
Joined: Tue Nov 24, 2015 4:57 pm

Re: Conditional VAR forecast

Postby dakila » Fri Feb 14, 2020 12:17 am

1- Should all the variables be in logs before VAR estimation?


It depends on your variable and VAR model.

2- Should the multi-period constraints be set as point constraints, or cumulative? For instance, imagine we have qoq GDP growth in the VAR (without the logs). We want to set GDP growth to +0.2 for three consecutive quarters. How would you implement this? Would below be correct?


Yes.

lotusfr
Posts: 1
Joined: Mon Jul 13, 2020 1:41 am

Re: Conditional VAR forecast

Postby lotusfr » Tue Jul 14, 2020 3:06 am

Hi dakila,
Thanks for the add-in. Is it possible for you to have an illutration for it?
I tried to use it but got error.
Attachments
confcast1.PNG
I assume the value or old_depen_rate at 2020Q3 is 1
confcast1.PNG (12.36 KiB) Viewed 201 times
confcast2.PNG
error message
confcast2.PNG (4.18 KiB) Viewed 201 times


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 3 guests