Realized gains with trading accounts

Neal Groothuis neal at nealgroothuis.name
Mon Jan 19 13:31:47 EST 2015


Thanks for the prompt response!

I didn't know about all of the balancing rules, nor the existence of the
concept of a base currency for a transaction.  The resulting need to create
splits that have value but no change in quantity to realize gains seems a
bit perverse (which I believe is what Michael Tsang was getting at in his
comments on the bug you referenced), but it does have the desired effect,
so that's good enough for me.

Could this be added to the FAQ on the wiki (or somewhere else easily
searchable)?  How to realize gains when using trading accounts has popped
up a number of times on this list.
https://lists.gnucash.org/pipermail/gnucash-user/2014-March/053883.html is
an example, complete with some pretty "clever" workarounds.

On Mon Jan 19 2015 at 12:35:31 PM John Ralls <jralls at ceridwen.us> wrote:

>
> > 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/b578c56b27ce5f9fdb
> 3479b663c6f392cc91c2e8. 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