Dear Tom,
I am struggling in understanding whether the IRFs of my VAR are satisfying my desired mix of zero and sign restrictions. As a matter of fact, I feel I am doing something wrong in imposing the zeros (i.e. building the matrices), but I hope to clarify in a second.
I basically have a 5 variables VAR model (oil price, policy rate, term spread, consumer prices and real GDP in that order just to have a candidate Cholesky as a starting point with some convenient choices for imposing zeros). I rely on codes based on Mountford -Uhlig (2009) and your suggestions (as I understood them).
1. The first thing I want to do is to impose that an aggregate supply shock has a zero impact on oil price (in order to disentangle "real" supply from oil supply disturbances)
2. the second one is to identify a spread compression shock (Baumeister & Benati, IJCB 2013), and to do so I put a zero on the policy rate.
3. finally, when looking at oil supply shocks, I also want to impose that they do not move the term spread on impact (zerio restriction).
Below is my code. Could you please tell me whether it is correct, based also on the graph that I am attaching? In particular, I do not get whether by using the constraints I posted below I should also see restricted to zero, for example, oil price in the unconventional monetary shock. In this case, I could have "well behaved" IRFs just by chance.
Thanks in advance for your time and help, I am really struggling on a deadline because of this.
Code: Select all
do subdraw=1,n2
******* =========================================================== *******
******* First in Order - Domestic supply shock (one zero on oil price) *******
******* =========================================================== *******
compute [vector] v1=%zeros(1,1)~~%ransphere(4)
if UhligAccept(v1,KMIN,KMAX,||+2,+4,-5||)==0
goto reject
compute i1=p*v1
******* =========================================================== *******
******* Second in Order - Unconventional MP shock(one zero on rate) *******
******* =========================================================== *******
dec rect r(1,nvar)
ewise r(i,j)=ix=%xt(impulses,i),ix(2,j)
@forcedfactor(force=column) sigmad i1~p*tr(r) f
compute r2=inv(p)*%xsubmat(f,1,nvar,2,nvar)
compute [vector] v2=r2*(%zeros(1,1)~~%ransphere(nvar-2))
if UhligAccept(v2,KMIN,KMAX,||-3,+4,+5||)==0
goto reject
compute i2=p*v2
******* =========================================================== *******
******* Third in Order - Oil Supply Shock (one zero on tspread) *******
******* =========================================================== *******
dec rect r(1,nvar)
ewise r(i,j)=ix=%xt(impulses,i),ix(3,j)
@forcedfactor(force=column) sigmad i1~i2~p*tr(r) f
compute r3=inv(p)*%xsubmat(f,1,nvar,3,nvar)
compute [vector] v3 = r3*(%zeros(1,1)~~%ransphere(nvar-3))
if UhligAccept(v3,KMIN,KMAX,||+1,+4,-5||)==0
goto reject
compute i3=p*v3
*dis v3