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
→ +Accounts tab and check the Use Trading Accounts checkbox.
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:
![]() | 小心 |
---|---|
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 |
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 第 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
![]() | 小心 |
---|---|
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 |
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 following prices were entered in the Price Database (
→ ) as at Jan. 1, 2020 to convert the account balances for the foreign currency accounts to USD: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:
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 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 can be opened in the US Bank Account register and may then be edited to add splits for the transfer fee as follows:
Returning to the Accounts tab we can see the result of the transfer transaction on the accounts:
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:
After transferring the funds back to the US Bank account, the prices database entries are as follows:
The Accounts tab balances after transferring the funds back are as follows:
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: