Imported QIFs of !Type:Invst Split Incorrectly

Tom Vrankar twv at cox.net
Wed Aug 8 04:26:23 EDT 2007


Trying to import a QIF of !Type:Invst into GC 2.2.0 on WinXP. My primary 
problem is that one split of each transaction goes to the account I 
expect, but the other does not. There are secondary problems I'll 
mention as I go.

Any or all of this may just be a result of my misunderstanding the model
that GC is following. I've read the concept guides, manual, help, mail 
list archives, and google. Everything else I've been using in GC works 
so well (CCard and Bank QIFs, SX, manual investment accounts with 
Finance::Quote, etc).

The files 401ka.qif and 401kb.qif are example QIFs to reproduce the 
problems. They include selected transactions from actual Fidelity 401(k)
QIFs downloaded in July. The two files generally show money flowing into 
the 401(k) as pre-tax and match contributions, with some management fees 
being sucked out, and some funds transferred from one security to 
another. There are some loan repayments, but there are no examples of a 
loan withdrawal or a distribution.

I would have filed in Bugzilla, but didn't see an option for uploading 
example files.

Note that one transaction includes a "Nnull" record (rather than NBUY,
NSELL, or NShrsOut, the only other N records I've seen); I have been 
unable to locate a Invst QIF decoder on the web, so I don't know if this 
may be produced by a bug in Fidelity's QIF writer)

Step 1: Create an empty database, with the default account tree + 
Investment accounts + Retirement accounts. In the druid where it asks 
which accounts are to be placeholders, I believe the Retirement accounts 
are drawn incorrectly (showing Investments as a top level; they turn out 
fine).

Step 2: Create a few additional accounts:
   Assets:Investments:Retirement:Exchange of type Bank (for exchanges 
between investments within the 401(k); normally idles at 0 balance)
   Income:Pre-Tax Retirement Salary of type Income
   Income:Pre-Tax Retirement Cap Gains of type Income
   Expenses:401(k) Management Fees of type Expense
If you create the accounts later when the druid asks you to associate 
Memos to accounts (step 4 below), the GUI fails to provide a widget to 
let you specify the type, and some end up under Assets 2: Investments 2: 
etc. Also, the dialog that pops up to ask for new account names at that 
point in the druid uniformly gets positioned _under_ the parent (at 
least on Windows), causing a noob like me to think GC has frozen. And 
the GUI doesn't make it clear whether the account name it's requesting 
is relative or absolute.

Step 3: Now import 401ka.qif. Everything in USD. Set the account name of 
the file to Assets:Investments:Retirement (I believe it doesn't matter 
if this is done with a !Account header or in the druid). Matching QIF 
accounts to GC accounts should match one-for-one. Continuing in the 
druid, notice there are no Unspecified category transactions.

Step 4: When matching memos to GC accounts, I assumed this to be the 
place I specify the other split of each transaction in the QIF. So, 
Contributions and Loan Repayments map to Pre-Tax Salary; Fees to 
Management Fees; Investment Return to Pre-Tax Cap Gains; and Exchanges 
to Exchange (I believe I got the same results below whether I mapped in 
the druid or by tagging each transaction with an 'L' record in the QIF).

Then see the results; a number of things look wrong:

A. None of the associations of Step 4 seemed to work. Both splits of 
each transaction ended up within the Retirement subtree. For example, in 
As:In:Re:AM CENT SM CAP... on 7/21/2005, the left-column split amounts 
go to the security account, the right-column split amounts (I'm not an 
accountant and can't keep "credit" and "debit" straight) go to the 
parent account As:In:Re. I don't even know what that's supposed to mean. 
I expected this Contribution transaction to have one split in the 
security account and the other in Pre-Tax Salary. I worried that this 
had to do with the association in Step 3 above, that all splits would be 
contained within As:In:Re, but Exchange was in there and received no 
splits, and Retained Earnings isn't, but did. And this kind of thing 
works fine (i.e. as I expect) with CCard and Bank QIFs. The type of the 
created security accounts is mostly right: Stock; Mutual Fund would be 
more precise but I don't think it matters here. I don't understand the 
point of the distinction in GC.

B. In the account tree view under Assets:Investments:Retirement, each of 
the new securities don't show a total with a $ or decimal point, just a 
"0". Although their registers are full of transactions. But the parent 
account As:In:Re itself is negative.

C. A Retained Earnings account has sprung up, and my Fees have split 
there, instead of under Expenses as I thought I asked. I don't know what 
this means.

D. Nearly every transaction results in a rounding error-induced 
Imbalance, but I think others have brought this up before. I'll just say 
that I'dexpect that the transaction Price would be the value to 
recalculate (only the Quantity and Totals are immutable) to make the 
imbalances go away. I think I can pre-process for this if it can't be fixed.

E. Once more in As:In:Re:Am CENT SM CAP..., after the 9/01/2005 
transaction, balances are no longer presented. What happened? I notice 
also that when I later import 401kb.qif (more of the same for later 
dates), now the OAKMARK security account register doesn't display 
balances after the third transaction.

F. For many transactions (again in e.g. As:In:Re:Am CENT SM CAP...), the
number of shares is presented as a fraction when you select the 
transaction (or a split in a split view). I've only ever seen Prices 
presented as fractions, and that only historically now, never share 
Quantities, so this is distracting. I found no Preference for this.

I hope this describes the problem. Let me know if there's more you need. 
And thanks for your attention and help.

						twv@
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 401ka.qif
Url: http://lists.gnucash.org/pipermail/gnucash-user/attachments/20070808/d331edc1/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 401kb.qif
Url: http://lists.gnucash.org/pipermail/gnucash-user/attachments/20070808/d331edc1/attachment-0001.pl 


More information about the gnucash-user mailing list