New 401(k) doesn’t even support QIF

The 401(k) program we switched to this year happens to have been a step backward as far as support for exporting transactions. In talking with Alan about it, he said he’d downloaded a program to convert the CSV they export into a QIF. In looking at the QIF format, I just decided to whip up something to do the conversion for me. This converts the export from MVP Plan Administrators to QIF and imports successfully into Quicken for Mac 2007.

#!/usr/bin/perl

#based on: http://en.wikipedia.org/wiki/QIF

open(INH, "< ". $ARGV[0]);
open(OUTH, ">". $ARGV[0]. ".qif");

print OUTH '!Account
NDavid\'s New 401k
TInvst
^
!Type:Invst
';

<INH>

while (<INH>) {
        chop;
        chop;
        s/\$//g;
        @vals = split /,/;

        if ($vals[3] eq 'RECEIVABL') {
                next;
        }
        print OUTH "D" . $vals[0] . "\n";
        print OUTH "N" . $vals[5] . "\n";
        print OUTH "Y" . $vals[4] . "\n";
        print OUTH "T" . $vals[9] . "\n";
        print OUTH "I" . $vals[8] . "\n";
        print OUTH "Q" . $vals[7] . "\n";
        print OUTH "M" . $vals[6] . "\n";
        print OUTH "^\n";
}

close OUTH;

Known issues:

  • You still need to go through and mark Dividend transactions as such.
  • Doesn’t handle Sells very well, especially when these are to cover fund fees

Related posts

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>