KitWallace / AIDVIEW-DB

A repository, browser and API for IATI activities
1 stars 0 forks source link

Currency Conversion process - clarification #91

Open siwhitehouse opened 11 years ago

siwhitehouse commented 11 years ago

As per discussion with Chris this could do with being documented. Matt from Development initiatives raised the following question relating to converting from Australian dollars to US dollars:

"How does the calculation between AUD and USD happen (doesn't seem quite right here?)" when referring to file AU-5-INJ559-FJ which includes the following transaction data

<transaction>
<transaction-type code="E">Expenditure</transaction-type>
<value value-date="2010-06-30" iati-ad:currency="AUD" iati-ad:date="2010-06-30" iati-ad:transaction-date="2011-06-30" iati-ad:transaction-type="E" iati-ad:USD-value="926389">1009949</value>
<transaction-date iso-date="2011-06-30">
Expenses incurred during the financial year 2010/11 for Initiatives with a start date on or after 1 July 2008
</transaction-date>
<flow-type code="10">ODA</flow-type>
</transaction>

According to http://www.oanda.com/currency/historical-rates/ there were ~0.8653 AUD to USD on 30-06-2010 which is the date the currency exchanges are worked out, I believe. That doesn't tally with the amounts shown here.

KitWallace commented 11 years ago

The rates are based on this table from the OECD

http://www.oecd.org/dac/stats/referencedacstatisticaltables.htm

Annual Exchange Rate http://www.oecd.org/dac/stats/50065945.xls

The USD/AUS rate of 1.092 for 2010 is the value in the AIDVIEW conversion table which is the same ratio as in the example. This gives a AUS/USD rate of 0.917 which looks high given that the historical value shown on the oanda site never reaches that value.

I see that I could add the 2011 rates which could be done by updating the table by hand from the OECD table so the original scrapper code doesn't need to be found.

siwhitehouse commented 11 years ago

I think the rate on 31st March 2010 might be the one that's being used. According to the Oanda site it was very close at least.

KitWallace commented 10 years ago

The OECD links no longer work - need to find an althernative source of conversion data and bring t he table up to date.

KitWallace commented 10 years ago

found http://stats.oecd.org/index.aspx?queryid=169# - just looking at configuring the view and export - may still have to translate countries to ISO codes at the appropriate date.

No data on european countries prior to 2001 although other countries have data going back 50 years. Wrote converter form CSV to XML iai the country file, Data now includes XDR