export/import from/to gnucash; and Cost Basis report

David Zelinsky dzpost at dedekind.net
Sun Feb 10 23:44:36 EST 2013


I have the following problem.  For the past few years I have been
keeping track of some mutual funds held in a custodial account for my
daughter, who is now old enough to handle it herself.  She already has a
gnucash account tree that she uses for her bank acount and budgeting,
but now she wants to add accounts for the mutual funds.  Meanwhile, I
have all the data for the funds in my own gnucash file.

QUESTION 1 -- How can I export the mutual fund accounts data from my
gnucash file in a form that she can import to her gnucash file?

The only Export option I see is "Export Accounts", but that only exports
Account metadata, not the transactions.  It's the transactions that I'm
concerned about.  Plus, I don't care about all transactions, just the
ones involving the mutual funds in question.  (I realize there would
complications in dealing with all the splits, but still it would be
useful.)  I suppose I could write a perl script (or something) to parse
the Transaction Report and produce a qfx file that could be imported to
gnucash, but that seems like an enormous kludge.

Lacking an easy method to transfer all the dividend reinvestment
transactions from my file to my daughter's, the other option I
considered is having her start with an Opening Balance transaction,
consisting of a purchase of the current balance of shares, at a price
equal to the current average cost basis of the account.  Which brings me
to:

QUESTION 2: Is there a way (e.g. a report) to get gnucash to calculate
the average cost basis?

Obviously I can do it by hand (add up all the purchase amounts), but
that seems pointlessly tedious and error-prone.  I've read descriptions
of methods to report cost basis in conjunction with a sale transaction,
but I don't have a sale transaction; plus I've read that this method
only uses FIFO, not average cost.

I'm surprised there is no available report that calculates average cost
basis.  Is that really true?  If so I may have to figure out how to use
the report API so I can write one.

-- 
David Zelinsky
dzpost at dedekind.net


More information about the gnucash-user mailing list