Automatically import transactions involving mutual fund

Fredrik Persson fredrik.p.persson at gmail.com
Wed Aug 3 04:15:02 EDT 2011


Hello!

I'm looking for a way to automatically import buying/selling of shares in a
fund.

>From the "broker", I've downloaded a CSV file that looks like this
(excerpt):

Index,Date,Type,Info,Value,Balance
1,"2011-06-02 06:18:39",in,"BTC bought: [tid:100420] 2.54000000 BTC at
$9.62980",254000000,254000000
2,"2011-06-02 06:18:39",fee,"BTC bought: [tid:100420] 2.54000000 BTC at
$9.62980 (fee)",1600000,252400000
3,"2011-06-02 06:18:42",in,"BTC bought: [tid:100421] 1.00000000 BTC at
$9.62981",100000000,352400000
4,"2011-06-02 06:18:42",fee,"BTC bought: [tid:100421] 1.00000000 BTC at
$9.62981 (fee)",600000,351800000

(As you may realise, the "broker" is mtgox.com and I've bought some bitcoins
here.)

"Value" and "Balance" are BTC multiplied by 100000000.

I have set up an asset account of the type "mutual fund", created a security
called "bitcoin" of type "fund" which I've set as the security for this
account.

(Also, to make the matter even more complex, mtgox.com splits USD into
fractions smaller than $0,01. So in order to keep track of my USD balance as
well as my BTC (bitcoin) balance on mtgox, I've created a second mutual fund
account holding a security called "MTGOXUSD" which are usually worth almost
exactly as much as a USD, to be able to keep track of those tiny fractions
(0,001) that are not allowed in the USD currency in gnucash.)

Let's leave that complexity aside for a moment though, as the first thing I
want to know is; what is the fastest, easiest way to import the CSV into
gnucash? Of course, I have tried the CSV import functions back and forth but
it does not seem to support importing price and number of shares in any way
whatsoever.

A have a LOT of these transactions, so to enter them all manually is really
not an option. I'm looking into converting the CSV into OFX. Is that a
possible solution?

I can do some perl/python/java programming if that would help in any way.

TIA

Fredrik Persson


More information about the gnucash-user mailing list