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 by Peter Selinger 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 FilePropertiesAccounts 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 revenue 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:

Формула 12.1.

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 GnuCashaccount heirarchy.

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 Manually Recording Currency Transactions, 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 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 useds 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:

Initial multi currency Account Bank Setup

Initial setup of bank accounts in multiple currencies.

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

The Price Database initial entries

Price Database window after setting initial exchange rates between USD and 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:

Initial multi currency setup after entering exchange rates between USD and 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 $20000 HKD on 01/02/2020. The current funds in the Hong Kong account are insufficient and we will need to transfer another $10200 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 $1309.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:

Transfer dialog to create transactionfor transfer from USD to HKD

Transfer of 10200 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:

Примечание

Entering the Amount for the account that the funds are being transferred from the selected Credit Account and selecting the Debit Amount radio button and then entering the foreign currency amount to be debited generally provides a transaction recording the correct amounts whereas entering an exchange rate will often not give the exact value actually transferred in the foreign currency because of rounding errors.

Transaction after transfer displayed in 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:

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:

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 01/02/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 (-ve balance) and the USD trading account has a credit balance (+ve balance). The nett 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 01/03/2020 the funds are required in the US account for another purpose. A transfer of $10200.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 1USD = 7.7933 HKD and a fee of $20.00 USD is charged for the transfer. The transaction to effect the transfer is:

Transaction to transfer funds from Hong Kong to US Bank account.

The transaction transfers $10200.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:

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:

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 accounts now indicate a modest realized loss of US$0.82 on the currency transactions indicated by the balances in the CURRENCY and Trading placeholder accounts. 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:

Balance sheet after above transactions

Balance Sheet after these transactions reflecting the trading loss incurred.