Realized gains with trading accounts

John Ralls jralls at ceridwen.us
Mon Jan 19 12:35:29 EST 2015


> On Jan 19, 2015, at 8:24 AM, Neal Groothuis <neal.groothuis at gmail.com> wrote:
> 
> Hello all,
> 
> To address a topic that seems to pop up here with some frequency and yet
> never get resolved to people's satisfaction: how do you account for
> realized gains if you're using trading accounts?
> 
> First, a workaround that I'm starting to use that seems less clunky than
> some others proposed here: create a "realized gains" equity account, and
> use that to offset entries into your realized gains income account.
> 
> E.g., if you have an investment account with 4 FOO purchased at USD 250,
> and you sell 2 of them at USD 500, the entry automatically created by
> GnuCash will have four splits:
> -2 FOO from your FOO investment account,
> +2 FOO to your FOO trading account,
> +1000 USD to your USD cash account, and
> -1000 USD to your USD trading account.
> 
> To use my workaround for this, add two more splits:
> + 500 USD to your realized gains income account, and
> - 500 USD to your realized gains equity account
> 
> WIth this, I believe that your balance sheet will correctly show your
> trading gains (realized + unrealized), your total equity, and your retained
> earnings (only reflecting realized gains) properly.
> 
> Second, a question/proposal: it seems that Peter Selinger's tutorial on
> multicurrency accounting (
> http://www.mathstat.dal.ca/~selinger/accounting/tutorial.html) is generally
> recognized here as the authoritative document on how GnuCash should use
> trading accounts.  In section 5.1 (
> http://www.mathstat.dal.ca/~selinger/accounting/tutorial.html#5.1), he
> shows a transaction which moves CAD 5000 from the CAD trading account to a
> CAD realized gains account.  As far as I can tell, this is impossible in
> GnuCash and is the reason that people have to come up with workarounds to
> handle realized gains.  Is my understanding correct?  If so, wouldn't this
> be a bug?

Selinger’s article was the inspiration for creating trading accounts, but Mike Alexander didn’t follow it exactly. You can read the original commit message at https://github.com/Gnucash/gnucash/commit/b578c56b27ce5f9fdb3479b663c6f392cc91c2e8. The article is a description of how you can use manually created accounts to handle transactions with capital gains and differs somewhat from how GnuCash works with its automatic trading accounts.

Notice that Selinger’s example shows only one trading account, while with GnuCash there are always at least 2, one for each currency/commodity involved in the transaction. For booking realized gains in GnuCash, regardless of whether trading accounts are enabled, the splits should be between the asset account (House A or House B in Selinger’s example) and the income account (Income:Realized Gain in the example). This works easily enough when only two commodities/currencies are involved but gets tricky when there are 3 because one needs to take care to ensure that the transaction’s default currency is the one you want. Mike Alexander described the problem and procedure in detail in https://bugzilla.gnome.org/show_bug.cgi?id=742795#c12

Regards,
John Ralls




More information about the gnucash-user mailing list