Blanchard-Quah AER 1989 paper results

Use this forum for posting example programs or short bits of sample code.

Blanchard-Quah AER 1989 paper results

Postby TomDoan » Thu Jun 25, 2009 9:50 am

The set of attachments below do pretty much the full analysis from Blanchard-Quah(1989), "The Dynamic Effects of Aggregate Demand and Supply Disturbances", AER, vol 79, no. 4.

The BQEXAMPLE.RPF program file does everything that doesn't involve simulations. This includes the historical decomposition of the results of demand shocks and the calculation of the supply and demand shocks.

BQMONTE.RPF is the program file which handles the Monte Carlo analysis. BQMONTE.RPF uses the specialized procedure @BQDODRAWS to do the draws for the B-Q model---this is different from a standard MC integration because the long-run impact matrix has to be recomputed with each draw for the coefficients. This also uses @MCGRAPHIRF and @MCFEVDTABLE for post-processing of the results of the Monte Carlo draws.

bqexample.rpf
Historical decomposition/supply and demand shocks
(4.92 KiB) Downloaded 559 times

bqmonte.rpf
Monte Carlo simulations
(2.76 KiB) Downloaded 322 times

bqdodraws.src
Monte Carlo draws for B-Q model
(3.11 KiB) Downloaded 309 times

bqdata.xls
Data file
(11.8 KiB) Downloaded 665 times
Last edited by TomDoan on Thu Feb 20, 2014 11:15 am, edited 4 times in total.
Reason: Updated examples
TomDoan
 
Posts: 6592
Joined: Wed Nov 01, 2006 5:36 pm

Re: Blanchard-Quah AER 1989 paper results

Postby le_chien_de_feu » Mon Oct 05, 2009 3:47 pm

Hello,

i am new with RATS. I tried to replicate this paper using the codes previoisly posted using RATS 7.0.

The results for the impulse-response functions of unemplyment are exactly the same of the ones in the paper (the demand shock response is exactly the same, while the supply shock response is slighlty wider).

Unfortunately the GDP responses to the two shocks are very different from the paper. Does anybody else tried to do it? Do you have the same different results?

Thanks, waiting for a reply.
le_chien_de_feu
 
Posts: 1
Joined: Mon Oct 05, 2009 10:09 am

Re: Blanchard-Quah AER 1989 paper results

Postby TomDoan » Mon Oct 05, 2009 5:27 pm

If you're talking about the error bands, read the comments at the top of bqmonte.prg.
TomDoan
 
Posts: 6592
Joined: Wed Nov 01, 2006 5:36 pm

Re: Blanchard-Quah AER 1989 paper results

Postby asdavies6032 » Sat Feb 20, 2010 9:03 am

What kind of modifications do I need to make to Blanchard and Quah for more than 2 variables
Albert
asdavies6032
 
Posts: 7
Joined: Sat Feb 13, 2010 5:13 am

Re: Blanchard-Quah AER 1989 paper results

Postby TomDoan » Mon Feb 22, 2010 8:57 am

asdavies6032 wrote:What kind of modifications do I need to make to Blanchard and Quah for more than 2 variables
Albert


The direct extension of BQ is fairly simple, since %BQFACTOR will work with any size VAR. However, it tends to be uninteresting, since it requires that you have one shock which has no permanent effects on y2 and another have no permanent effects on y1 and y2 which isn't a very likely pattern. Once you get above two variables, you usually need to go with a combination of short and long run restrictions. See 7.5.3 in the Version 8 User's Guide (10.5.3 for the Version 7 UG). See also the Gali QJE 1992 examples.
TomDoan
 
Posts: 6592
Joined: Wed Nov 01, 2006 5:36 pm

Re: Blanchard-Quah AER 1989 paper results

Postby ivory4 » Wed Sep 08, 2010 8:09 pm

Code: Select all
set loggnp = log(gnp)
set loggd  = log(gd87)
set logrgnp = loggnp-loggd+log(100)
set dlogrgnp = 100.0*(logrgnp-logrgnp{1})


What is gd87?
ivory4
 
Posts: 146
Joined: Mon Aug 24, 2009 12:16 pm

Re: Blanchard-Quah AER 1989 paper results

Postby TomDoan » Wed Sep 08, 2010 9:30 pm

ivory4 wrote:
Code: Select all
set loggnp = log(gnp)
set loggd  = log(gd87)
set logrgnp = loggnp-loggd+log(100)
set dlogrgnp = 100.0*(logrgnp-logrgnp{1})


What is gd87?


GD87 is the GNP deflator. GNP is nominal GNP.
TomDoan
 
Posts: 6592
Joined: Wed Nov 01, 2006 5:36 pm

Re: Blanchard-Quah AER 1989 paper results

Postby Sonica Singhi » Wed Aug 15, 2012 10:34 am

Hello
I am new to Rats. I tried to replicate the Blanchard Quah paper and could successfully do it. However, i have got few questions pertaining that -
1.The data involves LHMUR series. what is the full form of LHMUR? Also in the codes we use URADJUST. Does URADJUST means unempolyment detrended?
2. I want to replicate the article for UK economy.what data should i procure - Is it Level of GNP and rate of unemployment? However,the unemployment rate data of UK is nonstationary in levels and stationary in the first difference.What do you think i can do now?
3 Can i directly use the attachment named BQEXTRAS-ZIP that is uploaded in the forum?
4. I want to conduct a granger causality test for the two variables in Blanchard and Quah. Could you please hep me sending the codes for the same?

Many Thanks
Sonica
Sonica Singhi
 
Posts: 1
Joined: Wed Aug 15, 2012 8:19 am

Re: Blanchard-Quah AER 1989 paper results

Postby TomDoan » Wed Aug 15, 2012 2:12 pm

Sonica Singhi wrote:Hello
I am new to Rats. I tried to replicate the Blanchard Quah paper and could successfully do it. However, i have got few questions pertaining that -
1.The data involves LHMUR series. what is the full form of LHMUR? Also in the codes we use URADJUST. Does URADJUST means unempolyment detrended?
2. I want to replicate the article for UK economy.what data should i procure - Is it Level of GNP and rate of unemployment? However,the unemployment rate data of UK is nonstationary in levels and stationary in the first difference.What do you think i can do now?
3 Can i directly use the attachment named BQEXTRAS-ZIP that is uploaded in the forum?
4. I want to conduct a granger causality test for the two variables in Blanchard and Quah. Could you please hep me sending the codes for the same?

Many Thanks
Sonica


The data actually used in the model are adjusted quite a bit from the observed values. You'll have to check the original paper to get the sources. However, yes, URADJUST is the unemployment rate detrended and the GDP series is in growth rates, which have had separate means extracted from different ranges. The model assumes the data are stationary, so these transformations were done to get rid of what were seen as obvious problems. However, I'm not sure anyone would detrend the unemployment rate any longer.

If you have a current version of RATS, use the Blanchard Quah programs on that.

I wouldn't be concerned about whether U has a unit root. The long-run zero restriction is on the growth of GDP, not on unemployment, so the identification of the demand shock isn't affected by the long run response of unemployment.

There's nothing special about doing a Granger causality test for this pair of variables. However, the whole B-Q model isn't very interesting if U doesn't Granger cause Y---the supply shock will then have to be the innovation to Y.
TomDoan
 
Posts: 6592
Joined: Wed Nov 01, 2006 5:36 pm

Re: Blanchard-Quah AER 1989 paper results

Postby FRegensburg » Mon Apr 15, 2013 9:41 am

Dear Mr Doan,

I was hoping to get some advice from you on how to adapt the BQ procedure to a country other than the US, and I apologise in advance for the pedestrian nature of my questions. (By the way, all I’m after really is the measure of the output gap predicted by the model, I’m aware that you’ve written a code specifically for that, but I think it would be easier for me to just use the BQ code as I’m just starting to come to grips with the software). There are three things that I’m concerned about: the NBER classification of peaks and troughs, the dummy variables, again, specific to the US, and how to obtain figures from two graphs.


How shall I extract the means without regressing the series against two dummies, i.e.:
set dummy1 = t<=1973:4
set dummy2 = t>1973:4
linreg dlogrgnp
# dummy1 dummy2
set gdpadjust = %resids
prj means_from_gnp

I thought the following lines referred to the US business cycle, obviously I’m missing something here, because if I remove them, I somehow get rid of the graph to which they apply as well.

@NBERCycles(peaks=peaks,trough=troughs)
*
* This gets the scale correct for the spikes showing the peaks and troughs
*
set peaks = .10*peaks
set troughs = -.10*troughs
graph(footer="Figure 8. Output Fluctuations Due to Demand",$
ovcount=2,overlay=spike,ovsame) 3
# histdecomp(3,1)
# peaks 1950:2 * 2
# troughs 1950:2 * 2


what shall I add to the following lines to extract the output gap numbers?

graph(footer="Figure 8. Output Fluctuations Due to Demand",$
ovcount=2,overlay=spike,ovsame) 3
# histdecomp(3,1)
# peaks 1950:2 * 2
# troughs 1950:2 * 2

…as well as to these lines to get the figures for trend GDP?

set lessdemand = histdecomp(1,1)+histdecomp(2,1)
graph(footer="Figure 7. Output Fluctuations Absent Demand")
# lessdemand


Many thanks in advance!
FRegensburg
 
Posts: 6
Joined: Mon Sep 03, 2012 7:09 pm

Re: Blanchard-Quah AER 1989 paper results

Postby TomDoan » Mon Apr 15, 2013 11:28 am

FRegensburg wrote:Dear Mr Doan,

I was hoping to get some advice from you on how to adapt the BQ procedure to a country other than the US, and I apologise in advance for the pedestrian nature of my questions. (By the way, all I’m after really is the measure of the output gap predicted by the model, I’m aware that you’ve written a code specifically for that, but I think it would be easier for me to just use the BQ code as I’m just starting to come to grips with the software). There are three things that I’m concerned about: the NBER classification of peaks and troughs, the dummy variables, again, specific to the US, and how to obtain figures from two graphs.


How shall I extract the means without regressing the series against two dummies, i.e.:
set dummy1 = t<=1973:4
set dummy2 = t>1973:4
linreg dlogrgnp
# dummy1 dummy2
set gdpadjust = %resids
prj means_from_gnp


diff(center) dlogrgnp / gdpadjust

would pull a single mean out of the data.

FRegensburg wrote:I thought the following lines referred to the US business cycle, obviously I’m missing something here, because if I remove them, I somehow get rid of the graph to which they apply as well.

@NBERCycles(peaks=peaks,trough=troughs)
*
* This gets the scale correct for the spikes showing the peaks and troughs
*
set peaks = .10*peaks
set troughs = -.10*troughs
graph(footer="Figure 8. Output Fluctuations Due to Demand",$
ovcount=2,overlay=spike,ovsame) 3
# histdecomp(3,1)
# peaks 1950:2 * 2
# troughs 1950:2 * 2


what shall I add to the following lines to extract the output gap numbers?

graph(footer="Figure 8. Output Fluctuations Due to Demand",$
ovcount=2,overlay=spike,ovsame) 3
# histdecomp(3,1)
# peaks 1950:2 * 2
# troughs 1950:2 * 2

…as well as to these lines to get the figures for trend GDP?

set lessdemand = histdecomp(1,1)+histdecomp(2,1)
graph(footer="Figure 7. Output Fluctuations Absent Demand")
# less demand


Many thanks in advance!


If you want to get rid of the peaks and troughs part, just do:

graph(footer="Figure 8. Output Fluctuations Due to Demand") 1
# histdecomp(3,1)

This is correct if you get rid of the extra space in "less demand" on the # line.

set lessdemand = histdecomp(1,1)+histdecomp(2,1)
graph(footer="Figure 7. Output Fluctuations Absent Demand")
# less demand
TomDoan
 
Posts: 6592
Joined: Wed Nov 01, 2006 5:36 pm

Re: Blanchard-Quah AER 1989 paper results

Postby FRegensburg » Mon Apr 15, 2013 8:12 pm

Thanks a lot for that. To a novice, there is something slightly god-like about things materialising after the right words, as it were.
In your original code, you added the means previously removed back into GDP to get the BQ equivalent of potential output, via the line:

set histdecomp(1,1) = histdecomp(1,1)+means_from_gnp

When, however, one mean is taken out, that is:

diff(center) dlogrgnp / gdpadjust

Like you indicated, how do I go about storing it so that I can add it back in, as above?

Many thanks
FRegensburg
 
Posts: 6
Joined: Mon Sep 03, 2012 7:09 pm

Re: Blanchard-Quah AER 1989 paper results

Postby TomDoan » Sat May 25, 2013 11:04 am

If you do it right away, before something else redefines %mean:

diff(center) dlogrgnp / gdpadjust
set means_from_gnp = %mean
TomDoan
 
Posts: 6592
Joined: Wed Nov 01, 2006 5:36 pm

Re: Blanchard-Quah AER 1989 paper results

Postby KOBE24 » Thu Feb 20, 2014 10:24 am

Dear Tom,

sorry for the silly question, but I am relatively new in dealing with counterfactuals.
Hence, I apologize in advance for lack of precision and mistakes in what follows.

In the BQ (1989) code, to replicate the graph "Output fluctuations absent demand disturbances" we write the following line

Code: Select all
set lessdemand = histdecomp(1,1)+histdecomp(2,1)
graph(footer="Figure 7. Output Fluctuations Absent Demand")
# lessdemand


If I correctly understand, this should be equivalent to a measure of potential output, that is the cumulated sum of technology shocks.

But then, to replicate the graph "Output fluctuations due to demand disturbances"
we write the following

Code: Select all
set peaks   = .10*peaks
set troughs = -.10*troughs
*
graph(footer="Figure 8. Output Fluctuations Due to Demand",$
  ovcount=2,overlay=spike,ovsame) 1
# histdecomp(2,1)
# peaks    1950:2 * 2
# troughs  1950:2 * 2


If I correctly understand, this should be equivalent to a measure of output--gap, i.e. the output path one should have observed if only demand shocks occurred.

So, i do not get how we have the same element (histdecomp(2,1)) in both the components, output--gap and potential output.


Could you please clarify this to me?

Thank you so much, your help would be really appreciated.

Kobe
KOBE24
 
Posts: 49
Joined: Tue Jul 21, 2009 9:10 am

Re: Blanchard-Quah AER 1989 paper results

Postby TomDoan » Thu Feb 20, 2014 11:04 am

You would be correct if that's what the program did, but the second graph has histdecomp(3,1) (which is the effect of demand shocks), not histdecomp(2,1) which is the effect of supply shocks.
TomDoan
 
Posts: 6592
Joined: Wed Nov 01, 2006 5:36 pm

Next

Return to Examples and Sample Code

Who is online

Users browsing this forum: No registered users and 0 guests

cron