accounting for stock trades

Ed Warnicke hagbard@physics.rutgers.edu
Thu, 02 Jan 2003 23:11:11 -0500


Derek,
    Thanks for your patients in explaining this.  I can tell it's 
starting to
frustrate you, and I appreciate your persistence.  

    So what it seems to me that you are saying is that the life cycle of 
a simple stock
account would go something like this:

1)    I purchase 100 shares of AMD with 500 USD on Date1.  This creates 
a transaction consisting
of two splits:

        Transaction (Date1)
        Description        Account        Debit    Credit
Split-> Stock Purchase     CashAccount    500      
Split->                    AMDAccount              100

where the commodity for CashAccount is USD and the commodity for 
AMDAccount is AMD.
In addition to posting this transaction, we also post a Lot

                  Lot ( AMDAccount )
                  Commdity(AMD)        AltCommodity(USD)        Date
LotEntry->        100                  500                      Date1

It strikes me that a lot would be associated with exactly one account 
(AMDAccount in this example).
( By the way, do we have a better word than LotEntry for this? ).  A 
LotEntry is associated with exactly
one date. By constrast a transaction is associated with exactly one 
date, and a Split is associated with
exactly one account.  Because the sum over all LotEntry's of the 
Commodity ( not the AltCommodity ) is
non-zero, this is an open lot.  Because it is an open lot it will be 
reported in the balance sheet as an
unrealized gain/loss.

2)    I sell 100 shares of AMD for 1000 USD on Date2.  This creates a 
transaction consisting of two
splits:
        Transaction ( Date 2)
        Description        Account        Debit       Credit
Split-> Stock Purchase     AMDAccount     100   
Split->                    CashAccount                1000

In addition we also post too the  Lot

                 Lot ( AMDAccount )
                 Commodity(AMD)        AltCommodity(USD)        Date
LotEntry->       100                   500                      Date1
LotEntry->       -100                  -1000                    Date2

The lot is now closed because the sum of Commodity over the Lot is now 
zero.  Because the Lot is
now closed the sum over AltCommodity will be reported as a realized 
capital gain/loss in the balance sheet.

Is this what you meant?  Please correct any inaccuracies you see here.

Ed



Derek Atkins wrote:

>Read my text: IMHO there IS NO SPLIT THAT REPRESENTS THE GAIN/LOSS.
>The gain/loss is COMPUTED, based on the DIFFERENCE between purchases
>and sales of a commodity LOT.  The lot is balanced when the number of
>shares hit zero.  The gain/loss is the sum of the VALUES of all the
>splits.
>
>For example, if a lot contains the following three splits:
>
>Amount(Shares)  Value
> 50             500
>-20             -400
>-30             -150
>
>You will notice two things.
>1) this lot is "closed" (it has an amount balance of zero)
>2) you can compute the loss(gain) as the sum of the values: 500-400-150 = 50 gain
>
>You don't need a "balancing" split -- there is nothing to balance.
>And no, I do NOT believe that you should have a single, unbalanced
>split to denote losses or gains.
>
>-derek
>
>"Phillip Shelton" <shelton@usq.edu.au> writes:
>
>  
>
>>That still does not address where the balancing entry for the gain/loss is put. (At least it does not do it for me.)  And I thought that was the point of double entry accounting.  I will admit I am very new to the field of making money.
>>
>>Maybe, (And you would lean toward this, Derek?) capital gain is allowed to be "unbalanced"? The balancing entry is the reduction of the "hard" asset.
>>
>>-----Original Message-----
>>The bug (IMHO) is that gnucash is not tying the purchases to the sales
>>in order to compute the gain/loss.  I'm not _AS_ convinced that the
>>gain/loss MUST imply a split to an income/expense account.
>>
>>-derek
>>
>>"Phillip Shelton" <shelton@usq.edu.au> writes:
>>
>>    
>>
>>>Is it a bug then that the gain is currently un-balanceable?
>>>      
>>>
>>_______________________________________________
>>gnucash-devel mailing list
>>gnucash-devel@lists.gnucash.org
>>https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>>    
>>
>
>  
>