12.3. Automatically Recording Currency Transactions using Trading Accounts

Trading accounts were introduced as a feature from GnuCash version 2.3.14. The conceptual basis for trading accounts is described in Tutorial on multiple currency accounting by Peter Selinger. A second tutorial Multiple currency accounting in GnuCash describes the manual creation and use of trading accounts in GnuCash prior to version 2.3.14.

Trading accounts are not enabled by default in GnuCash. To enable them go to FileProperties+Accounts tab and check the Use Trading Accounts checkbox.

12.3.1. 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 GnuCash 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:

Equation 12.1. 

Assets = Liabilities + Equity (+ Income -Expenses) + Trading


Caution

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 GnuCash 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 Section 12.2, “Manually Recording Currency Transaction”, 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
Caution

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 GnuCash.

12.3.2. Recording Foreign Currency Transactions with Trading Accounts

12.3.2.1. 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:

Figure 12.18. The Initial Multicurrency Bank Accounts Setup

The Initial Multicurrency Bank Accounts Setup

Initial setup of bank accounts in multiple currencies.


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

Figure 12.19. The Initial Price Database Entries

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:

Figure 12.20. The Initial Multicurrency Setup After Entering Exchange Rates Between USD, HKD and EUR

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

Accounts tab after setting exchange rates to USD.


12.3.2.2. 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:

Figure 12.21. The Transfer Dialog To Create Transaction For Transfer From USD To HKD

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:

Note

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.

Figure 12.22. The Transaction After Transfer Displayed in The US Bank Account Register

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:

Figure 12.23. The Transaction After Adding The Splits For The Transfer Fee

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:

Figure 12.24. The Account Tab Balances After Completion Of USD To HKD Transfer

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:

Figure 12.25. The Transaction To Transfer Funds From Hong Kong To US Bank Account

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:

Figure 12.26. The Price database after transfer of funds back to US account

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:

Figure 12.27. The Accounts tab after transfer back

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.

Note

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:

Figure 12.28. The Balance Sheet After Above Transactions

The Balance Sheet After Above Transactions

Balance Sheet after these transactions reflecting the trading loss incurred.