Wrangling my finances

October 21, 2008 at 12:42 PM | categories: cool stuff, emacs, economics | View Comments

I've gotten better at thinking about my finances over the years but I've never had anything better than a mental budget. I've never actually written anything down on paper. I've got a brand new job so I figure I've got a clean slate. Starting right now, I pledge to myself to keep a balanced checkbook at all times and to do monthly reviews of my finances looking for things to cut out of my budget.

Fiscal Conscience: Ha! How many times have you said that?
Me: Dozens of times!
Fiscal Conscience: And did you ever actually do it?
Me: No, but this time it will be different!
Fiscal Conscience: You're going to have do to better than that!
Me: Fine, I'll show you.

GnuCash is a wonderful piece of open-source accounting software. I have used it myself, dozens of times. But as it happens I inevitably stop using it. Not because the software is flawed per se, it does everything a good accounting application should do:

  • Use Double-Entry accounting
  • Support multiple currencies
  • OFX import from online banking sites
  • etc

The only thing they get wrong is the fundamental design choice they made when developing the application: they made it a GUI. Sure, GUIs are great, but in my opinion GUIs should be interfaces to a service oriented application rather than the application itself. Unless I'm sitting at my desk at home I can't use my application. I don't consider remote desktops a reasonable response to this problem due to the huge network latency issues as well as firewall problems.

I want to be able to record my transactions from anywhere. At home at my desk, at work at my desk, on my N800 when traveling, or on my phone when running around. With an application fundamentally written as a GUI this is essentially an insurmountable problem. An application written as a service can do all of these things quite easily with minimal amounts of programming.

Enter Ledger.

Ledger does not keep track of your accounts. You keep track of your accounts in a plain text file and Ledger helps you understand them better. I can update my checkbook register from any text editor, anywhere I am. Most often this is Emacs through SSH on my home computer. Because of the triviality of the file format (being plain text) I can write a simple application that takes text messages from my phone and adds them to the register automatically.

But what about all my automatic payments?

I have most of my monthly payments automatically debited from my account. This is nice since I don't have to spend the time submitting payments to X number of companies each month, but is a nightmare when it comes time to balancing my checkbook. What I have done in the past is to just import an OFX file from my bank directly into GnuCash. This works great until you realize that something is wrong with the import and your checkbook is no longer balancing correctly. For this reason alone I prefer to record each transaction I make by hand. My money is my responsibility after all.

So, I wanted to be instantly notified of any debit on my checking account as soon as it happens. This gives me the following:

  • A text message to my phone describing the time, place and amount of the transaction
  • The total balance of my account
  • A way to constantly keep an eye on how I'm spending my money without the hassle of (remembering to) signing into my bank account
  • A reminder to balance my checkbook. (tells me when my actual checking balance has been out of sync with ledger for over 48 hours.)

The central peice to this process is getting the transaction data from my bank account. My bank offers online banking but it does not offer an easy way to download my transactions. Sure it supports Quicken and MS Money exports, but its all protected behind a password protected javascript-enabled website. I wanted to use the wonderful mechanize library for python. However, it doesn't support javascript.

Enter Selenium RC.

Selenium RC is an application that can remote control a real web browser and submit and receive data. I run selenium which launches Firefox in a headless X-server (Xvfb) and continuously refreshes my online banking site and parses out my account activity. This is probably a bit memory intensive to always keep a browser open for this specific purpose. I may want to experiment with python-spidermonkey in the future and go back to using mechanize, but I think there's a lot of glue missing in that solution whereas Selenium RC works perfectly right now!

No code to share at the moment, it's all a giant hack. If a similar setup appeals to someone out there, let me know and I'll think about releasing something.

Read and Post Comments

Ron Paul on the Dollar, Gold, and Oil

January 09, 2008 at 01:03 AM | categories: python, ron paul, economics, liberty rants | View Comments

Everyone that drives a car knows that gasoline has gotten a lot more expensive over the last few years. But very few people seem to correctly understand why this is. Ron Paul, in his latest debate appearance, laid it out quite plainly, but it takes keen and willing ears to fully appreciate it:

The value of oil hasn't changed at all -- instead, the value of our dollar has tanked. The value of oil, relative to gold, has sat unchanged since 2000 (and even well before that). This means that if you got your paycheck in gold instead of dollars you'd still be paying the same price for gas as you were a decade ago.

The gas prices are not the fault of greedy capitalists. No gas company is "gouging" you. On the contrary, seemingly high gas prices are not due to any free market force at all, but rather due to the fascist cooperation of a complacent, apathetic, congress and the Federal Reserve. Our government has an insatiable appetite to print money out of thin air to support a massive military industrial complex as well as a socialist, redistributionist, welfare state. This monstrously inflates the money supply -- robbing the value of your dollar.

I decided to prove this for myself, that the golden price of oil is relatively stable. I downloaded historical gold spot prices, as well as historical crude oil prices. Using a bit of Python and matplotlib, I produced the following graph:

Oil Prices in Gold, Dollars, and Euros

I'm not an economist, so I was fairly pleased when I saw that what I came up with correlated fairly well with the graph that the Wall Street Journal published. This graph shows that oil costs 3.5 times as many dollars as it did in 2000, and yet the oil price in gold has barely changed at all in the past eight years.

Everyone should be putting their money into an account with interest of some kind, and not just letting their money sit around uninvested. But at the rate that the dollar is losing its value, even "high" interest investments aren't paying out faster than the current rate of inflation (and as the above graph shows, that inflation is a lot more than the 3% the government would tell you). If we simply legalized alternative, market based currencies (as opposed to raiding and plundering them), we could have much larger gains on our investments as well as not losing any value on any money left uninvested.

This issue has been the core of Dr. Paul's career since the 1960's. It has taken the American people a very long time to wake up to this issue, and so it is an immense credit to his character that he has shown an undying vigilance, these many years, to the pursuit of liberty. I too, have hope for America.

(If anyone is interested, here is the python code (as well as the data files) used for the graph. )

Read and Post Comments