Price Source for Mutual Fund and Stock
    Doug Brown 
    toquehead at gmail.com
       
    Tue Mar 25 14:17:15 EDT 2008
    
    
  
   Derek Atkins wrote:
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."
Take a look on the terminal or /tmp/gnucash.trace for more information
on the actual report crash.
   I'm on XP, so I don't get any output to the terminal - could be because
   gnucash.bat launches gnucash-bin via a "start" command. <Actually no, I
   changed the batch file to not use "start" and I still don't see stderr
   in my terminal>. The gnucash.trace file contains:
   *   WARN <qof.engine> [guid_init()] only got 2022 bytes.
   The identifiers might not be very random.
   *   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid
   window handle.
   *   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid
   window handle.
   *   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid
   window handle.
   *   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid
   window handle.
   *   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid
   window handle.
   *   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid
   window handle.
   *   CRIT <gnc.backend.file> commodity_ref_to_dom_tree: assertion `c'
   failed
   Hopefully that means something to you.
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?
Not without a guile backtrace.
   I did a little searching to figure out what a "guile backtrace" is, but
   didn't learn much. Can you provide a link that will explain it to me?
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?
I'm afraid that I know of no dialog that will do that.
   Bummer. If I could find time and IQ to contribute, handling of
   investments is where I would start.
   Thanks.
   d.
    
    
More information about the gnucash-user
mailing list