Entering stock transactions

Charles Day cedayiv at gmail.com
Mon Sep 22 14:02:08 EDT 2008


On Mon, Sep 22, 2008 at 10:19 AM, Fred Bone <Fred.Bone at dial.pipex.com>wrote:

> On 09 September 2008 at 10:23, Charles Day said:
>
> > 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.
>
> After a great deal of experimentation, I have narrowed my problem down to
> the Euro transactions. Unfortunately I have quite a few, spread around a
> number of accounts. However, the balance is not zero except in one case
> (where an Expenditure account got zeroed to Equity; deleting that
> transaction has no effect on the "imbalance").
>
> My main currency is GBP, and I have one Euro account under Assets
> (Assets:Currency:Euro), two under Equity (Equity:Opening Balances:Euro
> and Equity:Year end:2007:Euro), and four under Expenditure. I buy Euros
> (cash) from my bank Current account, and deleting all the cash-
> expenditure transactions makes no difference.
>
> What does make a difference is deleting the four transactions where I
> purchased Euros, and three where I charged Euro transactions to my (GBP)
> credit card.
>
> I have checked all the exchange rates, and although they are all
> different, they are all reasonable. I also have cash SFR and EEK
> accounts, with cash purchased from my current account in the same way,
> and these are not causing a similar problem (or at least, deleting all
> the transactions makes no difference, whether singly or all together).
>
> Deleting a single EUR purchase and re-entering the same amount with the
> same exchange rate yields the same "imbalance", so it's not a case of bad
> data in the file.
>
> The last such transaction was on 2008-05-20, when I bought EUR305.00 for
> GBP250.29. If I delete this transaction, my "imbalance" changes from
> 4218.29 to 8.10. If instead I create another one (dated today or some
> arbitrary other date, makes no difference), the "imbalance" becomes
> 288.97.
>
> FWIW, the other bank-to-cash transactions are
> 2007-02-20 EUR290.00 bought for GBP201.07
> 2007-07-11 EUR290.00 bought for GBP202.68
> 2007-10-07 EUR280.00 bought for GBP200.70
> and the credit card transactions are
> 2007-10-10 EUR258.00 charged at GBP183.78
> 2008-06-01 EUR85.50 charged at GBP69.55
> 2008-06-06 EUR55.10 charged at GBP45.29
>
> I cannot make any sense of what is going on. Especially the huge variance
> in the effect of duplicating or removing a single transaction.
>

I think things will be easier to track down if you run the trial balance
with your price source set to "average cost" (available starting in 2.2.6) .
The default price source of "weighted average" seems to be more volatile due
to the way it is calculated.

I see you saying that GBP is being sold to buy EUR. Does the EUR cash later
get transferred into accounts that are not also denominated in EUR?

-Charles


More information about the gnucash-user mailing list