# Multiple Currencies

This chapter will show you how to setup your &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 setup in Euros, and another using Hong Kong Dollars.

Some of the issues which arise when using multiple currencies are, 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?

An alternative way to manage multiple currency accounts from the one presented in the next sections, is to use the trading accounts capabilities of &app;. This feature, which has been introduced with &app; version 2.3.14, can be enabled by going to the Accounts tab under File Properties.

For a complete guide on trading accounts you can take a look at this tutorial by Peter Selinger.

## Account Setup

Your default account currency is set in the Account tab under Edit Preferences (&app;Preferences on Mac OS X). You should set this parameter correctly, as it will save you much time when building your account structure.

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 &app; 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 is 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. For currency accounts, you can specify any one of the hundreds of currencies supported by &app; by simply selecting it from the currency commodity list. You will notice that the default currency is always whatever you have defined in the preferences. So, if you mostly work with Euros, but have the occasional Ethiopian Birr account, be sure to set your preferences to Euro.

As an example, let’s set up a typical 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, setup 3 bank accounts, one using the Euro currency, one in US Dollars, and another 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)
          -EUR            (EUR)
          -EUR            (HKD)

    Note: 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 Starting Balances equity accounts, used to initially populate the 3 banks.

You could also setup just a single Starting 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 (currency_purchase2.

Below you see the result of this example, in which you start with USD 10,000, EUR 10,000 as well as HKD 10,000 in the three bank accounts. Notice that the total of the parent accounts only show the value of the currency of sub-accounts with matching currencies. In the future you can setup the exchange rates between the currencies, and the parent accounts will calculate the converted value of all sub-accounts. See the later section (currency_howto1) on how 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 the international standard called 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.

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

The first method is to define a new security, of type FUND, called RewardMiles. This is pretty straightforward–when you create the new LoyaltyGroupRewardMiles 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; usually lets you decide how you want to use it, instead of dictating. The downside is that you’ll have to enter a price for every transaction involving RewardMiles, because &app; needs the prices to figure out the monetary value of RewardMiles and treat them as one of your assets.

The second method is to use one of the dummy currencies to track the RewardMiles. The dummy currencies are XTS (Code for testing purposes) and XXX (No currency). If you use one of these for your LoyaltyGroupRewardMiles 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. You can well imagine that &app; can be used as a hub for all sorts of personal metrics, in addition to finances.

The drawback with this second method 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 method.

## Recording/Updating Currency Exchange (How-To)

&app; allows you to update the Currency Exchange Rates in two different ways, manually and automatically. In the following two sections we will work through both ways.

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

Initial multi currency Account Bank Setup

Initial setup of 3 bank accounts with different currencies.

### Manually Updating Exchange Rates

Open the Price Editor by going to Tools Price Editor.

Price Editor window

Price Editor Window.

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

Setup Euro Exchange Rate

Add Price Editor 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. In this example, you will set the exchange rate to 1 EUR for 1 USD (think of it as: how many units of the currency, in this case, USD, do you have to spend to get one unit of the security, in this case, the currency EUR).

Price Editor Window

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

Chart of Accounts

Chart of Accounts after setting the exchange rate between Euros and US Dollars.

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 you could manually define a new currency exchange rate, but there must be an easier way to do it. And there is.

Open the Price Editor by going to Tools Price Editor.

Price Editor window

Price Editor Window before you obtain 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 Finance::Quote is not installed. For information on how to install it, please see invest-stockprice-auto2

Price Editor window

Price Editor Window after we obtained online quotes.

You can observe that &app; will download exchange rates for all currencies you are using in your various accounts. This will happen every time you click on Get Quotes or have &app; downloading quotes/exchange rates automatically as per invest-stockprice-auto2

And if 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.

Price Editor window

Chart of Accounts after we obtain 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:

- Open the Securities window by selecting Tools Security Editor.

- Make sure the Show National Currencies box is selected.

- Expand the CURRENCY row.

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

- Deselect the Get Online Quotes box and click OK.

## Recording Purchases in a Foreign Currency (How-To)

You can do it in two different ways.

1) Use &app; build in currency exchange between accounts when you do your transactions. This is mainly used for one time transactions, and nothing which happens regularly.

2) Use separate accounts for this Purchase, 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.

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

### Purchase of an asset with foreign currency

Your normal place of residence is in Florida, therefore you are using USD as your default currency. But, you do like to travel to the Bahamas and go fishing. You like it so much that you decided to purchase a boat there. To do this, you opened a bank account in Jamaica, moved some money from the US, and then purchased your dream boat (smallest version).

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)

    Note: the currency of each account is shown in parenthesis.

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

Currency transfer

Transfer money to Jamaica

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

Edit Exchange rate

A dialog window where the exchange rate in 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

Chart of Accounts before purchasing the boat

You find the boat, and since it’s a bargain at JMD 509,000 you decide to buy it. To record this transaction in &app;, you will need to enter a simple transaction in Assets:Current Assets:Jamaican Bank withdrawing 509,000 and transferring it to Assets:Fixed Assets:Boat

Chart of Accounts after purchasing the boat

Chart of Accounts after purchasing the boat

The Chart of Accounts now reflects that your bank account has been reduced with the value of the boat (JMD 509,000), and that your Fixed Assets boat account has been increased with the same amount. If you also have turned on the CoA (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 updated &app; with.

### Purchasing foreign stocks

This example will show how to purchase stocks that are priced in a different currency than your normal 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). (After all, the 2008 Olympics in Beijing have finished and the price has returned to Earth.)

The above stock (Beijing Airport) has been chosen only as an example, and should not be taken as any kind of stock purchase advice.

You need to find out what the stock ticker is for this stock. To do this, you do a bit of investigation on the Internet, and in particular on Yahoo! Finance - Ticker Symbol Lookup (http://finance.yahoo.com/lookup). This gives you the following:

- Beijing Airport has the Stock Symbol 0694.HK at Yahoo

Since we wanted to be able to track all various income and expense amounts, we come up with the following Account structure:

    Assets:Investments:Brokerage Accounts:Boom:0694.HK     (Beijing Airport)
    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:

Chart of Accounts for international stocks

Chart of Accounts for international stocks

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

International securities

International securities

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

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

    Buy Stocks
    	Assets:Investments:Brokerage Account:Boom:Bank  Withdrawal 50,000
    	Expenses:Investments:Commission:Boom_HKD	Deposit 500
    	Assets:Investments:Brokerage Account:Boom:0694  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

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

Purchased international stocks

Chart of Accounts with some 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 Editor and click the Get Quotes button to automatically retrieve the exchange rates you need.

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 proceed with caution! When doing it that way, 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 (How-To)

Currency investment is when you decide to invest in different countries' currency, and hope that their currency will raise 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 be enough. Something like this;

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

But, if you do want to be able to track the Capital Gains or Losses, as well as the various fees, you do need a bit more complexed layout. Something like this;

        Assets:Investments:Currency:Bank                    (USD)
        Assets:Investments:Currency:Currency Bank:XXX       (XXX)
        Expenses:Investments:Currency:Currency Bank:XXX     (XXX)
        Income:Investments:Currency Bank:Capital Gains:XXX  (XXX)

Where XXX is the currency you are investing in.

### Purchasing a currency investment

A typical purchase order might be something like this, seen from the Assets:Investments:Currency:Bank.

### Buying a currency with a Split Transaction Scheme

Account | Deposit | Withdrawal
Assets:Investments:Currency:Bank |  | Invested Amount
Expenses:Investments:Currency:Currency Bank:XXX | Exchange Fee |
Assets:Investments:Currency:XXX | Invested Amount - Exchange Fee |

You should get an Exchange Rate window popping 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, 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 Savings account (very similar to invest-sell1).

The proper recording of the currency sale *must* be done using a split transaction. In the split transaction, you must account for the profit (or loss) as coming from an Income:Capital Gains account (or Expenses:Capital Loss). 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:Bank.

### Selling a currency with a Split Transaction Scheme

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

## Reconciling Statements in a Foreign Currency (How-To)

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 Reconcile Statement, it is actually exactly the same as reconciling your local bank statement, apart from the fact you might need a dictionary

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

## Putting It All Together (Examples)

In this Putting It All Together you will use quite a bit of what you have learned so far in this guide with a bit of a twist. The twist being a lot of different currencies.

### Basic scenario

The following are the basic scenarios.

- You live in Australia and use AUD as our default currency

- You win the lottery as well as inherit some money

- You pay off your existing house loan

- You purchase some stock in Sweden using SEK (Ericsson B-Fria)

- You purchase some stock in HK using HKD (Beijing Airport)

- You purchase some stock in US using USD (Amazon)

- You lend some EURO to a friend (Peter)

- You borrow some money from a Japanese bank

- You buy a house in New Zealand

- You use a credit card in Australia

- You would like to have maximum control of your expenses

Again these examples are not intended as valid and accurate advice. They are only to be considered as an example for the techniques used in &app;, and not as Investment Advice. Please consult a proper financial advisor for more information regarding international investments/loans.

### Configure Accounts

This time let’s start with a fresh and new &app; data file, so File New File, and edit preferences (Edit Preferences, &app;Preferences on Mac OS X) to set Default Currency as AUD. Since you have decided to be able to track as much detail of your income and expenses as possible, the following account hierarchy could be used;

    Assets:Current Assets:Savings Account         (AUD)

### Opening Balance

You open the mail one morning, and to your enormous surprise find that you are the last living relative of a very distant relative who happened to be very rich. And so, now you are $500,000 AUD richer. That was not all though; another item in the mail states that you won the lottery, and got $250,000 AUD for that.

To record these transaction we need the following accounts

    Equity:Lottery         (AUD)
    Equity:Inheritance     (AUD)

The transactions you enter into your Assets:Current Assets:Savings Account should look like this.

### You come into some extra money

Account | Increase | Decrease
Equity:Lottery | $250,000 |
Equity:Inheritance | $500,000 |

And the Chart of Accounts looks like this after above transactions have been entered.

Chart Of Accounts

Chart Of Accounts after receiving some money

### Purchase a house

At last you can afford to pay off that house loan you had to take some years ago (with a $50,000 deposit).

    Assets:Fixed Assets:House                  (AUD) $300,000
    Liabilities:Loans:Mortgage                 (AUD) $250,000
    Expenses:Interest:Mortgage Interest        (AUD)
    Equity:Opening Balance                     (AUD) $50,000

After you have had a small chat with your Mortgage bank, they agree to let you pay it all off in one go, plus some interest (AUD 30,000). You should enter the following split transaction into Assets:Fixed Assets:House account.

### Paying of the house mortgage

Account | Increase | Decrease
Assets:Current Assets:Savings Account |  | 280000
Expenses:Interest:Mortgage Interest | 30000 |
Liabilities:Loans:Mortgage | 250000 |

The Liabilities:Loans:Mortgage account Transaction Ledger looks like this after the transactions have been entered

House Mortgage

Transaction Ledger of the House Loan

### Purchasing Stock

Since you quite suddenly have a lot of money in your bank account, you decide to visit a Financial Advisor, and after his recommendation (remember, this is fictional - not genuine stock purchase advice) you decide to purchase Telecommunication (Ericsson in Sweden), Beijing Airport (Hong Kong), and Amazon (USA).

The needed accounts to track these investments look like this:

    Assets:Investments:Swedish Broker:ERIC.ST                 (STOCK ERIC.ST Yahoo)
    Assets:Investments:Swedish Broker:Bank                    (SEK)
    Assets:Investments:HK Broker:0694.HK                      (STOCK 0694.HK Yahoo)
    Assets:Investments:HK Broker:Bank                         (HKD)
    Assets:Investments:US Broker:AMZN                         (STOCK AMZN Nasdaq)
    Assets:Investments:US Broker:Bank                         (USD)
    Expenses:Investments:Commissions:Swedish Broker:ERIC.ST   (SEK)
    Expenses:Investments:Commissions:HK Broker:0694.HK        (HKD)
    Expenses:Investments:Commissions:US Broker:AMZN           (USD)
    Expenses:Investments:Currency Transfer                    (AUD)

You decide to invest $100,000 into each stock, and to do this we first do a currency transaction to the various bank accounts associated with the stock.

The transaction you enter into your Assets:Current Assets:Savings Account should look like this.

### Transfer money to overseas with a multiple currency transaction split.

Account | Deposit | Withdrawal | Exchange Rate | Transaction Fee
Assets:Investments:Swedish Broker:Bank | 100000 |  | 5.5869 | 35
Assets:Investments:HK Broker:Bank | 100000 |  | 5.8869 | 30
Assets:Investments:USD Broker:Bank | 100000 |  | 0.7593 | 25

Now when there is some money in the various stock brokerage accounts, you ask each broker to buy shares of stock for the specified amount. Remember to execute the transaction from the bank account associated with the stock, and if the Exchange Rate window does not pop up, right click the row and manually select it. Enter the number of shares you purchase in the last entry (To Amount:).

### Purchasing oversea stocks

Stock Symbol | Number of shares | Amount | Commission
ERIC.ST | 15000 | 270000 | 400
0694.HK | 70000 | 280000 | 300
AMZN | 1000 | 32000 | 25

As you can see in the Chart of Accounts, you have now purchased shares of stock in three different currencies (HK, USD, as well as in SEK), but the Chart of Account (as seen below) does not indicate how much they are valued in your home currency, AUD.

Chart of Account after Stocks

Some of the accounts in Chart of Accounts after the stock purchase

The next section will ensure you get the various exchange rates so that &app; can show your total worth in the local currency (AUD in this case),

### Get the online quotes

To get the current exchange rates and stock quotes, go to Tools Price Editor and then click on Get Quotes.

### Lending money to a friend

Peter has run into some difficulties all the way over in Europe Land. Since he is a very dear pal of yours, you decide to help him out with a personal loan of 40,000 Euro.

    Assets:Money owed to me:Euro:Peter            (Euro)
    Income:Interest Income:Peter                  (Euro)
    Expenses:Bank Charge                          (AUD)

This is a simple currency transaction from your Savings Account (AUD), to your Assets:Money owed to me:Peter (EURO) account. You got the exchange rate of 0.606161, which means you need to withdraw AUD 65,989.10, as well as pay the service fee of 35 AUD.

### Buying property in New Zealand with a loan from Japan

Your long-time Japanese friend offers you a Japanese house loan if you purchase a property overseas, with only AUD 50,000 as deposit. After having discussed this with your Financial Advisor in Australia and gone through the various risks and benefits related to your situation, you decide to accept his offer.

Again, this should not be taken as financial advice. Please consult with a registered financial advisor before undertaking investing (or speculating) in overseas markets, or local markets for that matter.

A word of warning might be of interest here, taking a loan overseas for a very low interest rate might seem like a very good deal. Do keep in mind though that the exchange rate might change and can change drastically. If you take a loan in your local currency, you only have to worry about the interest rate. If you take a loan overseas, you then have to worry about the interest rate and the exchange rate.

You found a nice small cottage in a small coastal town near Auckland which would be a perfect summer house, and you decide to use the money from Japan for this purpose.

We need the following accounts for this example;

    Liabilities:Loans:Japan Loan                  (JPY)
    Expenses:Interest:Japan Loan                  (JPY)
    Expenses:Mortgage Adm Fees:Japan Loan         (JPY)
    Assets:Current Assets:Japan Bank              (JPY)
    Assets:Fixed Assets:NZ House                  (NZ)

### Buying a NZ House Split Transaction

Account | Increase | Decrease
Assets:Fixed Assets:NZ House | 300000 (NZD) |
Assets:Current Assets:Savings Account |  | 50000 (AUD) (1.18926)
Liabilities:Loans:Japan Loan |  | 28000000 (JPY) (0.0137609)
Expenses:Mortgage Adm Fees:Japan Loan | 300000 (JPY) (0.0137609) |

### Whats next?

As you have seen in the above examples you have only done the initial purchases. The rest, that is, various selling transactions and unrealized gains tracking is left for you to ponder.