BD-IATI / edi

Interface to import IATI data to Bangladesh AIMS
GNU Affero General Public License v3.0
7 stars 3 forks source link

Incorporate historical currency exchange rates #94

Open markbrough opened 7 years ago

markbrough commented 7 years ago

The Bank of Bangladesh exchange rate data only goes back to 2008. We need to be able to incorporate transactions before that. We can do that using this spreadsheet: https://raw.githubusercontent.com/bd-iati/exchange-rates-usd/master/data/consolidated.csv

This spreadsheet is updated nightly. It contains data from two sources:

The OECD has a slightly broader coverage of currencies. There is no overlap between the two data sources in the combined.csv dataset; OECD data is used only if there is no data from the Federal Reserve for that currency, or if there is no historical data for that currency.

We should combine this data with the currency conversion rates from the Bank of Bangladesh. If there are rates available from BB, we should prefer to use them (which I think means data going back to 2007 for 6 currencies, and more recently for the other 4 currencies).

Example: for GBP, the oldest data available in BB data is from 2007. For exchange rates prior to 2007, we should use the combined.csv dataset. For exchange rates from 2007 onwards, we should use the BB data only.

For INR, the oldest available data in BB data is from 2014. For exchange rates prior to 2014, we use the combined.csv dataset; from 2014 onwards, we should use the BB data only.

In the case of GBP, this means the data source is as follows:

Date Source Frequency
1951-1971 OECD Monthly
1971-2007 Federal Reserve Daily
2007 - present Bank of Bangladesh Monthly
markbrough commented 7 years ago

I think this is complete, right?

dfaruque commented 7 years ago

Not yet completely done.