Stock accounts and double entry

Carol Champagne carol@gnumatic.com
Mon, 02 Apr 2001 13:32:03 -0500


ian+gnucash-user@beware.dropbear.id.au wrote:

> I have been trying to use the stock account type and I run into
> trouble. Suppose I buy shares and enter it in the stock account
> as a transfer from a bank account. Now I seel the share at a greater price
> and again enter it as a transfer to the bank account.
> 
> The problem seems to be that the capital gain has materialized out of
> nowhere as far as a double entry accounting system is concerned. There
> is no corresponding decrement from another account.
> 
> How are you meant to use these things?
Capital gains for stocks are going to be handled in a report. So if you 
are buying 100 shares @ $10 with a $30 commission, for example, enter a 
multiple-split transaction (in the stock account) transferring money 
from checking to buy the shares and pay the commission fee:

To(Debit) ABC Stock account 100 sh x $10 = 1000
To (Debit) Commission account                30
 From (Credit) Checking account                      1030


When you sell the shares for $20 apiece with another $30 commission:

To(Deb.) Checking account           1970
To (Deb.) Commission account          30
From(Cred.)  ABC Stock account 100sh X $20 = 2000

The capital gains report is supposed to subtract the cost basis (1030) 
from the net sales price (1970), so your cap. gains should show up on 
the report as 940.  I don't know if that report works yet, but it is in 
development.

> 
> One solution I can see is to do sales as a single entry, transfer
> the initial purchase value back to the bank and make a new transfer from
> a "realized capital gains" account to the bank account. This kind of
> works except that you end up with a negative number of "shares"
> corresponding to the backing out of the initial purchase price.
> 
The report method is easier, but I guess you could do this if you want 
to handle it all in accounts:

Buy:
To/Deb. ABC 100X10  1000
To/Deb. Commission    30
From/Cred. Checking          1030

Sell:

To/Deb. Checking    1970
To/Deb. Commission    30
From/Cred.   ABC 100X10     1000
From/Cred. Commission         60
From/Cred. Capital Gains     940


This sounds like a lot more work,though, than just using the report.


> I notice a large number of options under "Action" but what effect do that
> have on anything?

Right now these don't have any effect as far as I know.  They are notes 
that you choose to identify the type of transaction you are entering. 
I'm not sure what the plan is for these.