Exchange Rate

Overview

Researchers working in the field of international finance often rely on WRDS platform to obtain empirical data for their research, whether it is fundamental data or pricing related data. Almost always these data items are reported in local currencies. For cross border comparison, researchers need to first convert all metrics from local currencies into a single currency, and that conversion naturally requires foreign currency exchange rate data.

There are several major databases on WRDS that carry international data, and each carries its native foreign currency exchange rate data piece. We will go over these data options one by one below by using the exchange rate between Chinese Yuan (CNY) and US Dollar (USD) as an example.


As always, users will need to first install WRDS Python API and establish connection using your WRDS credentials.

Compustat Global

Compustat Global provides both fundamental and pricing data for all countries globally outside North America. The foreign currency exchange rate data comes in two frequencies: 

The exchange rate is always reported between a local currency (tocurd for daily or tocurm for monthly) to GBP (fromcurd and fromcurm for daily and monthly respectively). 

In order to get exchange rate between a local currency (e.g. CNY) and another currency (e.g. USD), one can use two pairs of exchange rates (CNY vs GBP and USD vs GBP) and calculate the exchange between CNY and USD directly. 

The last step gives us the direct exchange rate between CNY and USD. The chart below shows the historical exchange rate obtained using Compustat Global data.

Worldscope

Worldscope data carries exchange rate meta information and the actual exchange rate data in two separate tables. 

Users will need to rely on the code variable looked up in the wsinfo table to extract the desired exchange rate data (or any other numeric data for that matter) from the wsndata table. 

One may notice from the output table that the exchange rate information seemingly comes only at annual frequency, where year_ variable indicates the year information, and value_ variable indicates the actual exchange rate. How would one then obtain monthly exchange rate data when only annual rate is available? It turns out that Worldscope uses the item variable here to indicate month end information. 

More specifically, 

- 11013 To U.S. Dollars - Current
- 11002 To U.S. Dollars - January Month End
- 11003 To U.S. Dollars - February Month End
- 11004 To U.S. Dollars - March Month End
- 11005 To U.S. Dollars - April Month End
- 11006 To U.S. Dollars - May Month End
- 11007 To U.S. Dollars - June Month End
- 11008 To U.S. Dollars - July Month End
- 11009 To U.S. Dollars - August Month End
- 11010 To U.S. Dollars - September Month End
- 11011 To U.S. Dollars - October Month End
- 11012 To U.S. Dollars - November Month End
- 11001 To U.S. Dollars - December Month End 

Therefore, users can create a monthly time series of exchange rate using the month end info from "item" variable + "year_" variable.

As Worldscope reports the exchange rate value_ as USD per local currency, I created an inverse version of this variable localPerUSD in order to compare with that from other databases. The chart below plots the time series of this value.

Datastream

The last exchange rate data source is Datastream. Datastream on WRDS platform comes in four different packages: commodities, economics, equities and futures. Slightly counter intuitive, the exchange rate data is actually part of the equities data package. 

And similar to the Worldscope data structure, meta data and actual time series data reside in two separate tables:

For instance, the code below extracts all meta information for records with fromcurrcode = "CNY":

The first few records from the output table contain two key observations.

So for the SPOT rate, one should simply focus on the records where ratetypecode equals to SPOT:

The latest records from Datastream on CNY and USD exchange SPOT rate is reported in the table below. Notice that in addition to midrate, Datastream also reports bidrate and offerrate as well.