Entering stock transactions

Charles Day cedayiv at gmail.com
Tue Sep 9 13:23:08 EDT 2008


On Tue, Sep 9, 2008 at 1:06 AM, Fred Bone <Fred.Bone at dial.pipex.com> wrote:

> On 08 September 2008 at 15:02, Charles Day said:
>
> > On Mon, Sep 8, 2008 at 2:31 PM, Fred Bone <Fred.Bone at dial.pipex.com>
> > wrote:
> >
> > > On 08 September 2008 at 13:22, Charles Day said:
> > >
> > > [plenty]
> > >
> > > Thanks, I think I can see what you're getting at and I think I can
> apply
> > > that to my other not-quite-the-same problem transactions.
> > >
> > > I think ... ;->
> > >
> >
> > The tricky part is knowing when to change the capital in the stock
> > account, as in splits 4 and 6 of the transaction I gave, and when to use
> > capital gains instead.
> >
> > Just make sure that after each investment transaction:
> > 1. The trial balance still balances.
>
> This has been the problem. A bug that was fixed in 2.2.6 meant that I had
> a spurious imbalance all along, but now the bug has been fixed I see I
> have some real imbalances. Which I'm trying to clean up.
>

To give you a hint, I currently know of only two ways to create an imbalance
via the GnuCash GUI:
1. Sell the only remaining shares of a particular holding (bringing the
stock account balance to zero) without properly accounting for capital gains
on that sale or one of the previous sales in that account.
2. Bring the balance of a foreign currency account to zero without properly
accounting for currency gains on one of the sales in the account.


> > 2. The balance sheet with 'average cost' price source shows the correct
> > cost of any remaining holdings.
> >
> > If I ever get past fixing all the little investment- and currency-related
> > bugs that have been lying around (and I think I've made a sizable dent in
> > them so far), hopefully I can add some new features to make investment
> > transaction entry a lot more straightforward.
> >
> > One last thing: after doing this transactions, you may notice that the
> > "Advanced Portfolio" report shows the incorrect basis for your "A"
> shares.
> > I'm not sure why it's wrong, but the report may make some assumptions
> > about the "num" column in the stock register.
>
> That suggests that I might do best to make a clean break, by treating the
> old and new shares as different commodities. I'll play around with a
> clean file and see what happens, and report back (in a week or so).
>

Take a look at all zero-balance accounts that once held shares or foreign
currency. Are there splits for gains in these accounts? If not, they need to
be added. Does the currency that went into that account equal the currency
that left? With any luck, finding the missing gains may not be too hard!

-Charles


More information about the gnucash-user mailing list