Size of shock in VAR

Questions and discussions on Vector Autoregressions
atanu
Posts: 8
Joined: Sat Sep 25, 2010 4:15 pm

Size of shock in VAR

Unread post by atanu »

Dear Tom, and other RATS users,

Just a very simple question: in a VAR where I have calculated the impulse response functions with a one standard deviation shock; how can I modify the code to a two standard deviation shock?

Thanks.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Size of shock in VAR

Unread post by TomDoan »

Assuming you're doing standard Cholesky shocks, use FACTOR=2.0*%DECOMP(%SIGMA). If you're doing anything else, just multiply the input shocks by 2. (You can also, of course, just multiply the responses by 2).
sebaschoo
Posts: 4
Joined: Tue Sep 13, 2016 10:45 am

Re: Size of shock in VAR

Unread post by sebaschoo »

Dear Tom,

As you suggested I used FACTOR=3.0*%DECOMP(%SIGMA) in order to compute a 3 stdv shock in the following way

Code: Select all

impulse(model=varmodel6,steps=nsteps,results=baseirfs,noprint,factor=3.0*%decomp(%sigma))

compute shocklabels=||"Foreign Interest Rate","GDP","Inflation","House Price","Exchange Rate","Monetary Policy"||[code]
compute varlabels=||"Foreign Interest Rate","GDP","Annual Inflation","Houce Index Price","Exchange Rate","Interest Rate"||

@mcvardodraws(model=varmodel6,draws=10000,steps=35)
@mcgraphirf(shock=shocklabels,varlabels=varlabels,include=||6,2,3,4,5||,page=byshocks,model=varmodel6,$
center=input,impulses=baseirfs)[/code]

But I have a problem, I pressume the error bands don't take into account the 3 stdv shock with the code I'm using.
Could you please help me with this issue?

Thank you !!!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Size of shock in VAR

Unread post by TomDoan »

Changing the one-off calculation on the IMPULSE instruction will have no effect on the @MCVARDODRAWS. You'll have to change that (using an FFUNCTION option) to use the adjusted shocks.

Again, I'm not sure what the point is. Everything will just be three times what it is for a one standard deviation shock.
sebaschoo
Posts: 4
Joined: Tue Sep 13, 2016 10:45 am

Re: Size of shock in VAR

Unread post by sebaschoo »

Thank you very much.

I just want to reflect in the model certain changes in the historical data of my country. For instance, during the final years of the 90s the interbank interest rate moved from 22.615% to 50.59% (in my data that means a 3 stdv shock aprox).

I'm quite new using RATS, I would appreciate a lot if you can help me with the FFUNCTION option in order to adjust the shocks.

Thanks a lot !!!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Size of shock in VAR

Unread post by TomDoan »

function ThreeX sigma model
type rect ThreeX
type symm sigma
type model model
*
compute ThreeX=3*%decomp(sigma)
end
*
@mcvardodraws(model=varmodel6,draws=10000,steps=35,ffunction=ThreeX)
sebaschoo
Posts: 4
Joined: Tue Sep 13, 2016 10:45 am

Re: Size of shock in VAR

Unread post by sebaschoo »

Million thanks Tom it worked perfectly !!! :D
Post Reply