[GNC] Bug in design of commodity sell transactions? (was Re: Getting My Account To Trial Balance)

David Carlson david.carlson.417 at gmail.com
Thu Jul 26 04:19:57 EDT 2018


Adrien,

In the second transaction you received  $150 for the stock which you had
paid  $100 for.  The extra $50 is income which came from the changed value
of the stock.  The sale would not reduce the value of the stock to zero
unless the profit is taken from unrealized gain.  That unrealized gain
resides in the security account and GnuCash uses a special type of notation
in the sale transaction to extract it to profit. As David T stated there is
more than one way to record that. Trading accounts is a method that tries
to do do it automatically without input from the user, but it does not work
correctly for certain cases, so some traders still calculate profit
separately and use the alternative notation to extract it from the stock
account.

What appears to be a bug is actually the awkward process of extracting the
correct profit.  The Trial Balance Report is, among other things, actually
a tool to test for correct extraction of the profit.

David C

On Wed, Jul 25, 2018, 11:54 PM Adrien Monteleone <
adrien.monteleone at lusfiber.net> wrote:

> I suppose this is for another thread and certainly not on point for the
> OP’s question, but I don’t see those two transactions as balanced.
>
> The first one is. You credit $100 from Assets:Cash and debit $100 to
> Assets:Stocks (or whatever it’s designated as)
>
> The second one is not balanced. You’re debiting $150 to Cash, but you only
> have $100 in Assets:Stocks to credit. It doesn’t magically grow to $150.
> Sure, the sell price reflects this, but the difference as you note is
> Income. That sell transaction can’t be balanced without a credit to Income
> as part of it. If GnuCash allows this, I’d say that’s a bug. (not a
> feature) Perhaps the implementation of the feature was designed that way,
> but then the bug is not in the code but in the design of the feature. I
> find it strange GC would auto-enter a split for Imbalance-xxx or Orphan-xxx
> in any normal register transaction, but a sell transaction doesn’t do the
> same if you don’t book a gain or loss as one of the splits.
>
> I’m sure I’m not understanding how this works. (I do account for multiple
> currencies as on-off acquisitions, but I don’t trade them or any
> securities) It can’t be that easy to create an unbalanced sell transaction
> is it?
>
> Do the price revaluations not auto-generate splits balanced to Unrealized
> Loss/Gain accounts? Or at least store the info in order to generate that
> Loss/Gain balancing split on the sale?
>
> Regards,
> Adrien
>
> > On Jul 25, 2018, at 8:50 PM, David T. <sunfish62 at yahoo.com> wrote:
> >
> > David,
> >
> > I imagine that the number of GnuCash users who only have accounts in a
> single currency (i.e., without any investments in stocks, mutual funds, or
> other commodities) is probably pretty small.
> >
> > For those who *do* have such holdings, a balanced transaction will still
> fail the trial balance if the gain or loss isn’t entered. In this instance,
> there will be no entries in IMBALANCE-XXX, since each transaction balances.
> Example: buy 10 shares of X for $100, using cash from your checking account
> (credit/debit of $100). Then sell those shares for $150 (debit/credit of
> $150). Both transaction balance—but where did that extra cash come from?
> Without entering the gain of $50 as income, the Trial balance will fail.
> You can enter that gain manually, or use trading accounts or the scrub lots
> feature to help manage this.
> >
> > David T.
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


More information about the gnucash-user mailing list