Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on exchange rates used #659

Open
stevieflow opened this issue Feb 20, 2024 · 2 comments
Open

Documentation on exchange rates used #659

stevieflow opened this issue Feb 20, 2024 · 2 comments
Labels

Comments

@stevieflow
Copy link

We had a query about where d-portal exchange rates are sourced from

I went to : https://d-portal.org/faq.html#tech5

Default USD

Currently (please note this may change soon) converting to USD using the exchange rate of the date specified in the value-date attribute. So when we display USD, it is very accurate to that date.

Other currencies

For other currencies, the USD value is just converted using today’s exchange rate (please note this may change soon).

For budget information in future?

Using the latest exchange rates ([International Monetary Fund](http://www.imf.org/external/np/fin/data/rms_five.aspx)) every night and doing a full re-import once a week, so future budgets will use the current exchange rates and should be updated weekly.

Could this be updated to be more definitive?

  • it's not clear if IMF rates are used throughout, or just for future budgets
  • the"please note this may change soon" isn't dated, so gives some uncertainty

Thanks

@xriss
Copy link
Collaborator

xriss commented Mar 6, 2024

FAQ is a bit old and slightly out of date.

The exchange rates are sourced from freechange which itself fetches them in the given order / priority described here

https://github.com/xriss/freechange?tab=readme-ov-file#sources

The later sources are used if no data is available in the earlier sources. Hence IMF is preferred but the IMF does not publish data for all currencies for all of history. So we fill in gaps and expand the coverage from alternative sources.

A visualisation of the exchange rate used can be found at https://xriss.github.io/freechange-charts/ to help catch any bugs or possible inaccuracies.

We only handle 4 currencies fully. USD GBP EUR and CAD. By fully I mean the exchange rate at the transaction or budget value date is used for conversions. This is performed at import time hence the limited currencies.

For all the other currencies we convert to USD and then convert from that at todays rate into the target currency, this is more of an estimate and may get increasingly inaccurate as transactions get older.

We do not perform any adjustments for inflation.

The FAQ should be updated but it is a bit complicated to explain so If you have any suggestions on how best to word the FAQ then please suggest away...

@stevieflow
Copy link
Author

@IsabelBirds - to look at this in the new docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants