Tracking cost basis of shares

Robert Graham Merkel rgmerk@mira.net
Mon, 10 Jul 2000 14:37:34 +1000 (EST)


Dave Peticolas writes:
 > Robert Graham Merkel writes:
 > > Whilst discussing reports in the past week or two, it's become clear
 > > that we need to track
 > > which parcels of shares are sold when a sale is made.  Dave, Rob, Bill
 > > - have you already got a solution for this, or do you want me to come
 > > up with one?
 > 
 > Right now we have a partial solution using the src/engine/Queue.c
 > routines and the xaccSplitGetCostBasis call. This is currently used in
 > creating the portfolio report. This uses FIFO rules for selling.
 > However, you can't configure it to use a different rule and brokerage
 > fees are not included in the cost.

The point, however, is that a "rule" isn't enough.  People play around
with this from transaction to transaction in order to minimise tax,
so we need to be able to store the details for each transaction.

 > So, we do need a more general solution. No one is working on it,
 > so feel free to do so. The current code really needs to be more
 > independent from the engine and part of the 'calculation module'
 > we've been talking about creating.

Yes, the calculation can and should be taken out of the engine, but
storing the data is very much an engine issue.

------------------------------------------------------------
Robert Merkel	                           rgmerk@mira.net

------------------------------------------------------------