negative shocks to impulse response function

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

chssb10
Posts: 7
Joined: Tue Sep 21, 2010 7:02 pm

negative shocks to impulse response function

Postby chssb10 » Thu Sep 30, 2010 10:27 am

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 !!!!

startz
Non-normality and collinearity are NOT problems!
Posts: 3179
Joined: Wed Sep 17, 2008 2:25 pm

Re: negative shocks to impulse response function

Postby startz » Thu Sep 30, 2010 11:07 am

Is there anything asymmetric in your model? Does the sign of the shocks make any difference except to the direction of the response?

EViews Glenn
EViews Developer
Posts: 2555
Joined: Wed Oct 15, 2008 9:17 am

Re: negative shocks to impulse response function

Postby EViews Glenn » Thu Sep 30, 2010 11:53 am

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.

chssb10
Posts: 7
Joined: Tue Sep 21, 2010 7:02 pm

Re: negative shocks to impulse response function

Postby chssb10 » Fri Oct 01, 2010 6:23 am

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?

startz
Non-normality and collinearity are NOT problems!
Posts: 3179
Joined: Wed Sep 17, 2008 2:25 pm

Re: negative shocks to impulse response function

Postby startz » Fri Oct 01, 2010 6:25 am

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.

chssb10
Posts: 7
Joined: Tue Sep 21, 2010 7:02 pm

Re: negative shocks to impulse response function

Postby chssb10 » Fri Oct 01, 2010 6:32 am

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?

startz
Non-normality and collinearity are NOT problems!
Posts: 3179
Joined: Wed Sep 17, 2008 2:25 pm

Re: negative shocks to impulse response function

Postby startz » Fri Oct 01, 2010 6:35 am

I think that's right, except for the sign of course. Glenn???

chssb10
Posts: 7
Joined: Tue Sep 21, 2010 7:02 pm

Re: negative shocks to impulse response function

Postby chssb10 » Fri Oct 01, 2010 7:28 am

Thanks very much startz. =)

Fenix
Posts: 8
Joined: Fri Feb 04, 2011 10:52 am

Re: negative shocks to impulse response function

Postby Fenix » Wed Feb 09, 2011 4:31 am

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.
I am using Eviews 5.0

Fenix
Posts: 8
Joined: Fri Feb 04, 2011 10:52 am

Re: negative shocks to impulse response function

Postby Fenix » Sat Feb 12, 2011 12:58 pm

Anyone?

IeehViews
Posts: 1
Joined: Tue Nov 17, 2015 3:01 am

Re: negative shocks to impulse response function

Postby IeehViews » Tue Nov 17, 2015 3:13 am

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.

adrangi
Posts: 18
Joined: Sat Dec 05, 2009 5:56 pm

Re: negative shocks to impulse response function

Postby adrangi » Fri Jul 28, 2017 12:30 pm

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

EViews Matt
EViews Developer
Posts: 162
Joined: Thu Apr 25, 2013 7:48 pm

Re: negative shocks to impulse response function

Postby EViews Matt » Fri Jul 28, 2017 2:52 pm

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.

adrangi
Posts: 18
Joined: Sat Dec 05, 2009 5:56 pm

Re: negative shocks to impulse response function

Postby adrangi » Fri Jul 28, 2017 11:26 pm

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

EViews Matt
EViews Developer
Posts: 162
Joined: Thu Apr 25, 2013 7:48 pm

Re: negative shocks to impulse response function

Postby EViews Matt » Sat Jul 29, 2017 6:25 am

The fill command as you've written it above, with no spaces between .fill and (by=c), works.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 8 guests