oddity in qfx file

Dave Reiser dbreiser at earthlink.net
Mon Feb 19 12:48:20 EST 2007


John Rakestraw wrote:
> Or perhaps the oddity is in me?
> 
> I'm setting up the HBCI import of different accounts. All goes well for
> checking and credit card accounts.
> 
> However, when I set up a money market account and then imported the
> data, I saw that all of the transactions were reversed -- reinvested
> dividends and deposits that should show up as positive in my account
> instead showed up as negatives, and negatives (i.e., money I withdrew
> from the account) showed up as positives. Not good.
> 
> So I downloaded the qfx file from the site to take a look. Here's a
> reinvested dividend transaction from the file:
> 
> REINVESTED 
> DIVIDEND</INVTRAN><SECID><UNIQUEID>903288306<UNIQUEIDTYPE>CUSIP</SECID><INCOMETYPE>DIV<TOTAL>-2.7<SUBACCTSEC>CASH<UNITS>2.7<UNITPRICE>1.0<COMMISSION>0.0<FEES>0.0</REINVEST
> 
> And here's a redemption transaction from the file:
> 
> FUNDS TRANSFER
> REDEMPTION</INVTRAN><SECID><UNIQUEID>903288306<UNIQUEIDTYPE>CUSIP</SECID><UNITS>-4000.0<UNITPRICE>1.0<COMMISSION>0.0<FEES>0.0<WITHHOLDING>0.0<TOTAL>4000.0<CURRENCY>
> 
> The reinvested dividend should add to the total in my account, and I
> see that the <TOTAL> amount is -2.7 and the <UNITS> amount is 2.7. The
> amount is imported as a subtraction from my account. And in the
> redemption, the <TOTAL> amount is 4000.0 and the <UNITS> amount is
> -4000.0. The amount is imported as an addition to my account.
> 
> The upshot is that the import adds money to my account when it should
> subtract it, and it subtracts money from my account when it should add
> it.
> 
> (Checking and credit card accounts from the same financial management
> company import correctly.)
> 
> My question: Is this a mistake in the qfx file, a mistake in my account
> set-up, or a gnucash bug? (Yes, I know it's most likely to be the 2d,
> so I'll also ask what I might do to fix it.)
> 
> However, that would seem to be such an odd mistake in the qfx file that
> I'm thinking it must not be a mistake and that instead I have something
> wrong in the way I've set up the account. It's a money market mutual
> fund set up as account type "mutual fund." I've also tried it with the
> account type "bank" (since it functions more like an interest-bearing
> savings account) but that doesn't work either.
> 
> Gnucash 2.04 on Fedora Core 6.
> 
> Thanks.
> 
The OFX spec says that for reinvestment transactions, "TOTAL and UNITS 
are signed as for an investment buy" so it looks like your qfx file has 
it right -- the reinvestment TOTAL is negative because cash flows out of 
your account to purchase the security.

I would have expected the mutual fund account type would work properly. 
You need to make sure that the account is denominated in "units" rather 
than dollars, even though it looks like there's a 1:1 exchange rate all 
the time.

My broker has my sweep account so convoluted that I haven't been able to 
figure out how to handle it yet, so I don't have any experience setting 
up money market accounts.

Dave
-- 
David Reiser
dbreiser at earthlink.net



More information about the gnucash-user mailing list