Personal Finance

Date
Tags finance, hledger, howto
Target Audience Mostly me, & possibly personal finance nerds.
Epistemic Status Documents my way of doing things, doesn't attempt to speak more generally than that.
Attention Conservation Notice You may get something out of this if you're rethinking how you manage your finances.

I manage my money using plain-­text ac­counting (spe­cific­ally, hledger; though the choice of tool is un­im­port­ant), fol­lowing a YN­ABish ap­proach. The four YNAB rules are:

  1. Give every dollar a job: my money is split into named cat­egor­ies, I have no “gen­eral sav­ings”.
  2. Em­brace your true ex­penses: large ex­penses (like a rental de­posit) are planned and al­loc­ated for in ad­vance, as a reg­ular monthly con­tri­bu­tion.
  3. Roll with the punches: if things aren’t working out, I ad­just the plan rather than lie to my­self.
  4. Age your money: I save more of each reg­ular ex­pense (rent, travel, etc) than I spend in a given period, so I gradu­ally build up a buf­fer.

Rather than im­porting trans­ac­tions from my bank or something, I enter all data manu­ally. This may sound te­di­ous, but I feel that the aware­ness I get from doing so is worth it.

Why track my fin­ances at all?

This memo is con­cerned with my mech­anism for im­ple­menting this ap­proach. It could serve as a starting point for your fin­an­cial plan­ning; but working out what your sav­ings cat­egories are and how to al­locate your in­come to them re­quires in­tro­spec­tion.

Journal files

My journal files are shared with sync­thing, so I can add trans­ac­tions from any ma­chine. In prac­tice I tend to just do it from a tmux ses­sion I al­ways have open on my VPS (which also has my IRC client open).

Ac­counts

Ac­counts are broken up into five broad cat­egor­ies:

Then as­sets is fur­ther sub­divided into:

Here are all the reg­ular ac­counts:

In­side my cur­rent ac­count, as­set­s:cash:sant­and­er­:­cur­rent, money is sub­divided by use, fol­lowing YNAB rule 1:

Trans­ac­tions

A trans­ac­tion has a date, a payee, and a list of post­ings:

2018-01-01 Payee
    ac­count1  £amount1
    ac­count2  £amount2
    ...

The amounts must sum to zero, which means that the trans­ac­tion is bal­anced.

hledger al­lows trans­ac­tions to be marked with a ! or a *. The tra­di­tional meaning of these is “pend­ing” and “cleared”.

I use ! slightly dif­fer­ently. I use it for trans­ac­tions which are just an arte­fact of the way I track my fin­ances, which don’t in­volve any bal­ance changes to a real-­world ac­count. For ex­ample, set­ting up my monthly budget:

2018-01-01 ! Budget
    month:­food  £250
    month:fun    £25
    month:other  £25
    saved:­monthly

I use * as nor­mal, al­though I usu­ally only con­sider cash trans­ac­tions “cleared” when I check that the cash in my wallet matches what hledger thinks it should be.

In­come

In­come is re­corded as the pre-tax amount coming from in­come:$­source, and is split across saved:*, ex­penses:tax:*, and li­ab­il­it­ies:*. All amounts are in­cluded.

2018-05-30 Com­pany Name
    saved:­house­hold       £50
    saved:­monthly        £400
    saved:rent          £1300
    saved:web             £50
    ex­penses:tax:in­come  £250
    ex­penses:tax:ni      £200
    li­ab­il­it­ies:slc       £75
    in­come:­com­pany     -£2325

In­come may not ne­ces­sarily be taxed:

2017-10-01 Sant­ander
    saved:­monthly  £4.26
    in­come:in­terest:sant­ander

In­vest­ments

In­vest­ments are a trans­ac­tion from saved:in­vest to the ap­pro­priate in­vest­ment ac­count. All amounts are in­cluded, using the @@ form to ex­actly spe­cify the overall price. Trading fees go to ex­penses:fees:$broker.

2017-12-18 Coin­base
    as­set­s:in­vest­ment­s:­coin­base  0.25 LTC @@ £60.17
    ex­penses:fees:­coin­base  £2.50
    saved:in­vest          -£62.67

A broker may have sub­ac­counts:

2018-08-01 Fi­delity
    as­set­s:in­vest­ment­s:cav­endish:s&s  31.19 MCOUA @@ £50
    as­set­s:in­vest­ment­s:cav­endish:s&s  65.15 MCMEA @@ £100
    as­set­s:in­vest­ment­s:cav­endish:s&s   7.15 MHMIA @@ £50
    as­set­s:in­vest­ment­s:cav­endish:s&s   2.56 VADEA @@ £800
    saved:in­vest  -£1000

A broker may charge a man­age­ment fee by selling some of the as­sets:

2018-01-03 Cav­endish
    as­set­s:in­vest­ment­s:cav­endish:s&s  -0.02 MCMEA @@ £0.03
    ex­penses:fees:cav­endish  £0.03

Al­though it is best to keep some cash in the ac­count, if pos­sible, to avoid the as­sets from being whittled away.

Ex­penses

There are two main types of ex­penses: ex­penses from my cur­rent ac­count, and cash ex­penses. The former are straight­for­ward:

2018-01-01 Subway
    ex­penses:­food  £5.99
    month:­food

Cash ex­penses re­quire an ad­just­ment to the ap­pro­priate budget cat­egory, trans­fer­ring money back to the float to rep­resent that that money has been al­loc­ated and spent:

2018-01-06 Mor­risons
    ex­penses:­food  £2.43
    as­set­s:cash:hand
2018-01-06 Cash budget spend
    month:­food  -£2.43
    cur­rent:­float

This could be done in one trans­ac­tion, but I think it’s clearer with two.

Re­im­burse­ments

Re­im­burse­ments are much like in­come, but are gen­er­ally un­taxed. In­come comes from some re­im­burse­ment ac­count and is put in some sav­ings ac­count:

2018-01-04 Pusher
    saved:de­posit  £186
    as­set­s:reim­burse­ment­s:pusher

As with in­come, the re­im­burse­ment could be split over mul­tiple sav­ings ac­counts.

Pre­dicting the Fu­ture

Pre­dicting the fu­ture can be the down­fall of an oth­er­wise-­sound fin­an­cial plan. Al­ways be pess­im­istic! Only in­clude in­come which you are cer­tain you will get (bar­ring some ex­treme change in your life cir­cum­stances); but in­clude any ex­penses you can think of, even if they are un­likely. If you can be pess­im­istic and still have some wiggle room in your plan, then you are prob­ably in a good place.

Budgeting

By a “budget” I mean an al­loc­a­tion of cur­rent money to ex­pense cat­egories and new money to sav­ings cat­egor­ies. I budget on a monthly basis.

Firstly, my monthly ex­penses:

~ monthly
    month:­food        £250
    month:fun          £25
    month:other        £25
    saved:­monthly    -£300
    ex­penses:servers   £40
    saved:web         -£40

~ monthly from 2018-03
    ex­penses:rent        £1200
    ex­penses:tax:­council  £100
    saved:rent          -£1300
    ex­penses:util­ities    £185
    saved:util­ities      -£185

This is based on ex­per­i­ence, with some spec­u­la­tion.

It’s in two chunks be­cause I’ll be moving out of my cur­rent place and renting a new flat some time in March.

Now, my monthly in­come:

~ monthly from 2018-06
    saved:in­vest     £350
    saved:­monthly    £350
    saved:travel      £50
    saved:rent      £1500
    saved:util­ities  £200
    saved:web         £50
    in­come:job     -£2500

This is based en­tirely on spec­u­la­tion, so it will al­most cer­tainly change.

No­tice how I’m only spending £300 of saved:­monthly a month, but I’m adding £350 to it. I do this with all the sav­ings ac­counts, gradu­ally building up a buffer so I will not be living paycheck to paycheck.

Fore­casting

In its simplest form, fore­casting is just ap­plying your budget into the fu­ture. I plan for each cal­endar year, so I look ahead to the end of December to see that everything is working out.

However, ex­pected fu­ture events can be added to the fore­cast too:

; Dentist
~ 2018-03-08
    ex­penses:other  £18.80
    saved:health

It is es­sen­tial that none of my sav­ings ac­counts dip below zero, and ideally their bal­ance should be in­creasing every month, due to saving ex­tra. When I have enough of a buf­fer, I will prob­ably re­move this extra al­loc­a­tion (just main­taining the cur­rent bal­ance) and put the extra money to some other use.

In my mind, it doesn’t really make sense to talk about budgeting and fore­casting as sep­arate en­tit­ies. A budget only makes sense if it serves your fu­ture pur­poses, so it’s not as simple as looking at what you have vs. looking into the fu­ture. I try to think of it like this in­stead: budgeting is the al­loc­a­tion (which may in­volve plan­ning ahead) whereas fore­casting is looking at how your al­loc­a­tion (plus any other ex­pected trans­ac­tions) changes your fin­an­cial situ­ation over time.

Main­ten­ance

In ad­di­tion to simply re­cording trans­ac­tions, there is some book­keeping I do oc­ca­sion­ally, to keep my re­cords easy to pro­cess.

End of Month

At the end of a month I re­con­cile the trans­ac­tions of the month-just-en­ded:

  1. For every trans­ac­tion in the on­line bank state­ment, find the cor­res­ponding journal trans­ac­tion and mark it.
    • If there are trans­ac­tions missing from the journal, add and mark them.
    • If there are trans­ac­tions missing from the bank state­ment, the bank is being slow; re­con­cile as they come in over the next few days.
    • If the bank bal­ance is below the cur­rent bal­ance, even dis­carding un­cleared trans­ac­tions, either figure out what happened or add a trans­ac­tion to ex­penses:­ad­just­ment (see “bal­ance cor­rec­tion”).
  2. Check the bal­ance in my wallet and mark all hand trans­ac­tions.
    • If the wallet bal­ance is below the hand bal­ance, add a trans­ac­tion to ex­penses:­ad­just­ment (see “bal­ance cor­rec­tion”).

I also set up the budget for the month-just-star­ted:

2018-01-01 ! Budget
    month:­food  £250
    month:fun    £25
    month:other  £25
    saved:­monthly

This is just the reg­ular monthly budget, but with a date.

End of Year

  1. Re­con­cile, as at the end of any other month.
  2. Add any ne­ces­sary bal­ance cor­rec­tion (see “bal­ance cor­rec­tion”).
  3. Re­name the cur­rent journal file from “cur­rent.­journal” to “$YEAR.­journ­al”.
  4. Identify fin­an­cial goals for the up­coming year.
  5. Create a new “cur­rent.­journal” for the up­coming year with budget and fore­cast trans­ac­tions.
  6. Ini­tialise all ac­counts on the first of January by trans­fer­ring from equity.

The budget cre­ated in (5) will de­pend on the goals iden­ti­fied in (4). Here’s an ex­ample of a (6) trans­ac­tion set­ting up the starting bal­ances:

2018-01-01 ! Start of year
    as­set­s:cash:hand  £242.70
    ;
    cur­rent:­float    £100
    saved:de­posit    £950
    saved:­monthly    £324.66
    saved:­house­hold  £100
    saved:rent      £1038
    saved:travel     £100
    saved:web        £200
    ;
    as­set­s:in­vest­ment­s:cav­endish:s&s   2.54  VADEA @@ £800
    as­set­s:in­vest­ment­s:cav­endish:s&s  65     MCMEA @@ £99.77
    as­set­s:in­vest­ment­s:cav­endish:s&s  31.19  MCOUA @@  £50
    as­set­s:in­vest­ment­s:cav­endish:s&s   7.15  MHMIA @@  £50
    as­set­s:in­vest­ment­s:­coin­base        0.004 BTC   @@  £51.91
    as­set­s:in­vest­ment­s:­coin­base        0.1   ETH   @@  £62.04
    as­set­s:in­vest­ment­s:­coin­base        0.25  LTC   @@  £60.17
    as­set­s:in­vest­ment­s:­coin­base       10     EUR   @@   £9.11
    ;
    as­set­s:reim­burse­ment­s:de­posit     £300
    as­set­s:reim­burse­ment­s:pusher      £186
    as­set­s:reim­burse­ment­s:uni­versity  £188.38
    ;
    li­ab­il­it­ies:loan:over­draft   -£2000
    li­ab­il­it­ies:loan:slc        -£28592.25
    ;
    equity

This is the tem­plate for a new journal file:

alias cur­rent = as­set­s:cash:sant­and­er­:­cur­rent
alias month   = cur­rent:­month
alias saved   = cur­rent:saved

* Fore­cast
* Starting bal­ances
* Ledger
** January
** Feb­ruary
** March
** April
** May
** June
** July
** Au­gust
** September
** Oc­tober
** November
** December

The reason for the *-style head­ings is so that org­struct-­mode can be used to col­lapse sec­tions.

Bal­ance Cor­rec­tion

Some­times I get things wrong. I will make a mis­take re­cording a trans­ac­tion, and a mis­take reading that same trans­ac­tion from my bank state­ment at the end of the month. Be­cause it takes time for trans­ac­tions to ap­pear in my on­line bank­ing, and even then they often ap­pear out­-of-order, just com­paring my hledger en­d-of-­month bal­ances with what my bank thinks they are is not easy.

Tracking down the ori­ginal error is usu­ally far more trouble than it’s worth.

If I sus­pect I have made a mis­take (or just want to verify that I haven’t), I avoid spending money from my bank ac­count for at least one working week. A simple way to achieve this is to with­draw a bunch of money and just use cash for that week.

After a week, every un­cleared trans­ac­tion should really be in my on­line bank­ing, so I can re­con­cile, and in­sert a bal­ance ad­just­ment trans­ac­tion if I need to:

2017-03-01 * Bal­ance ad­just­ment
    ex­penses:­ad­just­ment  £8.51
    saved:­monthly

2017-03-31 * Wallet ad­just­ment
    ex­penses:­ad­just­ment  £14.98
    as­set­s:cash:hand

2017-04-30 * Bal­ance ad­just­ment
    saved:­monthly  £1.25
    in­come:­ad­just­ment

I made 11 trans­ac­tions to ex­penses:­ad­just­ment and 1 from in­come:­ad­just­ment in 2017. As the year went on, the fre­quency (and mag­nitude) of these ad­just­ments dropped. Hope­fully I won’t need any in 2018.