Need better documentation on using Lots [Was: Chapter 8 - investment accounts]

David Carlson david.carlson.417 at gmail.com
Mon Sep 14 13:59:59 EDT 2015


On 9/10/2015 5:30 PM, Philip Walden wrote:
> David Carlson wrote:
>> On 9/9/2015 1:19 PM, Philip Walden wrote:
>>> David Carlson wrote:
>>>> Philip,
>>>>
>>>> When I asked "Does it zero out the value of the security asset
>>>> account that held the
>>>> security before it was sold" I was not referring to any transaction
>>>> or record, whatever that might be.  I meant to ask "does the sum of
>>>> all currency into and out of the now empty security account equal
>>>> zero?"  You can answer that question by running a balance report on
>>>> that account alone and see if both the number of shares is zero and
>>>> the unrealized gain shown at the end of the report is also zero.
>>> I am not much of a gnc aficionado and my grasp of nomenclature is
>>> somewhat weak.
>>>
>>> I am having trouble finding a "Balance Report" for the "stock"
>>> account. I see a global "Reports>Assets > Balance Sheet" report, but
>>> no Balance Report" for a specific account. I see only a "Reports >
>>> Account" report.
>>>
>>> If you can point me to the right report, I can build a dummy account
>>> and test it. My working account has a non-zero number of stocks.
>>>> The Show Lots dialog should be generating a transaction or series of
>>>> transactions that drives the unrealized gain to zero.  Those
>>>> transaction(s) should (I presume) be the ones that are also
>>>> generating the orphaned gains that need to be re-assigned to the
>>>> correct Capital Gains(Income) account(s) to be linked to the proper
>>>> brokerage account at tax time.
>>> It is generating orphaned gains and I am re-assigning them to short or
>>> long term gains.
>>>> Then my next question was whether Show Lots dialog includes the
>>>> brokerage charges in those orphaned gains.  If it does, it must be
>>>> separately transferring those expenses from some other account to the
>>>> orphaned gains account, because they cannot come out of the security
>>>> asset account unless the user has chosen to bury commissions
>>>> altogether, and only use net amounts.  In either case, we should know
>>>> how it works to be sure that our results are correct.
>>> As far as I can tell, it does not include brokerage charges in the
>>> orphaned gains. I have been adding them in the stock sale split and
>>> the generated orphaned gain appears to take the brokerage charges in
>>> the sale split into account.
>>>> Using only net (including commissions) amounts works, if it is done
>>>> consistently, but the trade-off is that GnuCash does not show the
>>>> actual trade price in the buy and sell transactions. Other threads in
>>>> this list and the Dev list have made it abundantly clear that many
>>>> users want the price to be shown accurately, even if it does not work
>>>> out exactly due to rounding errors.
>>> Yes, I have been doing it this way as my brokerage does not report
>>> commissions very clearly. Yes, it does affect the stock price history,
>>> but their commission fees are low and I am not that fussy. I guess you
>>> cannot have it both ways.
>>>> By the way, using only net amounts makes for simpler (less detailed)
>>>> transactions in GnuCash and gets you closer to seeing numbers that
>>>> match what your broker will report in the 1099 to the IRS.
>>> Exactly.
>>>> Which method works better for you?
>>> Skipping commissions and using net works for me most of the time. Last
>>> year I had the situation of recording a large stock option
>>> exercise-with-immediate-sell. The commission was significant enough
>>> that I could not ignore it.
>>>> David C
>>>>
>> Snip...
>>
>> First, if you have a data file that is you consider 'real' then I
>> suggest making a copy or two as Michael suggested in another thread to
>> use for testing.
>>
>> There is a lengthy set of options for most reports, and, alas, that is
>> another area that needs better documentation.
>>
>> The Balance Report listed in the Reports>Asset & Liabilities section can
>> be set to include any asset and liability accounts that you want and it
>> can be set to report balances on any date and there are more options as
>> well.  For the test that I first suggested lets say that you sold all of
>> the Google shares that you once owned.  You would choose
>> Options>Accounts then click Clear All and scroll through the list to
>> select the Google stock security Account where all of the shares have
>> been sold, and there are no shares remaining.  The report options box
>> can be expanded to show more accounts at a time.  For consistency,
>> choose Commodities>Price Source>Average Cost and I think all the
>> defaults under Display are ok , and choose General> Balance Sheet Date
>> to a date after the last sale.  With that setting there will be no
>> unrealized Gain or equity if all of the value of the account has been
>> removed and converted to an appropriate gain or loss.  If there is a
>> value, then some of the cash into that account has not been removed, and
>> the imbalance will ultimately skew your net worth report.  Since the
>> Show Lots dialog is supposed to help you achieve that balance, the
>> report would test whether it succeeded.
> Thank you for the advice. It has been awhile since I ran any reports
> (since tax season).
>
> I performed the following test.
>
> 1. I created a test copy of real gnucash data.
> 2. Then I went to the stock account under test and created one (1)
> sell transaction for all the remaining stock in the account at a made
> up price and a significant commission.
> 3. I then selected Actions>View Lots... The "View Lots..." screen came
> up showing the sell record (2) in the Free splits window. It also
> showed all the lots I had created previously, basically one lot for
> every stock purchase at some date-and-price.
> 4. I clicked on "Scrub Account" to apply the one sell record (split)
> to all remaining lots.
> 5. The result was that all the lots in the account had a fraction of
> the sell allocated that zeroed out the shares in the lot. The original
> sell transaction (split) was changed such that the sell record was
> divided up into multiple sell records, one for each lot. In addition
> the same number of orphaned capital gain records were generated. The
> gain calculations looks like it allocated the commission to rationally
> to each gain.
> 6. I then ran a Reports>Assets & Liabilities>Balance Sheet report.
> 7. I changed the report configuration to just the stock account under
> test, the basis to average and the time to "today".
> 8. I re-ran the report and the unrealized gains and equity came out to
> zero (0).
>
> So, it looks like the gains are being computed correctly.
>>
>> For security accounts that still contain shares, the balance report with
>> those settings  should be showing the remaining number of shares and and
>> the cost basis total for all those shares.   I think that should
>> correspond to the Free or un allocated lots in the Show Lots dialog,.
>> If the cost does not look reasonable for that number of shares, there
>> could be a problem.
> I  went back to my real data and ran the Balance Sheet report using
> the "Most recent" price source. The result exactly matched my
> brokerage website report.
>
> So it looks as if all is working. My only issue has been the lack of
> documentation/tutorial coverage.
>
> _______________________________________________
> 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.
> .
>

I started to test the View Lots and I got hung up on a use case
already.  What if I only sell part of a lot?  Do I have to manually
split the lot first before going into View Lots?  Maybe the "Scrub
Account" feature would do that, but would it respect the rest of the
manual matching that I had just done with the right and left arrows?

David C


More information about the gnucash-user mailing list