RATS 11.1
RATS 11.1

Paper Replications /

Farrant Peersman JMCB 2006

Home Page

← Previous Next →

This is a set of replication files for Farrant and Peersman(2006). From the abstract:

 

"This paper analyses the role of the real exchange rate in a structural vector autoregression framework for the United Kingdom, Euro area, Japan, and Canada vis-a-vis the United States. A new identification strategy is pro- posed building on sign restrictions. The results are compared to the bench-mark conventional approach of Clarida and Gali (1994) based on long- run zero restrictions. Although the restrictions are derived from the same theoretical model, the results are strikingly different. In contrast to the benchmark model, an important role for nominal shocks in explaining real exchange rate fluctuations is found. Hence, the exchange rate can rather be considered as a source of shocks instead of a shock absorber."

 

The data used are differentials (or log ratios) in each zone compared with the U.S. (Raw data are provided, so the differentials are computed as needed).

 

\(Y-Y^*\)

100 times log ratio of real output

\(P-P^*\)

100 times log ratio of prices

\(i-i^*\)

interest rate differential

\(Q\)

100 times log real exchange rate

 

The raw data have the forms: Yzzz for real output, CPzzz for consumer prices, STzzz for interest rates and BXzzz for bilateral exchange rates vs the U.S. (in local currency per US$). The zzz is the zone, which is UK for the United Kingdom, EMU for the Euro area, JP for Japan, CA for Canada and US for the United States.

 

This has three separate programs which have a common structure as they all do all four zones. Given the naming conventions on the data, this is done by looping over the zone suffixes. To make the output more readable, they define a HASH[STRING] to provide a long description corresponding to each of the short zone strings:

 

dec hash[string] longname

compute longname("uk")="United Kingdom"

compute longname("emu")="Euro Area"

compute longname("jp")="Japan"

compute longname("ca")="Canada"

 

The common pseudo-code is:

 

dofor [string] zone = "uk" "emu" "jp" "ca"

 ...

 do analysis for zone

 ...

end dofor string

 

Inside the loop, the %S function is used repeatedly to do transformations of the raw data into the needed differentials. For instance, %s("cp"+zone) is the series whose name is CPzzz where zzz in the current value of the ZONE string, thus CPUK for the first trip through, CPEMU for the second, etc. These compute the log ratio of the price levels between the zone and U.S., the log real exchange rate and log ratio of zone real GDP to US real GDP.

 

set lp  = 100.0*(log(%s("cp"+zone))-log(cpus))

set lrx = 100.0*log(%s("bx"+zone))+lp

set ly  = 100.0*(log(%s("y"+zone))-log(yus))

 

The VAR's are estimated in first differences for all variables other than the interest rate spread.

 

set dp  = lp-lp{1}

set drx = lrx-lrx{1}

set dy  = ly-ly{1}

 

The number of lags used varies from zone to zone and model to model. It is chosen by the minimum AIC (done in these programs using the @VARLagSelect procedure). The maximum number of lags is not provided in the paper, but the programs here use 8:

 

@varlagselect(lags=8,crit=aic,model=var4) 1974:1 2002:4

# dy dp s drx

  

The Programs

CLARIDA_GALI_MODEL.RPF

This applies the long-run restrictions model from Clarida-Gali(1994) to updated data for the four currency zones.

 

 

SIGNRESTRICTION3.RPF

This does a three variable model (omitting interest rates) with three shocks identified using sign restrictions—those are described as "supply", "demand" and "nominal" shocks. 


 

SIGNRESTRICTION4.RPF

This does a four variable model with four shocks identified using sign restrictions—those are described as "supply", "demand", and the nominal shocks are separated into "monetary" and "exchange rate".

 

CLARIDA_GALI_MODEL.RPF

Thie Clarida-Gali model is a 3-variable structural VAR identified entirely through long-run restrictions model. This is a recursive arrangement with the real GDP difference first, real exchange rate second and real price ratio third. The identified shocks are described as "Supply", "Demand" and "Nominal" so the "Nominal Shock" has no long-run effect on either real GDP or exchange rates, while the "Demand" shock has no long-run effect on real GDP.

 

The structural model has a constructive solution (using the %BQFACTOR function), but it's important to be careful about the signs of the responses (the factor determines only the shape and not the signs of the shocks) and the dependence of the factor upon the lag sums of the VAR which change as you draw new coefficients as part of Monte Carlo integration to get error bands. This function takes the covariance matrix and model coefficients and returns the factor of the covariance matrix with the long-run restrictions, normalized to have each shock have a positive impact on the real GDP variable (variable 1). 

 

function CGFactor sigma model

type rect CGFactor

type symm sigma

type model model

*

compute CGFactor=%bqfactor(sigma,%modellagsums(model))

@ImpactSignFlip CGFactor ||+1,+1,+1||

end

 

This selects and estimates the VAR model (with the variables in the proper order given the long-run model). This uses a common estimation range for all the VAR's regardless of the number of lags chosen.

 

@varlagselect(lags=8,crit=aic,model=cgmodel) 1974:1 2002:4

# dy drx dp

estimate(model=cgmodel) 1974:1 2002:4

 

The Monte Carlo draws are done using @MCVARDoDraws, using the CGFactor function as the input FFUNCTION (factor function) and accumulating all three dependent variables (which were all done in differenced form).

 

   @MCVARDoDraws(model=cgmodel,ffunction=CGFactor,accum=||1,2,3||,steps=nsteps,draws=ndraws)

 

The Monte Carlo draws are first processed by @MCGraphIRF to do the error bands (in a 3 x 3 matrix of graphs). This uses the LONGNAME hash described above for adding a descriptive header to the graph for the zone:

 

@MCGraphIRF(model=cgmodel,shocklabels=||"Supply","Demand","Nominal"||,varlabels=||"Y-Y*","Q","P-P*"||,$

   header="Clarida-Gali Model, Zone "+longname(zone),picture="##.##",center=median)

 

Then @MCFEVDTable is applied to display the Variance Decomposition. (This shows only a handful of horizons because the FEVD is generally quite smooth so there isn't much difference between, for instance, steps 15 and 20).

 

@MCFEVDTable(model=cgmodel,shocklabels=||"Supply","Demand","Nominal"||,$

    varlabels=||"Y-Y*","Q","P-P*"||,horizons=||1,4,20||)

 

SIGNRESTRICTION3.RPF

This is the first of two alternative models which use sign restrictions to identify the shocks. This uses the same three variables as the Clarida-Gali model and again describes the three shocks as "Supply", "Demand" and "Nominal". With the variables in the order: real GDP, prices, exchange rate, the supply shock has constrained to have a positive (technically non-negative, though we will shorten that to "positive") effect on GDP (variable 1) for the first four periods and negative (non-positive) on prices (variable 2). Using the SignDesc notation needed for using @MCSignRestrict, this is described as:

 

dec SignDesc SupplyDesc(2)

compute SupplyDesc(1)=||+1,1,4||

compute SupplyDesc(2)=||-2,1,4||

 

Note that this counts steps beginning with 1 for the "impact" (which counts them as forecast steps).

 

The demand shock is positive on GDP and also on prices. In addition, there is an assumption of a negative effect on exchange rates (variable 3), but only for the first period. This is described as:

 

dec SignDesc DemandDesc(3)

compute DemandDesc(1)=||+1,1,4||

compute DemandDesc(2)=||+2,1,4||

compute DemandDesc(3)=||-3,1,1||

 

Finally, the nominal shock has positive effect on GDP and prices, but now a positive impact on exchange rates:

 

dec SignDesc NominalDesc(3)

compute NominalDesc(1)=||+1,1,4||

compute NominalDesc(2)=||+2,1,4||

compute NominalDesc(3)=||+3,1,1||

 

The full set of constraints is:

 

compute [vect[SignDesc]] SignConstraints=||SupplyDesc,DemandDesc,NominalDesc||

 

Inside the loop across zones, we again estimate the VAR in differences, with the lag length chosen using @VARLagSelect:

 

@varlagselect(lags=8,crit=aic,model=var3) 1974:1 2002:4

# dy dp drx

estimate(model=var3) 1974:1 2002:4

 

The model with sign restrictions is simulated with @MCSignRestrict. Note that the restrictions are on the levels, not the differences, so the ACCUM option is applied to all three variables—the tests of the sign restrictions are done on the accumulated variables. To get 10000 valid draws (the number requested in the NKEEP variable), this needs a significant increase in the number of outer VAR draws (to 5000):

 

@MCSignRestrict(model=var3,nsteps=nsteps,constraints=SignConstraints,$

    accum=||1,2,3||,nkeep=nkeep,vardraws=VARDraws)

 

As with the Clarida-Gali model, this converts the draws into graphs and a table of variance decompositions.

 

@MCGraphIRF(model=var3,shocklabels=sl,varlabels=vl,$

    header="Sign Restrictions, 3 Variable Model, Zone "+longname(zone),picture="##.##",center=median)

@MCFEVDTable(model=var3,shocklabels=sl,varlabels=vl,horizons=||1,4,20||)

 

SIGNRESTRICTION4.RPF

This is similar to SIGNRESTRICTION3.RPF, but adds the interest rate differential as a fourth series in the model and splits the "nominal" shock into "monetary" and "exchange" shocks. With the variables in the order GDP, price, interest rates and exchange rates (the order of the variables in the table of restrictions in the paper), the supply shock is again:

 

dec SignDesc SupplyDesc(2)

compute SupplyDesc(1)=||+1,1,4||

compute SupplyDesc(2)=||-2,1,4|| 

 

The demand shock is similar to that in the three variable model, but adds a positive effect on interest rates (for steps 1 to 4). Note exchange rates is now variable 4, so the exchange rates negative impact is written as -4,1,1.

 

dec SignDesc DemandDesc(4)

compute DemandDesc(1)=||+1,1,4||

compute DemandDesc(2)=||+2,1,4||

compute DemandDesc(3)=||+3,1,4||

compute DemandDesc(4)=||-4,1,1||

 

The monetary shock has positive effects on GDP, prices and exchange rates, and negative on interest rates.

 

dec SignDesc MonetaryDesc(4)

compute MonetaryDesc(1)=||+1,1,4||

compute MonetaryDesc(2)=||+2,1,4||

compute MonetaryDesc(3)=||-3,1,4||

compute MonetaryDesc(4)=||+4,1,1||

 

while the exchange rate shock is the same except for being positive on interest rates.

 

dec SignDesc ExchangeDesc(4)

compute ExchangeDesc(1)=||+1,1,4||

compute ExchangeDesc(2)=||+2,1,4||

compute ExchangeDesc(3)=||+3,1,4||

compute ExchangeDesc(4)=||+4,1,1||

 

The full set of constraints is:

 

compute [vect[SignDesc]] SignConstraints=||SupplyDesc,DemandDesc,MonetaryDesc,ExchangeDesc||

 

Inside the zone loop, the VAR is run in differences for all variables except the interest rate, with lags chosen using @VARLagSelect:

 

@varlagselect(lags=8,crit=aic,model=var4) 1974:1 2002:4

# dy dp s drx

estimate(model=var4) 1974:1 2002:4

 

This needs a very large number of draws to get 10000 that work, particularly for Japan. This is set for 10000 VAR draws and 20000 subdraws. Note that all series are accumulated (from the model in differences) other than the interest rates, which weren't differenced.

 

@MCSignRestrict(model=var4,nsteps=nsteps,constraints=SignConstraints,$

    accum=||1,2,4||,nkeep=nkeep,vardraws=vardraws,subdraws=subdraws)

 

Again, the IRF's are graphed and the FEVD's processed:

 

@MCGraphIRF(model=var4,shocklabels=sl,varlabels=vl,$

   header="Sign Restrictions, 4 Variable Model, Zone "+longname(zone),$

     picture="##.##",center=median)

@MCFEVDTable(model=var4,shocklabels=sl,varlabels=vl,horizons=||1,4,20||)

 


Copyright © 2026 Thomas A. Doan