A User's view of Hledger

Learning about hledger

2-Step Dance for CSV Import

Some weeks ago I wrote about writing some Emacs Lisp code to import CSV transactions from a mutual fund. One trick that I needed to learn was that the imported CSV transactions often included an extra step, using something they call a “cash” account. I will note that a cash account doesn’t appear on my statements. It’s just there behind the scenes. And to be honest, there is no need for them to include it on a paper statement, because anything that is moved to the cash account is then immediately moved out.

So, is the cash account useless? Not quite. For one thing, it’s a way to keep track of income that you earned. That is, anything that is moved into the cash account that is a gain from investment is income, on which you potentially owe taxes. Then the money in the cash account is moved someplace else, for example, as a reinvestment.

The problem occurs when I view a transfer as one step, such as:

  - outside checking account --> mutual fund money money account

However, the CSV accounting shows the transaction in two steps:

  - outside checking account --> mutual fund cash account
  - mutual fund cash account --> money market account

In fact, the one-step process was so firmly fixed in my mind that I erroneously recorded a couple transactions in one step, not two. I discovered these recently. The first was a seldom occurring type of transaction that I hadn’t taken into account in my CSV import program. My guess is that what happened was that when I saw that the transaction hadn’t been imported, I entered it manually, where I made the mistake of entering one short-cut transaction instead of the two transactions.

The other error I actually discovered as I was writing this column. I noticed this problem when I ran the areg report on the cash account and got a non-zero balance. Since any money moved into the cash account is immediately moved somewhere else, the balance should be zero. Thankfully, with the report of the areg command, I was able to quickly pinpoint the cause of the error and correct it. Again it was due to a manual entry that didn’t jibe with the CSV data.

The moral of the story is that sometimes a shortcut seems to work in the beginning, but ends up causing a problem later on.

This week’s blog post is brought to you by the “is” command.

[To be sung to an appropriate jingle. Pronounce the “is” command the same as the word “is.”]

is is it
is is a hit
is is the way
to do accounting today
so get is
and grow your biz
or tame your personal finance
so you can retire and move to France