Pages

Friday, January 6, 2012

Cracking the Code of the Effective Exchange Rate

This is a post about using econometrics to crack a code. While this may seem a little strange, it's based on a true story, and it relates to the "effective exchange rate".

No doubt you'll know that the effective exchange rate is an index that measures how a particular currency (e.g., the Canadian dollar) changes over time, relative to a "bundle" of other currencies. So, rather than just concentrating on the CDN$/US$ exchange rate (say), the effective exchange rate is designed to take account of changes in the exchange rates for the Canadian dollar relative to the currencies of Canada's major trading partners. It provides a more "representative" measure of the value of the Canadian dollar than would be provided by just a single rate.

The effective exchange rate goes under different names in different countries. For example, the Bank of Canada uses the term "Canadian-Dollar Effective Exchange Rate Index" (CERI), while the U.S. uses the term "Trade-Weighted Index" (TWI) - you can see the data from the Federal Reserve Bank of St. Louis here. The Reserve Bank of New Zealand uses the term "TWI". (See Hargreaves and White, 1999, for a good discussion of the construction of the New Zealand effective exchange rate.)

The European Central Bank publishes daily data for the nominal effective exchange rate for the Euro (here); and The Bank of International Settlement (BIS) provides monthly effective exchange rate data for over 60 countries (here).

Personally, I like the title "Trade Weighted Index", as it hints at how the index is constructed. It is calculated, day by day, as a weighted average of the bilateral exchange rates between the home currency and the currencies of our major trading partners. The weights reflects how "important" the other countries as trading partners.

There are several details associated with this. For example:
  • A decision has to be made about how many currencies are to be included. Should we include those for the 6 major trading partners; 10 major trading partners; etc?
  • How would trade be measured in forming the weights? Should it be total trade (exports plus imports), or should trade directions be treated differently?
  • Bearing in mind that trade transactions between Canada and (say) China may be denoted in US$, should the weights reflect the amount of trade in country-specific currencies, or in terms of the currencies used to settle the transactions?
  • What about indirect (third country) effects?
  • Should transactions in services be included in the calculation of the weights?
These are interesting and important questions, and the answers depend, in part, on the use(s) to which the effective exchange rate index will be put.

Now, let's suppose that the issues of number of countries/currencies, and choice of weights, have been settled. Perhaps we have five countries that account for 80% of our total trade, as follows:

              Country                   % of Trade                Weight

                 1                                35                         0.4375  (= 35/80); etc.
                 2                                25                         0.3125
                 3                                10                         0.1250
                 4                                 7                          0.0875
                 5                                 3                          0.0375

   Rest of World                          20
  

Then the effective exchange rate index is usually constructed using a weighted geometric mean, as follows:

                   It = It-1 x Π [(ej,t / ej,t-1) wj,t ]  ,                                         (1)

where the product is taken over j = 1, ......., N  (the number of countries); ej,t is the exchange rate between the home currency and that of country "j" at time "t"; and wj,t is the weight for the jth country at time "t". These weights are constructed to sum to unity across countries, at each point in time. In the illustrative table above, the weights are fixed across time.

As we are averaging ratios (not levels) the appropriate way to form the average is to construct a geometric mean (rather than an arithmetic mean) of the data.

It's instructive to take logarithms of each side of formula (1) for the effective exchange rate:

                      log (It )  = log (It-1) + Σ {wj,t [log (ej,t ) - log (ej,t-1 )]} ,    (2)

or,
                   Δlog (It ) =  Σ {wj,t Δlog (ej,t ) }  .                                     (3)

So, we see that the continuously compounding growth rate in the index is a weighted arithmetic average of the continuously compounding growth rates in the individual exchange rates.
                             
For the record, the currencies and weights currently used by the Bank of Canada to construct the CERI are:


              Currency                       Weight

             U.S. Dollar                       0.7618
             Euro                                0.0931
             Japanese Yen                   0.0527
             Chinese Yuan                   0.0329
             Mexican Peso                   0.0324
             U.K. Pound                       0.0271

These weights are based on 1999 to 2001 trade data, as compiled by the IMF, and are currently "fixed" until next revised (rather like the weights in the CPI). In fact this procedure of keeping the weights fixed for some time, and then making an overall revision of their values is pretty standard, so you can mentally drop the "t" subscipts from the weights in equations (1) to (3).

For more details on the widely-used IMF methodology to calculate the weights, see Bayoumi et al. (2005).

Now, let's take a closer look at equation (3). You can see that it can be viewed as a linear multiple regression model, with a zero error term. That's to say, it's of the general form:

                               yt = β1 x1t + β2 x2t + ........ + βN xNt + εt         (4)

where  εt ~ [0 , 0]. That is, the error has a zero mean and variance, so it is exactly zero, for all "t".

Now, ask yourself the following question. What value of R2 will we get if we estimate this last regression using OLS? The answer, of course, is R2 = 1, because we have a "deterministic" relationship, rather than a stochastic one. There's no uncertainty.

Now, this is where the code-cracking story enters the picture.

When you look at the various links and data I've provided above, it's pretty clear that the (trade-) weights that are used in the construction of the effective exchange rates for various currencies are totally "transparent" - the're published information. You may be surprised to learn that this wasn't always the case!

So, this is where the regression model in (4) comes into play. If the weights aren't made public, then the coefficients in that equation aren't known. However, the daily data for the bilateral exchange rates, and for the effective exchange rate are known. This means that we could use these data to fit the model in (4), and we'd be able to impute the weights.

There's a twist to this, and this is where the point above regarding the R2 value comes in. What if we're not told how many currencies are used to compute the Trade-Weighted Index?

Well, there's published information about the trade flows, so it's easy to find out the ranking of our trading partners in terms of bilateral trade. So, we can fit equation (4) using the exchange rate data for (say) our first two major trading partners, and if we don't get R2 = 1, then we need more countries. We then go down the list of ranked countries, adding more and more into the regression, until we get R2 = 1. Of course, at this point the standard errors on the estimated regression coefficients will all be zero, and the coefficients will be the weights that the central bank has used to construct the effective exchange rate. We'll also know exactly which currencies are used.

We'll have cracked the code!

The Reserve Bank of New Zealand first began computing their daily Trade-Weighted Index in the early 1970's (not in 1979, as stated by Hargreaves and White, 1999). It may not have been officially "published" at that time, but the daily data were certainly circulated widely in official circles. In know, because I was working off and on at the Bank at the time. At around 9:30 each week-day morning, a little computer program (!) was executed to generate the daily TWI figure from the "opening" bilateral exchange rate data, and the fixed weights based on monthly trade-flow data.


Amazingly, the number of countries (currencies) used in these calculations, as well as the weights, were treated as highly confidential information! Those of us who had access to this knowledge were sworn to secrecy.

I kid you not!

The information wasn't even supplied to our colleagues in the N.Z. Treasury, which was rather interesting as one of my house-mates at the time was a Treasury official.

However, it didn't take too long for various young economists (who should remain nameless, as they are now in high places) to crack the TWI code. And yes, it was done precisely as I've described above.

Which all goes to show that, in the face of ridiculous bureaucracy, a little knowledge of econometrics can be extremely useful!


Note: The links to the following references will be helpful only if your computer's IP address gives you access to the electronic versions of the publications in question. That's why a written References section is provided.


References

Bayoumi. T., J. Lee, and S. Jayanthi (2005). New rates from new weights. IMF Working Paper WP/05/99, International Monetary Fund, Washington, DC.

Hargreaves, D. and B. White. (1999). Measures of New Zealand’s effective exchange rate. Reserve Bank of New Zealand Bulletin, 62 (3), 3-15.



© 2012, David E. Giles



5 comments:

  1. Zero error. Interesting post. An alternate strategy may be to do the PCA of all the currencies and add in factors until you get R^2=1, or by some AIC/BIC criteria.

    A similar case is something like a VAR in levels on real GDP and its constituents. The next period real GDP equals the sum of the forecasts of its constituents (assuming away any trickiness with chain weighting for the moment). However, when you forecast the errors from the VAR, it may not be consistent with this. When done in changes, the VAR above is like what you do with the effective exchange rates, except that the weights are actually time-varying.

    The simplest solution is to just exclude real GDP from the VAR and calculate it afterward as an identity.

    However, for many economic time series with sub-components, the weights are time-varying. Either those weights are difficult to find (like the time-varying weights on the constituents of inflation or IP, which are both indices rather than dollar values) or nigh on impossible to find. This implies you would need to estimate something like 4, but under the assumption that the Betas are autoregressive or something.

    ReplyDelete
  2. John: Thanks for the very interesting comment.

    The real GDP example you mention is a case of an "allocation model", and in the absence of dynamics (lagged dependent variables) there are some standard things we can do. As you note, because the VAR model has lagged dependent variables as regressors, this complicates matters.

    Getting back to the TWI example I discussed, there's no need for using AIC or BIC. We all had the trade data, so the ranking of currencies was known with certainty. So, It was just a matter of "going down the list" until the perfect fot was encountered, as it had to be at some point.

    Anyway, your comments were most insightful. Thanks!

    ReplyDelete
  3. First let me say that I love your blog. Keep up with the good posts!

    I have a harder code for you:

    How would you try to decode the currency wights on a central banks' FX reserves portfolio? I tried to do this after my country's central bank decided to join in the "currency wars" and accumulate reserves in order to fight overvaluation of the local currency, but it did not specify (understandably) the diversification of his purchases.
    The problem is of course time varying wheights, and that I don't know if the bank is trying to stabilize against a specific bilateral exchange rate (USD is the obvious choice) or against a trade weighted exchange rate.



    Any ideas?

    ReplyDelete
    Replies
    1. Thanks for the comments. I wish I did have a suggestion, but I really don't. It seems to me that if the weights are "time-varying", then you'd to tell a story about (ie., model) this part of the problem. This would suggest a random coefficients regression model, but beyond that........

      Delete
  4. This blog is about econometrics, which help to know more about economics.

    ReplyDelete

Note: Only a member of this blog may post a comment.