Implementing proper cost basis tracking for shares

Robert Graham Merkel
Thu, 19 Oct 2000 11:35:08 +1100

A while ago (check the mail archives), we had a discussion on 
share reporting, and specifically, calculating share cost basis.
The upshot was that we need to track which parcel of shares a share
sale comes from.  With the new file format and hash store now
available, it's time to think about doing it.

As far as I can see, all we need is for each share account to
store a table with the details of the currently owned parcels,
and each "sell" transaction to contain the details of which parcels
have been sold.

The next question is "how do we track income and expenses related to
a particular share account?", such as dividend payments, brokerage
fees and the like.  My initial suggestion is for 
each share account to contain a "accounts containing income/expense
transactions related to this account" list, and each transaction
related to a share account should have a "Hi, I'm a <share account
foo> transaction".  The other alternative is to insist that dedicated
account(s) be set up so that every expense and all income 
related to trading a particular stock should be placed in those

Comments, everyone?

Robert Merkel