Report to locate Unrealized Gains

David Carlson david.carlson.417 at gmail.com
Tue Feb 7 13:36:43 EST 2017


David T,

As you have pointed out, GnuCash generates Realized Gain numbers that do
not make any sense when you list commissions and fees explicitly.  For what
it is worth, if you had simply used net cost on purchase and net proceeds
on sale, GnuCash would have worked fine as far as the residual cost basis
values in your security accounts are concerned and the lot function works
and the Trial Balance report works.

The key to the whole thing is keeping the correct residual cost basis in
each security account after the realized gain is recorded for each closing
transaction. Obviously, this is easier when the entire lot is sold, as then
the residual value should go to zero in the current value column of the
chart of accounts. That is my quick check, as a balance sheet report for
closed security accounts should have zero value when it has zero shares.

Like you, I want to track commissions and fees, so I have resorted using a
spreadsheet to calculate gross and net costs and gains when I have partial
lot sales.  I started that procedure in 2008, but I have a lot of older
transactions in my data file.

I do not use the lots feature yet, so I cannot comment on how much that
complicates things.

By the way, I am very happy to see the work you are doing with the
documentation.


David C



On Tue, Feb 7, 2017 at 10:07 AM, David T. via gnucash-user <
gnucash-user at gnucash.org> wrote:

> Screen shot got eaten again.
>
>
>
> > On Feb 7, 2017, at 8:38 PM, David T. via gnucash-user <
> gnucash-user at gnucash.org> wrote:
> >
> > Chris,
> >
> > The binary method might work, but it is exceedingly time consuming when
> one is working with a ten-year data file with 185 commodity accounts and
> thousands of transactions. I tred that method, in fact, before I sent my
> question to the list. It’s simply not feasible except when you’re talking a
> small data set.
> >
> > Moreover, my first encounter with a transaction with unrealized gains
> left me confused.
> >
> > Here is the situation that confuses me:
> >
> > I have a set of transactions from 2007: an Initial Holdings transaction
> of 200 shares, with a cost basis of $23.80. I sold 100 shares for $3480,
> with $63.99 commission and $.06 fee, with $3415.95 coming along to me. My
> broker statement for that transaction listed capital gains of $3404.05
> (3480-63.99-.06-(23.80/2)), which is what I entered as a separate capital
> gains transaction on the same date. (See screen shot below)
> >
> > The Balance Sheet report for this date lists unrealized gains of $104.30
> (just to be clear, this is the only transaction affecting any commodities
> in my data file on this date). This figure stumped for a LONG time, until I
> realized that
> >
> > 104.30 (Unrealized gainson report) =(63.99 [commission]+.06
> [fee]-(23.80/2) [initial cost basis])*2
> >
> > In other words, the Balance Sheet report was off by the total fees,
> reduced by the initial cost basis.
> >
> > That seems wrong to me, and I certainly don’t know how fix this. I mean,
> I already *have* the gain transaction entered (and it’s the right one,
> according to my broker). So, what am I supposed to do to fix the Balance
> Sheet report?
> >
> > For humor, I decided to Lotify this account (open the View Lots window
> and scrub account). When I do this, it inserts a new Gain transaction for
> $3468.10 (i.e., not deducting fees), and the unrealized gain goes away.
> However, I am now staring at TWO gain transactions in the amount of over
> $3000, so I would expect the Unrealized gains number to be negative, or
> something. But this doesn’t happen; the gains remain at zero. Obviously,
> the gains have been realized, but by a set of transactions that gives
> completely incorrect information about the overall gain.
> >
> > I am open to being edified here—both on how I have misconstrued the
> problem AND on how to actually fix it going forward.
> >
> > Oh—and that’s only the first transaction I encountered. It’s from 2007.
> It’s a long way to Tiperary.
> >
> > David
> >
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> 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