Stocks & Capital Gains (Feature Request)

Joshua Moore moorevineyard at
Mon Aug 13 22:38:32 EDT 2007

Well, since I haven't seen any responses I assume this feature doesn't exist 
yet.  Is this an appropriate place to request it?  Also, does anyone else 
even want this feature?  It's pretty important to me, but I guess it would 
fall pretty low on a priority list if no one else is interested.

>From: "Joshua Moore" <moorevineyard at>
>To: gnucash-devel at
>Subject: Stocks & Capital Gains
>Date: Fri, 10 Aug 2007 13:41:47 -0400
>MIME-Version: 1.0
>X-Originating-IP: []
>X-Originating-Email: [moorevineyard at]
>X-Sender: moorevineyard at
>Received: from ([]) by 
> with Microsoft SMTPSVC(6.0.3790.2668); Fri, 
>10 Aug 2007 11:07:28 -0700
>Received: from (localhost.localdomain [])by 
> (8.13.7/8.13.4) with ESMTP id l7AHs9Fm025775;Fri, 10 Aug 
>2007 13:56:22 -0400
>Received: from 
>(8.13.7/8.13.4) with ESMTP id l7AHfouQ025188for 
><gnucash-devel at>; Fri, 10 Aug 2007 13:41:52 -0400
>Received: from ([]) by 
> Microsoft SMTPSVC(6.0.3790.2668); Fri, 
>10 Aug 2007 10:41:49 -0700
>Received: from mail pickup service by with Microsoft 
>SMTPSVC;Fri, 10 Aug 2007 10:41:49 -0700
>Received: from by with 
>HTTP;Fri, 10 Aug 2007 17:41:47 GMT
>X-Message-Delivery: Vj0zLjQuMDt1cz0wO2k9MDtsPTA7YT0w
>X-OriginalArrivalTime: 10 Aug 2007 17:41:49.0580 
>X-Virus-Scanned: ClamAV 0.88.7/3909/Fri Aug 10 11:10:24 2007 on 
>X-Virus-Status: Clean
>X-Scanned-By: milter-sender/0.55.730 ( []); 
>Fri, 10 Aug 2007 13:56:54 -0400
>X-Scanned-By: milter-sender/0.55.730 ( 
>[]);Fri, 10 Aug 2007 13:41:52 -0400
>X-Spam-Status: No, score=0.0 required=5.0 tests=MSGID_FROM_MTA_HEADER 
>autolearn=failed version=3.0.6
>X-Spam-Checker-Version: SpamAssassin 3.0.6 (2005-12-07) on
>X-BeenThere: gnucash-devel at
>X-Mailman-Version: 2.1.8
>Precedence: list
>List-Id: GnuCash Software Design and Development 
><mailto:gnucash-devel-request at>
>List-Archive: <>
>List-Post: <mailto:gnucash-devel at>
>List-Help: <mailto:gnucash-devel-request at>
><>,<mailto:gnucash-devel-request at>
>Errors-To: gnucash-devel-bounces at
>Return-Path: gnucash-devel-bounces at
>The email below is one of the more recent posts that I've found relating to 
>tracking the cost basis of stocks.  Just to be clear, here's my situation.  
>I have an old mutual fund that has had periodic investments for the past 10 
>years and occasional sales.  The original way I calculated capital gains 
>for any sales was by using an average cost basis (figured with a simple 
>spreadsheet), not first-in-first-out.  It looks like gnucash does not have 
>a built in way of handling this for a sale entry.  Is there a plan to 
>include this functionality?  This also seems essential for someone who 
>wants to "close the books" at the end of a fiscal year.  If the person is 
>using an average cost basis for tax purposes, the value to carry forward 
>into the new books needs to be based on average cost in order to calculate 
>any future capital gains properly, right?
>I've been puzzled by a few questions regarding using gnucash to track
>stock investments.
>The help file shows how to track the purchase, sale, and value of
>stocks.  When recording the sale of the stock, one has to include an
>amount from Income:Capital Gains representing the profit on the sale.
>In order to know this amount, I need to track the cost of the shares.
>For stocks, Gnucash seems to track the cost and unrealized gains
>internally so that one does not need an account hierarchy like that
>shown in the help file for the Degas painting.
>How do I use gnucash to determine (possibly years and many individual
>purchases later) what my cost was for the stock?
>If I make a subaccount called cost, and use it in the purchase of the
>stock, it shows a negative value.  Is this reasonable?
>The cash shows as still being in the parent investment account.  In
>fact, the amount of cash in just the parent investment account would
>show the total cost of all stocks and cash in the account.  This does
>not seem right, as I need to track the amount of actual cash in the
>investment account, too.
>In Canada, the commision to buy and sell the stock is added to the
>"adjusted cost base".  So I don't wish to show commisions as simply an
>expense account.  Should I record it as an expense and then record
>another transaction from Income:capital gains to reduce the gains by the
>amount of the commision?  This would certainly work for the sell
>commision.  I would need a way to track the buy commision as part of the
>cost of the stock without altering the price per share.
>How does one handle consolidations and splits of the number of shares of
>stock?  We have a number of exchange traded funds in Canada which do odd
>things with their capital gains.  So that the fund is not liable for
>capital gains taxes, they distribute their capital gains to the share
>holders.  The shareholders then pay the capital gains (and the amount of
>the gain is added to the "adjusted cost base" of the shares due to the
>following).  The distributed capital gains are reinvested in shares of
>the fund.  Immediately, a consolidation is done so that the ending
>number of shares is identical to the number of shares prior to the
>capital gains distribution.  The price of the shares and number
>consolidated is not known, only the amount of the capital gains
>distribution.  (I have previously recorded these in Quicken using
>arbitrary numbers of shares since the important part is how this affects
>my cost of the shares, rather than the exact number of shares.)  This
>produces odd numbers in a consolidation, such as 101 shares consolidated
>into 100.
>Clearly, it is important (and nontrivial) to track the cost of these
>shares for tax purposes.  (I note that Quicken and my brokerage do not
>agree on the cost basis of these shares in my RSP.  For nonregistered
>accounts, the broker does not calculate the cost basis, and I must do it
>See what you’re getting into…before you go there 

>gnucash-devel mailing list
>gnucash-devel at

Booking a flight? Know when to buy with airfare predictions on MSN Travel.

More information about the gnucash-devel mailing list