UvMoney: Home Banking For Mad Scientists

By Thomas Krehbiel

My latest mad-scientist software project idea involves home banking.

Here's the problem I want to solve: I use MS Money, but for various reasons that basically boil down to human error, I sometimes forget to enter transactions into the program. This naturally renders MS Money's account balance incorrect, which can lead to accidental overdraws and silly bank fees. For months now, I've been thinking about ways to remove the possibility of human error, or perhaps I should say to minimize the damage caused by human error.

This week I started working seriously on a software solution. At it's most basic level, this solution will automatically) double-check the data I enter manually by comparing it against online transaction data from the bank. If a transaction shows up online that was not entered manually, it will send an email alert saying, "hey, you forgot to enter something, so you may have less money than you think."

It sounds really easy except for two things:  1) Scraping data from online banking pages, and 2) building a decent home accounting program from scratch.

1. Scraping Transactional Data

For mysterious reasons, most banks do not provide a handy interface for programmers to access their databases.  That means my software will have to scrape data from online banking web pages.  ("Scraping," for those that don't know, is a charming term that describes programmatically getting data from HTML web pages that are meant only for humans to read.)  At first I intended to use .NET HttpWebRequests, but I noticed with dismay that one of my banks obfuscates their web pages inside a series of nested frames.  I'm sure it's possible to navigate them with HttpWebRequests or WebClients, but I started to get the feeling I would basically be implementing my own web browser just to get banking data.

I despaired for a while until I found an open source program called AutoHotkey.  As you can probably guess, this is where the mad scientist part starts to appear. :)  I've devised what I consider to be the most insanely fragile, Rube Goldberg-ian style programming contraption for scraping data ever.  AutoHotkey lets you script and automate mouse and keyboard events, so I wrote a script to load the bank page in a browser, type in all the logins and passwords, and navigate to the checking account register by clicking on the appropriate links.  Then it opens and saves the HTML source for the frame (I had to use Firefox for this part), which is passed into my .NET program that finds the transactional data within the HTML with some regex patterns.  Amazingly enough, it actually works, and I can schedule it to run daily.

2. Building a Home Accounting Program

The other major part is the accounting program itself.  I can't use MS Money because it uses a proprietary file format, and I'm going to need access to the money data I enter at the transaction level to double-check it against the online banking data.  I looked at a handful of open source accounting programs but didn't find anything to my liking.  That means I'm going to have to write my own software.  Daunting, but certainly not impossible.  It's something I've wanted to write since the early 1990s anyway (before Quicken and MS Money came along and did it for me, that is).

I don't need anything too fancy.  Just something where I can enter transactions, categorize them, and display account balances.  I might take this opportunity to investigate some .NET GUI toolkits.

The working title for this project is UvMoney.  Pretty inventive, I think.

Reader Comments

Comments are the property of their respective owners.

1. cynthia said,

By writing this and making it public, aren't you giving away the secrets that are your ticket to not having to work a 9-5, while raking in gazillions in the process?

2. Tom said,

avatar

Nobody reads my blog so it's probably safe. :) Besides, Microsoft and Intuit already have the home banking market sewn up anyway.

3. Sean/Red said,

Check this out, you may find it useful. http://en.wikipedia.org/wiki/OFX

4. Tom said,

avatar

Cool, thanks Red! I knew MS Money and Quicken had some way to get data from banks but I didn't realize it was an open standard. My data scrapers go through an interface so it should be pretty easy to plug in new acquisition methods in the future.

Add a Comment

Name: (optional)
Comment: