Sign Restricted VAR

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Sign Restricted VAR

Postby dakila » Thu Jan 21, 2016 6:26 pm

This thread is about the srvar add-in that performs the estimation of Sign Restricted Vector Autoregression (SRVAR) models by using rejection and penalty function methods (Uhlig 2005).
Last edited by dakila on Sat Jan 05, 2019 3:10 pm, edited 2 times in total.

kkotarac
Posts: 3
Joined: Mon Feb 08, 2016 7:28 am

Re: Sign Restricted VAR

Postby kkotarac » Mon Feb 08, 2016 7:45 am

Hi!

Thank you for this really interesting add-in. Have you considered extending it with different priors and/or more than one structural shock?

Best regards.

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Sign Restricted VAR

Postby dakila » Tue Feb 09, 2016 4:47 am

Hi kkotarac,

Thanks for your comment. Actually it is good point. To ensure orthogonality of structural shocks, some people suggest to use QR decomposition for a rejection method. However I couldn't find the difference. So for identification of multiple shocks, just do it again for other shocks. For a penalty function method, it is bit tricky. I will revise it with different priors and may extend penalty function approach with multiple shocks.

kkotarac
Posts: 3
Joined: Mon Feb 08, 2016 7:28 am

Re: Sign Restricted VAR

Postby kkotarac » Wed Feb 10, 2016 3:28 am

Thank you very much for a quick answer. My colleagues and me are glad to her this. We were also wondering if you would maybe be willing to provide a source code so we could try to enhance it to allow for zero restrictions also (using Arias et al., 2014 algorithm)?

lillumultipass
Posts: 9
Joined: Fri Feb 12, 2016 3:33 am

Re: Sign Restricted VAR

Postby lillumultipass » Fri Feb 12, 2016 3:40 am

Dear sir,

thank you for this add-in. I am trying to estimate a bi-variate sign-restricted SVAR with daily oil and stock prices and two shocks (demand and supply).
The ultimate goal is to explain how much of the recent fall in oil prices stems from a demand shock (defined as a fall in both equity and oil prices) or a supply shock (defined as a rise in equity prices and a fall in oil prices).

After changing to program according to my needs, I get an error message just at the beginning: "Oil already exists and is of the wrong type in "VAR OIL.LS 1 7 OIL STOCKS @CONST"

VAR.OIL is the name I gave to my VAR, I have specified 7 lags and OIL and STOCKS are my 2 variables.
I don't understand what this error means.

thanks for your help!

lillumultipass
Posts: 9
Joined: Fri Feb 12, 2016 3:33 am

Re: Sign Restricted VAR

Postby lillumultipass » Fri Feb 12, 2016 4:27 am

I think I found the solution to my problem: apparently, having the same name for the VAR and one variable was not wise :D Changing it solved everything :-)

However, I get another error:

sizes do not match in matrix function in "MATRIX INVAIRF_DRAW = @CHOLESKY(SIGMA_DRAW)*@TRANSPOSE(S)"

It looks like I made a mistake in the specification of the matrix of the shocks right?
Here is what I have:

!nshocks=2
for !r=1 to !nshocks
matrix(!nvar,3) R{!r}
next

string s1= "Demand Shock"
R1.fill(b=r) 0,0,1,0,0,1

string s2= "supply Shock"
R2.fill(b=r) 0,0,-1,0,0,1

thank you!

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Sign Restricted VAR

Postby dakila » Fri Feb 12, 2016 6:03 am

Did you read the instruction carefully?

lillumultipass
Posts: 9
Joined: Fri Feb 12, 2016 3:33 am

Re: Sign Restricted VAR

Postby lillumultipass » Fri Feb 12, 2016 6:37 am

dakila wrote:Did you read the instruction carefully?


well, yes, I did, but I indeed don't really get the way the matrices are specified. Reading "To leave unrestricted set all three columns to zero" led me to put 0 0 in the first 2 columns as I did not want to put restrictions as to which periods the restrictions are imposed. But I think I should put 1 1 actually if I impose a restriction in the last column.

That's what I did and it is running : I am glad :-)
I may have set a too high number of draws however, because it is taking quite some time :-)

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: Sign Restricted VAR

Postby CharlieEVIEWS » Wed Feb 17, 2016 8:23 am

I'd like to emphasize support for this brilliant add-in. Thanks to the creator indeed!

nadybe
Posts: 12
Joined: Wed Mar 30, 2016 7:52 am

Re: Sign Restricted VAR

Postby nadybe » Thu Apr 07, 2016 4:07 am

my question may be obvious os stupid but where can you find the instructions for this add ins?

Than you very much

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Sign Restricted VAR

Postby dakila » Thu Apr 07, 2016 7:08 am

C:\Users\...\Documents\EViews Addins\srvar

naderian.amin
Posts: 1
Joined: Mon May 02, 2011 7:32 am

Re: Sign Restricted VAR

Postby naderian.amin » Mon Apr 11, 2016 6:27 am

Dear Dakila,

I am trying to use this helpful add-ins to estimate a sign-restricted var for a three variable Killian model on the structure of crude oil market. However, I can not understand how it is possible to enter separate restrictions on contemporaneous impact of three distinct structural shocks (supply shocks, global demand shocks and residual shocks). As I use a 3*3 matrix of 1,0, -1 for each structural shock, it will return "no numeric argument" error.
Would you please kindly help me in this regard?

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Sign Restricted VAR

Postby dakila » Mon Apr 11, 2016 7:02 am

Did you read the instruction? If you want the impulse responses to be positive on the first variable and negative on the 3rd, you would use +1, −3 on the sign restriction box. For command line case, you should create a vector for constraint. For example, vector constraint =@fill(+1, −3). Do not use matrix.

wda
Posts: 1
Joined: Fri Jun 10, 2016 9:15 am

Re: Sign Restricted VAR

Postby wda » Fri Jun 10, 2016 9:49 am

Dear Dakila,

Considering the sign restriction vector, I would like to know if the order matters or, alternatively, if, for example, the first element of constr indicates the shock of interest in the model.

Thank you in advance

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Sign Restricted VAR

Postby dakila » Sat Jun 11, 2016 4:51 am

No


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 17 guests