Another Advanced Portfoio update

Gregory Gincley rollenwiese at fastmail.net
Mon Mar 24 20:03:35 EDT 2014


Thanks Mike for looking into it. I'm not set up to build from source at
the moment, but I'll check it out later tonight if I can.

-Greg

On 03/24/2014 07:12 PM, Mike Alexander wrote:
> --On March 23, 2014 10:32:46 PM -0400 Gregory Gincley
> <rollenwiese at fastmail.net> wrote:
> 
>> Hey there, it's very possible I'm misunderstanding the definition or
>> purpose of the cost basis calculation in this report, but I'm not
>> understanding how it's arriving at the value it does for the small set
>> of transactions below.
>>
>> Using Gnucash 2.6.2
>>
>> Given the report options:
>>
>> Effective Date: 10/6/2011
>> Price Source: Nearest in Time (Transaction preference, using the price
>> list has the same result)
>> Basis Calculation Method: FIFO
>>
>> Transactions:
>>
>> Buy:  07/29/11 110.65 at 36.15   $4000
>> Buy:  08/12/11 47.259 at 31.74   $1500
>> Sell: 10/04/11 -0.165 at 29.697  $4.90
>> Sell: 10/04/11 -0.661 at 29.6823 $19.62
>>
>>
>> The Advanced Portfolio report shows a basis of $5473.06
>> I guess I'm expecting it to show $5470.14 instead.
>>
>> ((110.65-(0.165+0.661))*36.15)+1500
>>
>>
>> There are transaction prior to this date, but 7/29/11 is the first
>> transaction after a zero balance.
>>
>> Again maybe I'm going about my calculation incorrectly? Any insight
>> would be appreciated - Thanks,
> 
> I just pushed a change that should fix this.  Thanks for reporting it.
> The basis calculation code didn't work right if there were two or more
> lots and a sale involved a partial lot that was not the last (FIFO) or
> first (LIFO) lot.  I honestly don't know how this had been missed
> before, but I added it to me test data so it hopefully will stay fixed.
> 
>          Mike
> 


More information about the gnucash-user mailing list