Unrealized gains

Derek Atkins warlord at MIT.EDU
Mon Jun 30 12:16:50 EDT 2008


Quoting Charles Day <cedayiv at gmail.com>:

>> Recording only the realized gains will put the books out of balance. When
>> you sell, you have a realized gain on the quantity sold and an unrealized
>> gain on the quantity remaining. You have to record them both.
>>
>> Try removing the unrealized gain splits from either of the examples I
>> attached previously and look how it throws off the trial balance.
>>
>
> Just to (hopefully) clarify, unrealized gains that occur PRIOR to a sale
> don't have to be recorded until a sale actually occurs. I think that might
> be what's throwing you off.

I still don't think I'm being thrown off here.  Honestly, I think the
Trial Balance report is broken in that it's not properly using the PriceDB
entries to compute the UNREALIZED gains.  The only time you should need
to add splits are for actual realized gains (or losses, of course).

Let me try to prove my point, and I'll try to do this by using an
example.  Assume we start out by buying 100 shares of X at date T0
for price P0.  Then on date T1 we see the price changed to P1.  On
date T2 we sell 10 shares for price P2.  On T3 we see the price
is now P3.  Then on T4 we sell another 10 shares for P4.  Just to
make numbers easy, let's say P[i] = $i+1 (e.g. P0 = $1, P1 = $2, etc).

So we have the following data points:

Date     Action     Txn Shares  Txn Price   Txn Value   Gain/Loss
-----    ------     ----------  ---------   ---------   ---------
T0        Buy         100           $1        $100         N/A
T1        None         0            $2                     N/A
T2        Sell        -10           $3         $30         $20
T3        None         0            $4                     N/A
T4        Sell        -10           $5         $50         $40

Note that there are NO GAINS at times T1 and T3 because it's JUST
a pricedb entry.

Similarly, you don't need to RECORD the unrealized gain of the
90 shares at time T2 or the 80 shares at time T4 because you can
compute that FROM the pricedb entry.  The only gain you need to
record is the actual realized change from the actual exchange.

> -Charles

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-user mailing list