Accurate budgeting (by )

If you are paid monthly, then it makes sense to work on a monthly budget. Many expenses are paid monthly, so this works out quite nicely.

However, some things are paid quarterly, or even yearly. If those things are big enough that they can't just disappear into the noise of your monthly budget, you need to budget for a share of them each month, and put that money aside somewhere to save up for the annual costs.

And some things are paid weekly, or (worse) every four weeks. We used to have a self-storage room that cost us about two hundred pounds every four weeks, which was a royal pain as sometimes this meant we paid £200 a month, and sometimes £400. It was hard to lose THAT in the noise.

So, I decided to write some software to work all this out for me.

The basic principle is simple: convert everything - incomes and expenditures and all the totals and subtotals - into "budget objects" that contain a minimum, average, and maximum monthly amount. This is done by creating explicit period objects, which have multipliers to compute the three different numbers from a periodic amount.

(define-record budget
  min
  avg
  max)

(define-record period
  name
  min ; Multipliers to get min, max, or average monthly spend
  avg
  max)

For example, the "monthly" period just has one for all three multipliers. A monthly expense is its own minimum, average, and maximum monthly amount. But the "weekly" period has a minimum multiplier of 4, a maximum multiplier of 5, and an average of 52/12 (which isn't exactly right as there's not quite 52 weeks in a year, but it's good enough). And the "four-weekly" period has a minimum multiplier of 1 and a maximum multiplier of 2 and an average of 13/12. "annual" has a minimum of 0, a maximum of 1, and an average of 1/12. And so on.

(define weekly (make-period 'weekly 4 (/ 52 12) 5))
(define four-weekly (make-period 'four-weekly 1 (/ 13 12) 2))
(define monthly (make-period 'monthly 1 1 1))
(define quarterly (make-period 'quarterly 0 (/ 1 3) 1))
(define annual (make-period 'annually 0 (/ 1 12) 1))

So I can take a periodic spend - "15.00 monthly" - and multiply it by the three multipliers of the "monthly" period to get a budget object.

(define (make-monthly-spend period amount)
  (make-budget
   (* (period-min period) amount)
   (* (period-avg period) amount)
   (* (period-max period) amount)))

With all that out of the way, it's just a matter of throwing together some global state to hold total incomes, total expenditures, and subtotals under various categories for informational purposes (in our case, a spending category, and then which account it's paid from, as we have several), then to write some utility functions to make data entry easier:

(with-subtotal "Communication"
 (lambda ()
   (joint monthly 50 "Alaric's mobile")
   (joint monthly 50 "Sarah's mobile")
   (primary quarterly 60 "Phone line")
   (primary monthly 30 "ADSL")
))

Now, the crucial output of all of this is the total of all monthly incomes minus all monthly expenses. We have to be careful how we define "subtraction" of budgets versus "difference":

(define (budget-diff a b)
  (make-budget
   (- (budget-min a) (budget-min b))
   (- (budget-avg a) (budget-avg b))
   (- (budget-max a) (budget-max b))))

(define (budget-sub a b)
  (make-budget
   (- (budget-min a) (budget-max b))   ; Note difference in ordering
   (- (budget-avg a) (budget-avg b))   ; Here, we work out the worst
   (- (budget-max a) (budget-min b)))) ; and best cases.

budget-diff is used in my report generation to show the difference between the totals before and after a group to work out a subtotal; budget-sub is used to work out the final difference between income and expenditure, and the key thing is that it computes the worst-case minimum spare by taking the minimum income minus the maximum spend, and the best-case maximum spare by taking the maximum income minus the minimum spend.

So what's the result look like? In our case:

TOTAL SPARE                             : min: -658.00  avg: 69.08    max: 214.00

What this means is simple: On average, we'll have a positive amount spare (so over the course of the year, we do break even. Phew). On good months (with only four weeks in, and where none of the annual expenses fall) we'll have £214 spare, which we need to put aside, because in the worst case (a 5-week month in which ALL the annual and quarterly things fall) we'll be £658 short.

So how much do we have spare for impulse purchases each month, then, in practice, if we're saving up our average £69.08s each month? That's easy to work out: as long as we've got at least £658 spare, we will be fine even if the worst-case month occurs (which of course will never really happen, as the annual and quarterly bills don't fall in the same month ever, but it pays to account for worst cases), so at the end of the month, when everything has gone out but before next month's pay comes in, we can spend anything left beyond the last £658.

In theory we could work it out even more precisely, by making the system aware of which months quarterly and annual payments happen, and which months have 4 versus 5 weeks in, so that it actually works out how much we need to put aside in each month and so on - but I don't think it's quite worth the effort!

2 Comments

  • By Maurice Snell, Mon 8th Nov 2010 @ 3:41 pm

    Hi Alaric,

    If you're really spending £100/month for 2 mobile phones, you could be able to save a lot by finding a better deal.

    And, just out of interest, how "worst case" is your worst case, e.g. does it cater for a vehicle becoming unusable, or a flood, or an employer problem such as bankruptcy or redundancy? Of course planning can only help so far...

    I like the planning tool by the way!

    Love to you all,

    Maurice

  • By alaric, Tue 9th Nov 2010 @ 11:43 am

    Our mobile phones are our primary phones, though - we have a landline, but it's just for ADSL provisioning; we're too prone to being in different places for it to really be much use for talking. We're stuck with Vodafone as they're the only folks with good reception down here in the valley, and I do a lot of data traffic! Anyway, that's a worst-case estimate - it's often more like £20-£30 each.

    Anyway, our worst-case covers routine worst cases (a big phone bill one month, etc), but doesn't cover disasters like floods, failing vehicles, loss of income, etc. We have insurance to cover some of those, and hope to accumulate savings again to give us more cover, but some things still require sheer cunning to get out of...

Other Links to this Post

RSS feed for comments on this post.

Leave a comment

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales