Price Source for Mutual Fund and Stock

Doug Brown toquehead at gmail.com
Fri Mar 21 13:34:01 EDT 2008


I am no expert here - new to Gnucash and double entry accounting, but 
what I would expect and like is for "weighted average" to use only 
transaction prices and to average the prices based on the number of 
shares purchased at each price.  This is what you would need to 
calculate a capital gain/loss using an "average cost" basis.

I set up a very simple gnc database to test this a bit, but am having 
trouble. I created a very simple chart of accounts with 1 security, 1 
brokerage account, 1 mutual fund, and 1 bank account. I put two buys in 
for the mutual fund (ABC):

1/jan/2008, buy 100 shares @ $10
15/feb/2008, buy 100 shares @ $20

I manually entered one price for ABC:
1/feb/2008: $11

I first ran the "Investment Portfolio" report. It defaults to using a 
price setting of "most recent". It used $11, so it apparently only 
looked at the price db. If I use "nearest in time", I also get $11. If I 
select "weighted average", get: "Report error \n An error occurred while 
running the report."

I tried the "Advanced Portfolio" report. If I unselect the "Set 
preference for price list data" check box, I also receive the same 
generic report error. If I enter a sale:

20/feb/2008 sell 100 @ $15

Then the Advanced Portfolio correctly calculates my Basis to be $1500 if 
I specify "Basis calculation method" to be "Average" (or $2000 if I 
specify FIFO).

Any ideas on my report errors?

On a related note, I have read of a UI utility to help the correct entry 
of a sale of a security (5 splits), but I have not found it. Is it 
implemented?

d.

Derek Atkins wrote:
> Weighted average uses only the transaction information, I.e., #shares
> and "value" for each transaction.  But how it uses that information, I
> don't know.  You could look in the sources to see?
>   


More information about the gnucash-user mailing list