Page 1 of 1

negative shocks to impulse response function

Posted: Thu Sep 30, 2010 10:27 am
by chssb10
Anyone can help???

I'm actually running a model to study the impact of monetary policy on asset prices.
A positive shock on interest rate can only allow me to see the impact of a contractionary monetary policy on asset prices.
What I am more interested in looking at is the impact of an expansionary monetary policy on asset prrices.

So, I'm just wondering whether Eviews can give a negative shock to interest rate (which means an expansionary monetary policy".

THANKS !!!!

Re: negative shocks to impulse response function

Posted: Thu Sep 30, 2010 11:07 am
by startz
Is there anything asymmetric in your model? Does the sign of the shocks make any difference except to the direction of the response?

Re: negative shocks to impulse response function

Posted: Thu Sep 30, 2010 11:53 am
by EViews Glenn
From the EViews User's Guide (which is a pretty good place to look)...

User Specified allows you to specify your own impulses. Create a matrix (or vector) that contains the impulses and type the name of that matrix in the edit box. If the VAR has k endogenous variables, the impulse matrix must have k rows and 1 or k columns, where each column is a impulse vector.
For example, say you have a k=3 variable VAR and wish to apply simultaneously a positive one unit shock to the first variable and a negative one unit shock to the second variable. Then you will create a 3x1 impulse matrix containing the values 1, -1, and 0. Using commands, you can enter:
matrix(3,1) shock
shock.fill(by=c) 1,-1,0
and type the name of the matrix SHOCK in the edit box.

Re: negative shocks to impulse response function

Posted: Fri Oct 01, 2010 6:23 am
by chssb10
Re: startz

I'd like to have a negative shock since I identify the money supply shocks through interest rate.
A negative shock to interest rate will then imply a positive money supply shock, which will allow me to give a better interpretation to the result, given that my aim is to test whether an asset price bubble is fuelled by the loose monetary policy.

Re: Eviews Glenn

So, if I specify the shock by creating the matrix, is the impulse response generated based on the set of short-run identification scheme that I've imposed?

Re: negative shocks to impulse response function

Posted: Fri Oct 01, 2010 6:25 am
by startz
Glenn has given you a detailed approach. But most VARs are symmetric. You may be able to use the standard results and reverse the sign.

Re: negative shocks to impulse response function

Posted: Fri Oct 01, 2010 6:32 am
by chssb10
Thanks so much.

In fact, I am running a structural VAR model with short-run restrictions.
I generate the impulse response functions by clicking the "structural decomposition" option.

So, there'll be no difference between the responses of a negative shock and a positive shock, right?

Re: negative shocks to impulse response function

Posted: Fri Oct 01, 2010 6:35 am
by startz
I think that's right, except for the sign of course. Glenn???

Re: negative shocks to impulse response function

Posted: Fri Oct 01, 2010 7:28 am
by chssb10
Thanks very much startz. =)

Re: negative shocks to impulse response function

Posted: Wed Feb 09, 2011 4:31 am
by Fenix
Hey guys! I have a similar question, which simplifies mostly to 'how do I reverse the sign?`

I have a symmetric VAR, it is a small sample and I want to use Cholesky dof adjusted. If I do it as the user guide (and Glenn) suggested, I get a shock, which is actually a residual shock (i.e. the shock imposed by my matrix produce identical results to the shocks of using 'residual - one unit'). However the IRs are different, depending on what you use and I would like to have the Cholesky dof. My VAR is symmetric, so I just need to reverse the signs, because I need the negative effects (for expositional purposes).

Thanks!


P.s. I hijacked this thread, because it regards similar problem and it would be easier for people later that search for it (the way I found this one). If you believe it is inappropriate, I will open a new thread.

Re: negative shocks to impulse response function

Posted: Sat Feb 12, 2011 12:58 pm
by Fenix
Anyone?

Re: negative shocks to impulse response function

Posted: Tue Nov 17, 2015 3:13 am
by IeehViews
After fiddling around a little I found the following solution to the problem of customising the sign of the impulses.

Having estimated a structural factorization using short-run restrictions, call

Code: Select all

my_var.impulse(imp = struct).

Save the impulses using

Code: Select all

matrix shock = my_var.@impfact

and reverse the sign of shock 2 and 5 using e.g.

Code: Select all

for !row = 1 to !series_tot
    shock(!row, 2) = shock(!row, 2) * (-1)
    shock(!row, 5) = shock(!row, 5) * (-1)
next

(How do you operate on whole columns in EViews????)

Now you can run

Code: Select all

 my_var.impulse(fname = shock)

and obtain the IRF graphs with the sign reversed for shock 2 and 5.

Re: negative shocks to impulse response function

Posted: Fri Jul 28, 2017 12:30 pm
by adrangi
Hi. I'm trying to also get the impulses to a negative shock. I know IRFs should be reversed however, for paper presentation purposes I'd like to present IRFs for negative shocks. Eviews Help and also on this thread I saw the commands. When I enter the command, I get an error message. It doesn't recognize the word "by". Here is what I have:

K=4 (4 variables in the VAR) recursive ordering one exogenous variable.

matrix (4,1) shockm
shockm.fill(by=c) -1,1,1,1

Error message : by is not defined! Any ideas?

Also I intend to enter the name of the matrix (once I get it) in the box for "user specified" Impulse definition. Would that be ok? any help is appreciated. Thanks. BA

Re: negative shocks to impulse response function

Posted: Fri Jul 28, 2017 2:52 pm
by EViews Matt
Hello,

Regarding the error, there should be no spaces between the .fill and its parenthetical options. You didn't include any such spaces in your post, but the error you describe occurs when spaces are present.

Re: negative shocks to impulse response function

Posted: Fri Jul 28, 2017 11:26 pm
by adrangi
HI. I figured it out. However, I don't think (by=c or r) works. There are other ways of doing this as I found out from online Help. Thanks. BA

Re: negative shocks to impulse response function

Posted: Sat Jul 29, 2017 6:25 am
by EViews Matt
The fill command as you've written it above, with no spaces between .fill and (by=c), works.