Page 2 of 2

Re: Conditional VAR forecast

Posted: Tue Apr 04, 2017 7:51 am
by dakila
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

Re: Conditional VAR forecast

Posted: Thu Apr 06, 2017 1:49 am
by paolo.zanghieri
Thanks a lot. If I understand correctly I can fix just one variable, right?
Best
Paolo

Re: Conditional VAR forecast

Posted: Thu Apr 06, 2017 5:47 am
by dakila
No. You can constrain more than one variable.
For example:
var01.confcast "logy logcons" "2017q4 2017q4" "0.02 0.03"

Re: Conditional VAR forecast

Posted: Thu May 31, 2018 10:29 am
by atbarbar
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

'

Re: Conditional VAR forecast

Posted: Mon Jun 04, 2018 5:40 pm
by dakila
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"

Re: Conditional VAR forecast

Posted: Mon Feb 10, 2020 10:32 am
by zmandalinci
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

Re: Conditional VAR forecast

Posted: Fri Feb 14, 2020 12:17 am
by dakila
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.

Re: Conditional VAR forecast

Posted: Tue Jul 14, 2020 3:06 am
by lotusfr
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.