# Multiple Currencies

This chapter will show how to set up &app; accounts to use multiple currencies.

## Basic Concepts

&app; supports over a hundred currencies, from the Andorran Franc to the Zimbabwe Dollar. For example, you can have a bank account set up in Euros, and another using Hong Kong Dollars.

Some of the issues which arise when using multiple currencies are as follows:

- How do you transfer funds between accounts with different currencies?

- How do you calculate the overall value when you have mixed currency accounts?

- How do reports deal with mixed currencies?

You can either deal with multiple currencies using manually entered transactions to record currency gains and losses as described in or you can utilize currency trading accounts introduced with &app; version 2.3.14 to automatically record the gains and losses on transactions between currencies as described in the subsequent section. Trading accounts are not enabled by default in &app; and must be explicitly enabled as described in .

## Manually Recording Currency Transaction

### Account Setup

Your default account currency is set in the Account tab under Edit Preferences ( &appname;Preferences on &mac;).

Similarly, &app; offers an option to set your preferred currency for displaying reports (like the balance sheet and income statement). The option is called Default Report Currency, and is in the Reports tab of the &appname; Preferences screen. You’ll want to set both options when you start using &app; because if (for example) your accounts are all in Canadian Dollars but the generated reports are all in US Dollars, the reports will just say that there are `no data/transactions (or only zeroes) for the selected time period`.

When you create a new account, you have the option to define the commodity in which that account is denominated. For accounts denominated in a currency, you can specify any of the currencies supported by &app; by simply selecting it from the currency commodity list. You will notice that the default currency is the currency that is defined for the parent account of the new account.

As an example, let’s set up a bank account scenario where you mostly work in US Dollars, but do also have a European bank account using the Euro currency, as well as one bank account in Hong Kong using Hong Kong Dollars. So, set up 3 bank accounts, one denominated in US Dollars, one using Euros, and the third in Hong Kong Dollars. One possible account structure for this would be:

    -Assets (USD)
       -Current Assets (USD)
          -US Bank (USD)
          -European Bank (EUR)
          -HK Bank (HKD)
    -Equity (USD)
       -Opening Balances (USD)
          -USD (USD)
          -EUR (EUR)
          -HKD (HKD)

The currency of each account is shown in parenthesis.

Since in this example you mostly work in USD, all of the parent accounts are set to USD. Of course, if you mostly work in Euros, you could change the currency of these parent accounts to EUR. The totals shown in the account tree window will always be converted to the currency of each particular account. Notice, we also set up 3 Opening Balances equity accounts, used to initially populate the 3 banks.

You could also set up just a single Opening Balance account and use a currency transfer to populate the different currency accounts. However, this is more advanced option, which is explained in a later section ().

Below you see the result of this example, in which you start with 10,000 USD, 10,000 EUR as well as 10,000 HKD in the three bank accounts. Notice that the total of the parent accounts only shows the value of the currency of sub-accounts with matching currencies. In other words, the Total Assets and Total Equity values only reflect USD amounts, because &app; has no way of evaluating the value of EUR or HKD yet. Once you set up exchange rates between the currencies, the parent accounts will calculate the converted value of all sub-accounts. See the later section () on ways to do this.

#### Initial multi currency Account Bank Setup

Initial setup of 3 bank accounts with different currencies.

Notice that the Total (Report) column is being displayed. This is configured in the column header row, select Arrow down and select Total(USD).

#### User-Defined Currencies

Usually when we talk about currencies, we mean government-backed currencies (or more precisely, currencies defined in ISO 4217). &app; does not allow you to create your own currencies. If you want to track non-ISO currencies, you can use either of two workarounds, depending on which fits your needs better.

##### User-Defined Currencies Workarounds

Let’s say for example that you want to track loyalty points you’ve earned by buying from a certain group of businesses. The account which tracks your loyalty points will be Assets:Other:LoyaltyPoints.

1. Treat these as if they were a security—that is, like a stock or mutual fund.

   In this workaround, you define a new security, of type FUND, called LoyalityPoints. This is pretty straightforward—when you create the new LoyaltyPoints account, just set the account type to Stock or Mutual Fund, click the Select... button next to the Security/currency: box, and click New to define a new security of type FUND.

   This is not really what the stock and mutual fund account types are meant for, but &app; will allow it. The downside is that you’ll have to enter a price for every transaction involving this account, because &app; needs the prices to figure out the monetary value of the points and treat them as one of your assets.

2. Use one of the dummy currencies for them.

   In this workaround, you use one of the dummy currencies to track the loyalty points. These currencies are XTS (Code for testing purposes) and XXX (No currency). If you use one of these for your LoyaltyPoints account, you can enter transactions into the account without having to enter share prices for every transaction. And, you can keep using the same two dummy currencies to track all sorts of amounts—vacation dollars earned and used so far this year, vacation hours earned and used, health insurance benefits allowance used and remaining, and so on.

   The drawback with this workaround is that you cannot define exchange rates for the dummy currencies to convert them to ISO currencies. If you want to do that, you really should use the first workaround.

### Recording and Updating Currency Exchange Rates

&app; allows you to update the Currency Exchange Rates both manually and automatically. This process is essentially the same as setting share prices for investments (see ). In the following two sections we will work through both methods.

Before we start, let’s have a quick look at the Chart of Accounts.

#### Initial multi currency Account Bank Setup

Initial set up of 3 bank accounts with different currencies.

As you see, the overall balances do not yet reflect any value for EUR or HKD holdings. Adding currency exchange rates will fix this.

#### Manually Updating Exchange Rates

Open the Price Database by going to Tools Price Database .

##### The Price Database Window—Still Empty

Click on the Add button to add a new currency exchange rate. A window will appear in which you can set up a new exchange rate. This window should appear like this:

##### Setup Of Euro Exchange Rate

Add Price Database Window

Set the Namespace to CURRENCY and the Security to EUR (Euro). Then set the exchange rate between the selected security and the selected currency. The Price box defines how many units of currency are required to purchase one unit of the security. In this case, how many dollars it will take to purchase on 1 Euro. In this example, you will set the exchange rate to 1 EUR for 1 USD.

##### The Price Database window after setting the exchange rate between Euros and US Dollars

##### Chart of Accounts After Setting The Exchange Rate Between Euro And US Dollar

Observe that since you have no exchange rate for HKD, &app; doesn’t convert the HKD accounts to USD. This will be added in the next section.

#### Automatic Updating Exchange Rates (How-To)

In the previous section you saw how to manually define a new currency exchange rate, but &app; includes an automatic price update feature, which will now be described.

Open the Price Database by going to Tools Price Database .

##### Price Database Before Obtaining Online Quotes

Click on the Get Quotes button to automatically load the various exchange rates you need.

If the Get Quotes button is disabled, that means that the Perl module &app-fq; is not installed. For information on how to install it, please see .

##### The Price Database After Obtaining Online Quotes

&app; downloads exchange rates for all currencies that are in use in your various accounts. This will happen every time you click on Get Quotes or request &app; to download quotes as per .

Now when you check the main Chart of Accounts you will see that &app; has automatically converted the HKD amount to USD amount on the parent accounts that are in USD, as well as on the Total (USD) column. Also the Euro accounts have been been updated with the latest exchange rate.

##### The Chart of Accounts After Obtaining Online Quotes

#### Disabling Exchange Rate Retrieval

Whenever you create an account that uses a non-default currency, exchange rate retrieval will be automatically enabled for that currency. However, if you later delete that account, &app; will not automatically disable exchange rate retrieval for that currency.

If you have deleted the last account for a particular currency, and you do not wish to retrieve exchange rates for that currency anymore, do the following:

1. Open the Securities window by selecting Tools Security Editor .

2. Make sure the Show National Currencies box is selected.

3. Expand the CURRENCY row.

4. Double click on the currency for which you want to disable exchange rate retrieval.

5. Deselect the Get Online Quotes box and click OK.

### Recording Purchases in a Foreign Currency

Purchases in a foreign currency can be managed in two different options.

1. Use &app;'s built-in currency exchange functions when you do your transactions. This is mainly used for one-time transactions, and nothing which happens regularly.

2. Use separate accounts to track transactions, where all involved accounts use the same currency. This is the recommended method, since it allows much better tracking and follow up. In this way, you do one currency exchange transaction, and after that you do normal transactions in the native currency.

The rest of this section will explain more based upon option .

#### Purchase of an Asset with Foreign Currency

You are using USD as your default currency. But, you decide to purchase a boat in Jamaica. To do this, you opened a bank account in Jamaica, moved some money from the US, and then purchased your boat.

To record this in &app; we use the following basic account structure:

    -Assets (USD)
       -Current Assets (USD)
          -US Bank (USD)
          -Jamaican Bank (JMD)
       -Fixed Assets (USD)
          -Boat (JMD)
    -Equity (USD)
       -Opening Balances (USD)
          -USD (USD)

The currency of each account is shown in parenthesis.

First you need to transfer 10,000 USD to Jamaica, and you use your US bank account (with a balance of 100,000 USD) for that. The bank gives you an exchange rate of 1 USD = 64 JMD, but charges you 150 USD to transfer the money.

##### Transaction Currency Transfer To Jamaica

Select the Jamaica transaction line (9,850.00 USD), right click and select Edit Exchange Rate

##### Edit Exchange Rate

In this dialog the exchange rate of a currency transaction is specified.

As Exchange Rate, you enter 1 USD = 64 JMD, since this is the rate your bank gave. Press ok in the Transfer Funds (Edit Exchange Rate) window, and then save this split transaction. Below is how it now looks in the main Chart of Accounts.

##### Chart of Accounts before purchasing the boat

You choose to buy a boat for 509,000 JMD. To record this transaction in &app;, you will need to enter a simple transaction in Assets:Current Assets:Jamaican Bank withdrawing 509,000 JMD and transferring it to Assets:Fixed Assets:Boat.

##### The Chart Of Accounts After Purchasing The Boat

The Chart of Accounts now reflects that your bank account has been reduced by 509,000 JMD, and that your Fixed Assets boat account has been increased by the same amount. If you also have turned on the Chart of Accounts (Column Choice) Total (USD) you will see the corresponding value in USD. The USD value will always reflect the latest currency exchange rate you have either automatically or manually retrieved.

#### Purchasing Foreign Stocks

This example will show how to purchase stocks that are priced in a currency other than your primary currency.

Assume that you live in New York and therefore you have set the default currency to USD. You decide to purchase a stock traded in Hong Kong that is priced in HKD. You would also like to be able to track the various income and expense amounts per stock and broker.

You decide to purchase stock in the Beijing Airport (Hong Kong). The ticker for this stock is 0694.HK on Yahoo! Since you wanted to track all various income and expense amounts, here is the necessary account structure:

- Assets:Investments:Brokerage Accounts:Boom:0694.HK (0694.HK)

- Assets:Investments:Brokerage Accounts:Boom:Bank (HKD)

- Equity:Opening Balances:HKD (HKD)

- Expenses:Commissions:Boom:0694.HK (HKD)

- Income:Investments:Dividend:Boom:0694.HK (HKD)

The Chart of Accounts looks like this after creating all the needed accounts:

##### The Chart of Accounts For International Stocks

The stock definition can be seen in the Security Editor ( Tools Security Editor .)

##### International Securities

If you have not moved money (50,000 HKD) into the brokerage cash account (Assets:Investments:Brokerage Accounts:Boom:Bank), do so now, either using the Equity (HKD) account, or an existing bank account (Currency Transfer).

There are two ways to enter the actual purchase transaction: you can enter it from the cash account (shown below), or you can enter it from the stock account.

If entered from the stock account, the stock is assumed to be priced in the currency of the parent account.

Let’s assume that the stock price is 3 HKD per share. To record the purchase, open the brokerage’s HKD cash account (Assets:Investments:Brokerage Accounts:Boom:Bank), and enter the following:

Buy Stocks
Assets:Investments:Brokerage Accounts:Boom:Bank | Withdrawal | 50,000
Expenses:Commissions:Boom:0694.HK | Deposit | 500
Assets:Investments:Brokerage Accounts:Boom:0694.HK | Deposit | 49,500 (16,500 shares)

If the exchange rate dialog box does not appear automatically, right-click on the stock row, and select Edit Exchange Rate. Enter the number of shares (16,500) as the To Amount.

##### Transfer Funds

Setting the number of shares in the Transfer Funds dialog

When you return to the Chart of Accounts, you will see the purchased shares reflected in the stock account’s total.

##### The Purchased international stocks

Chart of Accounts is now containing the international stocks

However, as you can see, the USD totals may be zero if &app; doesn’t have an exchange rate between USD and HKD. To fix this, go to Tools Price Database and click the Get Quotes button to automatically retrieve the exchange rates you need.

To reiterate, this example shows how stock can be purchased in any currency by entering the transaction in the register of the cash account used to make payment. It is also possible to enter the purchase in the stock account’s register, but be aware that the stock is assumed to be priced in the currency of the stock account’s parent.

In this example, the stock account’s parent (Assets:Investments:Brokerage Account:Boom) is denominated in HKD. Since this is same currency as the stock price, the purchase can be safely entered in the stock account’s register.

### Tracking Currency Investments

Currency investment is when you decide to invest in a different country's currency, and hope that it will rise in value relative your own currency.

When you enter these transactions into &app;, you will have to decide on how much detail you would like to have.

If you are not interested in detail at all, a very simple account structure would suffice:

- Assets:Investments:Currency:Bank (USD)

- Assets:Investments:Currency:XXX (XXX)

You would simply enter transfers between the two accounts, noting exchange rates as you went.

But, if you do want to be able to track capital gains or losses, as well as any fees, you do need a more complex account structure, such as:

- Assets:Investments:Currency:Bank (USD)

- Assets:Investments:Currency:Currency Bank:XXX (XXX)

- Expenses:Investments:Currency:Bank (USD)

- Income:Investments:Currency:Currency Bank:Capital Gains:XXX (XXX)

#### Purchasing Currency

When purchasing an another currency, you will buy a certain number of units of foreign currency with your own currency, at a particular rate. For example, you might buy 10,000 USD worth of Andorran Francs, 1 USD = 5 ADF, with a transaction fee of 150 USD.

Buy Currency
Assets:Investments:Currency:Bank (USD) | Withdrawal | 10,000
Expenses:Investments:Currency:Bank (USD) | Expense | 150
Assets:Investments:Currency:Currency Bank:ADF (ADF) | Deposit | 49,250

The Exchange Rate window should pop up when you leave the last row in the split above (Currency Transaction). If this window does not pop up, right click on the row or select Actions, and select Edit Exchange Rate. In the Exchange Rate window you specify the exchange rate you got from the bank.

#### Selling a currency investment

Entering a currency sale is done in the same way as a currency buy except that you are now transferring money from the Currency account to your native currency’s Bank account (very similar to ).

The proper recording of the currency sale must account for realized gains or losses. This can be done using a split transaction. In the split transaction, you must account for the profit (or loss) as coming from an Income:Investments:Currency:Currency Bank:Capital Gains:XXX account (or Expense:Investments:Currency:Currency Bank:Capital Loss:XXX). To balance this income, you will need to enter the Currency asset twice in the split—once to record the actual sale (using the correct amount and correct exchange rate), and once to balance the income profit (setting the amount to 0).

In short, a selling Currency transaction should look something like below, seen again from the Assets:Investments:Currency:Currency Bank:XXX.

##### Selling a currency with a Split Transaction Scheme

Account | Deposit/Expense | Withdrawal/Income
--- | --- | ---
Assets:Investments:Currency:Bank (USD) | Sold Amount - Exchange Fee |
Expenses:Investments:Currency:Bank (USD) | Exchange Fee |
Assets:Investments:Currency:Currency Bank:XXX (XXX) |  | Sold Amount (= Purchased Balance + PROFIT)
Income:Investments:Currency:Currency Bank:Capital Gains:XXX (XXX) | [LOSS] | PROFIT
Assets:Investments:Currency:Currency Bank:XXX (XXX) | PROFIT (with To Amount = 0) | [LOSS (with To Amount = 0) ]

### Reconciling Statements in a Foreign Currency

Reconciling foreign statement are done in the same manner as when you reconcile your local bank statement. If you have created a Chart of Accounts structure which allows you to have the same currency per account as your statement, it is actually exactly the same as reconciling your local bank statement.

If you have different currencies you might have to manually convert the amounts from one currency to another while you reconcile the accounts.

## Automatically Recording Currency Transactions using Trading Accounts

Trading accounts were introduced as a feature from &app; version 2.3.14. The conceptual basis for trading accounts is described in &ulink-sel-tut; by Peter Selinger. A second tutorial &ulink-sel-gnc; describes the manual creation and use of trading accounts in &app; prior to version 2.3.14.

Trading accounts are not enabled by default in &app;. To enable them go to File Properties Accounts tab and check the Use Trading Accounts checkbox.

### Trading Account Concepts

In accounting terms, trading accounts are specialized equity accounts to record changes in income which result from transactions between two or more currencies. In &app; they are implemented as a top level account type of Trading. When trading accounts are enabled the required sub accounts of Trading are automatically created if they do not already exist when a transaction between one or more currencies is created.

In the extended Accounting Equation, Trading accounts would appear as follows: Assets = Liabilities + Equity (+ Income -Expenses) + Trading

The user is prevented from manually making entries directly to the registers for any of the accounts in the Trading top level account group. All entries to these accounts are automatically generated when transactions between currencies are created in other account registers within the &app; account hierarchy.

The Trading account group is structured below the top level account Trading with a sub-account CURRENCY which in turn has a sub-account for each currency between which transactions have been made. For the example previously used in , the additional accounts which will be created automatically when transactions are created between different currencies with trading accounts enabled are:

    Trading
        CURRENCY
            EUR
            HKD
            USD

The names of these accounts are again assigned automatically and cannot be changed by a user without disrupting the functionality of the trading accounts in &app;.

### Recording Foreign Currency Transactions with Trading Accounts

#### Setup of Accounts for Trading Accounts

The same account structure used in the manual recording of currency transactions in the previous section is required. The initial account configuration for Assets and Equity accounts are as follows:

##### The Initial Multicurrency Bank Accounts Setup

Initial setup of bank accounts in multiple currencies.

The following prices were entered in the Price Database ( Tools Price Database ) as at Jan. 1, 2020 to convert the account balances for the foreign currency accounts to USD:

##### The Initial Price Database Entries

Price Database window after setting initial exchange rates between USD, HKD and EUR.

With the currency prices set as shown, the Accounts tab will now display the values of the foreign accounts in USD in the Total(USD) column:

##### The Initial Multicurrency Setup After Entering Exchange Rates Between USD, HKD and EUR

Accounts tab after setting exchange rates to USD.

#### Transfer of Funds to a Foreign Currency

Let us assume we wish to purchase at item in Hong Kong using the Hong Kong bank account for 20,000 HKD on Feb. 1, 2020. The current funds in the Hong Kong account are insufficient and we will need to transfer another 10,200 HKD from the US bank account. The exchange rate at the time of the transfer is 1 USD = 7.7884 HKD and we will have to transfer 1,309.64 USD for which the bank charges a 40 USD transfer fee. The transaction to effect this is created with the Transfer Funds dialog as shown below:

##### The Transfer Dialog To Create Transaction For Transfer From USD To HKD

Transfer of 10,200 HKD from US Bank account to Hong Kong bank account.

The Debit Amount has been specified in HKD and the transaction Amount being transferred in USD. There is no provision to enter the transfer fee in the dialog. On closing the dialog the following transaction as viewed in the US Bank Account register has been created:

Amount entered in the Transfer Funds are transferred from the selected Credit Account to the selected Debit Account. And if Debit Amount radio button is selected and the foreign currency amounts are entered, the transaction is recorded on the correct debit amounts. Whereas if Exchange Rate is selected and entered, the exact value is not often recorded due to the rounding errors.

##### The Transaction After Transfer Displayed in The US Bank Account Register

Transaction to transfer from US bank account to Hong Kong Bank account after closing transfer dialog.

The transaction can be opened in the US Bank Account register and may then be edited to add splits for the transfer fee as follows:

##### The Transaction After Adding The Splits For The Transfer Fee

Transaction to transfer from US bank account to Hong Kong Bank account after adding the splits for the transaction fee.

Returning to the Accounts tab we can see the result of the transfer transaction on the accounts:

##### The Account Tab Balances After Completion Of USD To HKD Transfer

Account balances in the Accounts tab after the transfer of funds from the US Bank account to the Hong Kong bank account.

The balances of the Asset and Equity accounts are presented with values set by the exchange rate entered in the transaction to transfer funds on Feb. 1, 2020.

The trading accounts have been automatically created and the amounts of the transfer have been entered into the accounts. There are no entries associated with the pre-existing opening balances of the accounts prior to the transfer. This reflects that the trading accounts only reflect gains and losses since the book was opened.

At this point there have been no trading gains or losses. The balances of the USD and HKD trading accounts are the same when converted to USD. The HKD trading account has a debit (negative balance) and the USD trading account has a credit balance (positive balance). The net balance of the CURRENCY sub account of Trading, and Trading itself, is 0 indicating that at this point no gains or losses have been recorded in the trading of currencies.

The hypothetical purchase in Hong Kong fails to take place and a month later on Mar. 1, 2020 the funds are required in the US account for another purpose. A transfer of 10,200.00 HKD is made from the Hong Kong bank account back to the US bank account. The exchange rate at the time of the transfer is 1 USD = 7.7933 HKD and a fee of 20.00 USD is charged for the transfer. The transaction to effect the transfer is as follows:

##### The Transaction To Transfer Funds From Hong Kong To US Bank Account

The transaction transfers 10,200.00 HKD from the Hong Kong Bank account to the US Bank account.

After transferring the funds back to the US Bank account, the prices database entries are as follows:

##### The Price database after transfer of funds back to US account

The price database showing prices for the transfer of funds to HKD and back to USD.

The Accounts tab balances after transferring the funds back are as follows:

##### The Accounts tab after transfer back

State of the accounts after the funds have been transferred back.

The Assets and Equity balances now reflect the the values of the accounts at the exchange rate for the transfer of funds back to the US Bank account. The Trading and CURRENCY placeholder accounts now indicate a modest realized loss of 0.82 USD on the currency transactions. The associated transfer fees appear in the Expenses total. Not a profitable exercise but still illustrative.

The gains or losses reported using trading accounts are realized gains and losses.

Finally we have the balance sheet after the above sequence of transactions reporting the Trading Loss incurred:

##### The Balance Sheet After Above Transactions

Balance Sheet after these transactions reflecting the trading loss incurred.