Sell stocks with a profit: Capital gains

Alexander Engelhardt kamaitachi at gmx.de
Fri Jan 4 06:13:31 EST 2013


So, I've played around with a sandbox file and this scenario

2013-01-01 Buy  10 shares for 100€ each
2013-01-02 Buy   5 shares for 120€ each
2013-01-03 Sell 12 shares for 200€ each

When I just type those three transactions in, GnuCash does not complain 
and my total profits are given as 0€. This "Lots" facility you talked 
about I found here: Actions->View Lots->Scrub Account.
When I had the fund account opened and then clicked Scrub Account, 
GnuCash made the capital gains entries and even considered this FIFO 
rule, where of the 12 sold shares, 10 were the ones bought for 100€ and 
2 for 120€.

So, now I get it (I think).
Thank you all for your help!

  - Alex

On 01/04/2013 01:44 AM, John Ralls wrote:
 >
 > On Jan 3, 2013, at 12:32 PM, Alexander Engelhardt <kamaitachi at gmx.de>
 > wrote:
 >
 >> Hi David,
 >>
 >> thank you for your answer. The way you described is the way I am
 >> going to do it from now on. I was just curious about why the old
 >> way I did it was even possible. When I had done it that way, I
 >> didn't think about it, but now it seems that those 200€ came out of
 >> nowhere. This is just out of curiosity, but I am still wondering
 >> why GnuCash didn't throw an error and if those 200€ really came out
 >> of nowhere in the old way I did it.
 >
 > It worked without complaint because you did have two splits in the
 > transaction, the stock account and the cash/bank account. Gnucash
 > isn't smart enough to recognize automatically that the the buy and
 > sell transactions didn't balance. There is a "Lots" facility that you
 > can run in the stock accounts that will create the income
 > transactions for you, or you can do it manually for yourself.
 >
 > Regards, John Ralls
 >



More information about the gnucash-user mailing list