Page 1 of 1

Plotting IR before and after the shock in a unique figure

PostPosted: Sat Oct 05, 2013 5:42 pm
by Calo89
Hi everyone,

Normally I plot my Impulse Responses and what I observe is just the path followed by the variables immediately after the shock. But how can I manage to plot the path of the variables even when the shock is not yet occured, so that I have a unique figure in which there is not only the path followed by the variables after the shock but also their path immediately before that shock.
Thanks in advance!

Andrew

Re: Plotting IR before and after the shock in a unique figur

PostPosted: Sat Oct 05, 2013 6:41 pm
by AS90
IRFs analysis is executed so as to observe hypothetical business cycle conducts: deviations from the economy's steady state; anything before that is hardly germane. Such IRFs are but MA(inf) coefficients pursuant to the AR(1) initial process, provided causality conditions be met by it, plotted against time:

Code: Select all
y(t)=Ay(t-1)+e(t) - AR(1) (invertible)
y(t)-Ay(t-1)=e(t)
(I-AL)y(t)=e(t)
A(L)y(t)=e(t) - check for causality

min|z(i)|>1 for |I-Az|=0

y(t)=inv[A(L)]e(t)
y(t)=∑Aˆ(j)e(t-j) {with j=0 to inf for ∑, since inv[A(L)]=∑Aˆ(j)Lˆ(j)}
y(t)=Aˆ(0)e(t)+Aˆ(1)e(t-1)+Aˆ(2)e(t-2)+... - MA(inf) (causal)


.

Re: Plotting IR before and after the shock in a unique figur

PostPosted: Sun Oct 06, 2013 4:59 pm
by jpfeifer
The assumption when generating IRFs at order 1 is that the system was in steady state before the shock generating the IRFs hit. All IRFs are plotted relative to the steady state. Thus, the IRFs are simply 0 before the plotted periods. At higher order the issue is more involved as we are talking about Generalized IRFs.

Re: Plotting IR before and after the shock in a unique figur

PostPosted: Sun Oct 06, 2013 5:15 pm
by Calo89
Guys thank you for reply. Actually I know all these things you wrote, I just wondering the way I can plot that situation I described!

Re: Plotting IR before and after the shock in a unique figur

PostPosted: Sun Oct 06, 2013 6:06 pm
by jpfeifer
Then where is the problem? If you have a shock e and a variable y, you could just use
Code: Select all
 plot([-5:options_.irf],[zeros(6,1); y_e])

to plot the 6 periods of 0 preceeding the IRF for y in response to e.