Another approach to foreign currency accounts
I've made a little tool that uses the YNAB API to automate the approach I've been using for managing foreign currency accounts in a single budget.
I'm posting here in the API forum first in the hopes to get some feedback before publicizing more widely.
Some notable features of this approach that may set it apart from other solutions:
- All your accounts, both local and foreign currency, are in a single budget so you can see the state of all your finances at a glance.
- Auto-import, manual import, and reconciliation for foreign currency accounts works normally, in the original foreign currency.
- Reports and net worth will always be shown in your local currency, with all foreign amounts converted at an exchange rate accurate to within 24 hours.
- Budget categories are in your local currency, and it's no problem to mix local and foreign currency transactions in the same budget category.
- Handles split transactions.
- Foreign currency balances are automatically adjusted as the currency fluctuates, at an exchange rate accurate to within 24 hours.
- Your original transactions left are untouched.
- Uses historical exchange rates for transactions in the past.
The approach boils down to:
- keeping the foreign accounts and transactions in their original currencies, so that auto-imports and reconciliation work as normal
- maintaining a "virtual" account for each foreign currency that has transactions for the difference between the foreign currency and the local currency, so that your net worth and budget categories are correct in the local currency.
- creating periodic adjustment transactions in the "virtual" difference accounts for fluctuating exchange rates.
I've been doing this manually for several years, after trying some other approaches, and found it works really well for our family budget which crosses three different currencies and involves a lot of foreign transactions and transfers.
Right now this is a **preview** that's just a command-line tool. If there's sufficient interest, I plan to turn it into a user friendly web app.
If this sounds interesting to you, please download the tool, give it a try, and let me know what you think:
FYI: I've found and fixed a few bugs, so if you're trying this out you should probably grab a new version by following the links from https://borsboom.io/foreign-currency-accounts-for-ynab/#tool-setup
I'm wondering how well you think this might work for my case. I have three budgets right now. I have a custom tool that outputs a range of transactions as a Xero-friendly CSV. I use this for foreign accounts that I can't link to it, and that I can't easily connect via API because hardly anyone's actually implemented PSD2 APIs yet :(
Something I wish existed (but which I don't have _quite_ enough pain to actually build) is a tool to basically aggregate all of my budgets in a reference currency in a fourth budget. Then I could just use YNAB Reports to see spending and net worth change. Really, even just a third-party report tool that could base itself off multiple budgets (I guess with a little category mapping in order to treat various categories as the same thing) would be pretty neat. As it is, I just made a small spreadsheet where I convert all the net worth values to one currency and track the change that way. Not perfect, but gives me some indication of the direction of things.
This is brilliant. Thank you so much. I'd love to see it as a web app. I only set it up today but I can already see this will make my life so much easier. I live in NZ but I still have accounts in the US and have long been managing everything in a pair of YNAB4 budgets. Having everything in one budget while still tracking my US accounts in USD...amaaaazing!
This looks fantastic and I can't wait to use it, however I'm having some major trouble with the .exe file. It's not at all opening on my computer and I'm not sure if its something from my computer or from the file itself. I have a Windows Home 64-bit pc, which should be fine I think. I appreciate any help you might be able to give and thanks for making this awesome tool!
Your approach is amazing and multicurrency became sane. Meaning that instead of cancelling my YNAB subscription I will continue using it after a year of pain.
I do know that it is an opinionated approach. I mean, there are many ways to deal with that issue, yours is one I like.
I don't know why YNAB doesn't do something or similar or something at all.
The long-promised web based version of this tool is finally nearing the point where I feel comfortable opening it up to general use, but I'd like a few beta testers first. The underlying processor is exactly the same as the command-line version, so that part is well tested by many people at this point and there are no currently known bugs. But now there's a (sort-of) friendlier web UI and you don't need to mess with the command-line anymore.
If you've been wanting to try this tool but were intimidated by using a command-line app, now would be a great time to try out the web based version.
And if you've been using the command-line version but would rather not have to remember to run it yourself or manage a cron job, I can import your data into the web-based version and it can take over where the CLI leaves off.
If you'd like to be a beta tester, shoot me an email at [email protected].
Note: the app is currently still in Restricted Mode, which means YNAB is limiting it to 25 users. I've requested to have that lifted, but I'm not sure how long YNAB usually takes to process those requests.
Looking forward to your feedback!
Wow, this works so well. I tested different workflows, like changing the category of a foreign transaction after the diff transaction was added, as well as removing a foreign transaction, and in all cases your tool takes care of it perfectly.
Thank you so much for making this seamless tool. As someone who lives in two currencies, it has made YNAB so much more useful and easy to use.
What a great job you're doing! Thanks for that!
I am currently testing you web-based version. I have a question for this:
- in my budgets, I have some operations that are older than one year. So I get the following error message:
"Failed to get exchange rate(s) from Currency Converter API. Free version only allows up to 1 year earlier."
How do you manage old operations ? And why did you chose to use the daily rate for the operations instead of the today's one everywhere? I currently can't change anymore the date to start the foreign currency transactions.
Edit: I just found out that the rate can be extracted easily from the European Central Bank easily: https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/eurofxref-graph-chf.en.html. I will probably modify your tool to take those values for old operations.
hey emanuel, i started to use your tool a while ago and it works really nice. one question i didn‘t figure out though is what i shall do, when i transfer money from lets say my dollar acount to my tanzania shilling acount. 10.000tsh = 5$. when i send 10 dollars, it is adjusting the overall balance but it shows only 10tsh on the shilling account instead of 20.000tsh. how could i fix that?