> Dave Peticolas wrote:
> > > > Right now I believe it is only used in the Portfolio report,
> > > > under the 'cost' column.
> > >
> > > I checked this, and I have a bug report:
> > >
> > > The cost value is wrong sometimes. There seem to be two
> > > error situations:
> > >
> > > - accounts with an opening balance not equal 0.
> > >
> > > - accounts where shares are partly sold and later bought again.
> > 
> > Are you sure these are wrong? By default, the cost is computed
> > with FIFO accounting. Could you given an example?
> 
> OK, an example (real world numbers):
> 
> date        description      sold     bought   price   value     tot.shrs.  t
> otal
> 01.01.1999  opening balance           102.319  147.65  15107.40  102.319    1
> 5107.40
> 25.05.1999  price                              170.47            102.319    1
> 7442.32
> 12.11.1999  dividend                    0.533  195.56    104.23  102.852    2
> 0113.74
> 31.12.1999  fee              0.086             224.84    -19.34  102.766    2
> 3106.11
> 
> The cost basis here is 15107.40 + 104.23 - 19.34 = 15192.29, right?
 
With FIFO accounting, I believe it should be

  15107.40 + 104.23 - (.086 * 147.65)

In other words, when you sold the shares, you sold the 'first' ones
you bought.

> The portfolio report states costs of 30202.10, this is definitely wrong.
 
Yes, that seems wrong. I'll look into this.

thanks,
dave

--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to