<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>barrucadu&#39;s memos - Self (Systems)</title>
  <link href="https://memo.barrucadu.co.uk/taxon/self-systems.xml" rel="self" />
  <link href="https://memo.barrucadu.co.uk/" />
  <id>https://memo.barrucadu.co.uk/taxon/self-systems.xml</id>
  <author>
    <name>Michael Walker</name>
    <email>mike@barrucadu.co.uk</email>
  </author>
  
  <updated>2023-06-08T00:00:00Z</updated>
  
  
  <entry>
    <title>Personal Finance</title>
    <link href="https://memo.barrucadu.co.uk/personal-finance.html" />
    <id>https://memo.barrucadu.co.uk/personal-finance.html</id>
    <published>2018-01-07T00:00:00Z</published>
    <updated>2023-06-08T00:00:00Z</updated>
    <summary type="html">
      <![CDATA[
<p>I care a lot about my finances, and I put a lot of effort into tracking things, making goals, and improving my financial health.</p>
<p>Once upon a time, I didn’t: within a few years of university, I managed to blow through all my savings, loans, grants, parental support, and overdraft. There were times where I couldn’t withdraw money from a cash machine because I had less than £5 to my name (well, less than -£1995 to my name, if you exclude the overdraft). I had to carefully plan around the monthly income my parents gave me, and sometimes had to delay rent payments. And then I decided to do a Ph.D: which I didn’t get funding for, and would have to pay for myself.</p>
<p>The situation was untenable, things had to change: I started tracking all my spending. Then, when I knew where the money was going, I started to budget and to rein my spending in.</p>
<p>I’ve now been tracking my finances, down to the penny, with entirely manual data entry, since 2016. And I couldn’t imagine doing it any other way.</p>
<h2 id="principles">Principles</h2>
<p>I’ve essentially adopted the <a href="https://www.youneedabudget.com/the-four-rules/">You Need A Budget (YNAB)</a> principles, though I don’t use the actual YNAB software (more on that later). I’ve also drawn inspiration from the <a href="https://ukpersonal.finance/flowchart/">/r/ukpersonalfinance flowchart</a>.</p>
<p>My personal finance principles are:</p>
<ol type="1">
<li><p><strong>Track everything, by hand.</strong></p>
<p>Every transaction I make, I note down in my journal. Having the data lets me analyse it and establish goals, and doing it by hand gives me a greater appreciation of where my money is going (as well as adding a <em>little</em> extra friction per-transaction, which sometimes is enough to avoid an impulse-purchase).</p></li>
<li><p><strong>Use envelope budgeting for short-term money.</strong></p>
<p>I consider my bank account “empty”, in a sense: there’s no money in the account itself, all the money is in subaccounts allocated to specific purposes, like rent or food or web servers. And those purposes <em>are</em> specific: there’s no “savings” category, for instance. My bank doesn’t actually provide these subaccounts, they’re just something in my tracking, but some banks (like Monzo and Starling) do.</p>
<p>I’ve specified “short-term” here because I don’t envelope-budget my long-term investments: I’m not going to touch those for 5 to 10 years, or longer, so there’s no way I can predict how I’ll want to use them.</p></li>
<li><p><strong>Budget everything monthly.</strong></p>
<p>Like most people in the UK, I get paid once a month. So it’s easy to budget for monthly expenses like rent or utilities. There’s a consistent amount spent every month, so I can just allocate that much of my monthly income to pay for it. Somewhat harder are the expenses which occur less frequently: it’s easy to forget about these, not budget for them in advance, and then rush to find the money to pay for them.</p>
<p>But these infrequent expenses can be treated as a monthly expense, by dividing the cost by 12 (or by however many months are between payments on average) and budgeting that much every month. Then when the expense comes around, the money has been put aside.</p></li>
<li><p><strong>A model is only useful if it reflects reality.</strong></p>
<p>If I’m consistently over- or under-spending in a budget category, the budget needs to change. For example, there is absolutely no use in budgeting £200 for food every month if I always overshoot that by getting a bunch of takeaways and have to make up the difference elsewhere: much better to budget the <em>actual</em> amount, and then work to reduce how many takeaways I get until I’m consistently spending under my target.</p>
<p>The purpose of tracking everything and of making budgets is so that I can make predictions about the future. But those predictions are worthless if the data used to produce them is unrealistically optimistic or just downright wrong.</p></li>
<li><p><strong>Save more than you spend.</strong></p>
<p>Every month, I should save (as cash or by investing) more than I spend. If I spend all my income, I’m living paycheque to paycheque, and that means any disruption or reduction in my income could be dangerous; and if I spend all my income and then some, I’m gradually running out of money.</p></li>
</ol>
<p>These principles have lifted me out of financial ruin (or close to it), and set me on the path to wealth. Sure, I also have a high-paying job, which helps a lot; but if I had the same spending habits now that I did in my university days, I would have almost no savings and would be living in fear of how I would survive if I were to lose my job.</p>
<h2 id="tracking-metrics-and-smart-goals">Tracking, metrics, and SMART goals</h2>
<p>Lots of people use <a href="https://www.youneedabudget.com/the-four-rules/">YNAB</a>, or Excel, or Google Sheets to track their spending. I use <a href="http://plaintextaccounting.org/">plain-text accounting</a>, specifically, <a href="http://hledger.org/">hledger</a>. The tool you use doesn’t actually matter, so long as it works for you. Nor do you need to track down to the penny, as I do. Some people round all their spending to the nearest pound, or even larger amounts, and track that. Some people don’t track cash, and just mark any money they withdraw as “spent”.</p>
<p>It’s more important that you do <em>enough</em> tracking to help you meet your goals. Don’t let the perfect be the enemy of the good.</p>
<h3 id="metrics">Metrics</h3>
<p>While the most straightforward metric of financial health is the monthly change to my assets (positive is good: I’m saving more than I spend; negative is bad: I’m spending more than I save; zero is kind of bad: I’m spending everything), there are a few other metrics I look at.</p>
<p>Firstly, there are two metrics which I don’t generally see mentioned online, but they’re valuable to me because I can use them to compute other, more directly useful, metrics:</p>
<ul>
<li><p><strong>Average daily expense:</strong></p>
<p>This is the total money spent over the period (excluding anything taken before income hits my bank account: like income tax or my student loan), divided by the number of days in the period.</p>
<p>As a <a href="https://prometheus.io/">Prometheus</a> time series, this is:</p>
<pre><code>(
  sum(hledger_balance{account=&quot;expenses&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  - on(target_currency)
  sum(hledger_balance{account=&quot;expenses&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  - on(target_currency)
  sum(hledger_balance{account=&quot;expenses:gross&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  + on(target_currency)
  sum(hledger_balance{account=&quot;expenses:gross&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
) / $agg_window</code></pre>
<p>Let’s break that down:</p>
<ul>
<li><p><code>hledger_balances</code> is a time series of end-of-day account balances. It has labels <code>account</code> and <code>currency</code>.</p></li>
<li><p><code>hledger_fx_rate</code> is a time series of daily currency exchange rates, which <a href="https://github.com/barrucadu/nixfiles/blob/ba59fce93c1bf615fde1a7556d39b5faebe29914/hosts/nyarlathotep/configuration.nix#L403-L423">I collect at 9PM UK time</a>. It has labels <code>currency</code> (so it can be combined easily with <code>hledger_balances</code>) and <code>target_currency</code>.</p></li>
<li><p><code>{account="expenses"}</code> is the parent account of all other expense accounts, so it contains their balances too. All expense accounts are strictly positive: money moves <em>into</em> <code>expenses</code> from other accounts.</p></li>
<li><p><code>{account="expenses:gross"}</code> is the account I use to track deductions from my gross pay.</p></li>
<li><p><code>$currency</code> is a Grafana dashboard variable, defining the currency I want to see the result in, usually that’s <code>GBP</code>.<a href="personal-finance.html#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p></li>
<li><p><code>$agg_window</code> is another dashboard variable, defining the number of days to look at to work out that average, usually 365.</p></li>
</ul>
<p>So this is saying “take the expenses (excluding pay deductions) now and <code>$agg_window</code> days ago, subtract them to work out how much I’ve spent over that entire time, and divide by <code>$agg_window</code> to work out the average daily spend.”</p></li>
<li><p><strong>Average daily income:</strong></p>
<p>This is the total income over the period (excluding gifts), divided by the number of days in the period.</p>
<p>The Prometheus expression is pretty similar to the average daily expense:</p>
<pre><code>(
  sum(hledger_balance{account=&quot;income&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  - on(target_currency)
  sum(hledger_balance{account=&quot;income&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  - on(target_currency)
  sum(hledger_balance{account=&quot;income:gift&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  + on(target_currency)
  sum(hledger_balance{account=&quot;income:gift&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
) / $agg_window * -1</code></pre>
<p>The <code>* -1</code> at the end is because all the <code>income</code> accounts are strictly negative (money moves <em>out of</em> <code>income</code> into other accounts).</p></li>
</ul>
<p>Now we can compute some more interesting metrics.</p>
<ul>
<li><p><strong>Net worth:</strong></p>
<p>If I paid off all my debts right now, how much money would I have left?</p>
<pre><code>sum(hledger_balance{account=&quot;assets&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
+ on(target_currency)
sum(hledger_balance{account=&quot;liabilities&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)</code></pre>
<p>For the same reason as <code>income</code>, <code>liabilities</code> here is strictly negative.</p>
<p>You could exclude things that aren’t “real” debts here, like a student loan, if you wanted. But I include it.</p></li>
<li><p><strong>Savings rate:</strong></p>
<p>For every calendar month (since I get paid monthly) divide the saved income by the net income, then take the average of all those values.</p>
<pre><code># saved income
(
  sum(hledger_monthly_decrease{account=&quot;income&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
  - on(target_currency)
  sum(hledger_monthly_increase{account=&quot;expenses&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
)

/ on(target_currency)

# net income
(
  sum(hledger_monthly_decrease{account=&quot;income&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
  - on(target_currency)
  sum(hledger_monthly_increase{account=&quot;expenses:gross&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
)</code></pre>
<p>There’s no explicit averaging in this expression because Grafana does that for me.</p>
<p>This uses a couple of new metrics:</p>
<ul>
<li><p><code>hledger_monthly_decrease</code> is the amount of money moved out of the account (as a non-negative number) in that calendar month.</p></li>
<li><p><code>hledger_monthly_increase</code> is the amount of money moved in to the account (as a non-negative number) in that calendar month.</p></li>
</ul>
<p>Unfortunately I can’t just use <code>hledger_balances</code> for this because Prometheus doesn’t allow aggregating data by calendar month, and months are not all the same length. But even if it could, I think this approach would still end up being more straightforward. Before migrating to Prometheus, I used <a href="https://github.com/barrucadu/hledger-scripts">a significantly more complicated InfluxDB-based dashboard</a>, which did attempt to work out savings rate from the balances. It was pretty complex, and also would wrongly count receiving a loan (a liability) as income.</p>
<p>So this is saying that my saved income is the amount <code>income</code> has gone down by (remember: money moves <em>from</em> <code>income</code> into other accounts) minus the amount <code>expenses</code> has gone up by. Whereas my net income is the amount <code>income</code> has gone down by (i.e., gross income) minus the amount <code>expenses:gross</code> (pay deductions) has gone up by.</p>
<p>An alternative formulation which excludes pension contributions would be:</p>
<pre><code># saved income
(
  sum(hledger_monthly_decrease{account=&quot;income&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
  - on(target_currency)
  sum(hledger_monthly_increase{account=&quot;expenses&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
  # ignore pension contributions (assumes pensions only go up - include &#39;decrease&#39; as well to handle January roll-over)
  - on(target_currency)
  (
    sum(hledger_monthly_increase{account=&quot;assets:pension&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency) -
    sum(hledger_monthly_decrease{account=&quot;assets:pension&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
  )
)

/ on(target_currency)

# net income
(
  sum(hledger_monthly_decrease{account=&quot;income&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
  - on(target_currency)
  sum(hledger_monthly_increase{account=&quot;expenses:gross&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
  # as above
  - on(target_currency)
  (
    sum(hledger_monthly_increase{account=&quot;assets:pension&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency) -
    sum(hledger_monthly_decrease{account=&quot;assets:pension&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by(target_currency)
  )
)</code></pre></li>
<li><p><strong>Runway:</strong></p>
<p>I’m sure there’s a better name for this, but this is the metric which tells me how many days I could survive with my current assets with no income. So, if I lost my job today with no severance pay, how long would I have to find a new one, assuming I keep my spending habits the same?</p>
<p>This comes in two forms: a “short runway” and a “long runway”.</p>
<p>The <strong>short runway</strong> only considers cash (whether physical cash or a bank account) and an emergency fund (if you have one of those)<a href="personal-finance.html#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>:</p>
<pre><code># total available cash and emergency fund
(
  sum(hledger_balance{account=&quot;assets:cash&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  + on (target_currency)
  sum(hledger_balance{account=&quot;assets:investments:nsi:premium_bonds:emergency&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
)

/ on (target_currency)

# average daily expense
(
  (
    sum(hledger_balance{account=&quot;expenses&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    - on(target_currency)
    sum(hledger_balance{account=&quot;expenses&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    - on(target_currency)
    sum(hledger_balance{account=&quot;expenses:gross&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    + on(target_currency)
    sum(hledger_balance{account=&quot;expenses:gross&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  ) / $agg_window
)</code></pre>
<p>The <strong>long runway</strong> considers all assets, including investments, as if they were sold today:</p>
<pre><code>sum(hledger_balance{account=&quot;assets&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
/ on (target_currency)

# average daily expense
(
  (
    sum(hledger_balance{account=&quot;expenses&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    - on(target_currency)
    sum(hledger_balance{account=&quot;expenses&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    - on(target_currency)
    sum(hledger_balance{account=&quot;expenses:gross&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    + on(target_currency)
    sum(hledger_balance{account=&quot;expenses:gross&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  ) / $agg_window
)</code></pre>
<p>In practice, if I did suddenly lose my job, I’d change my spending habits. So these are pessimistic estimates. In general though I prefer financial estimates to be pessimistic, and not optimistic.</p></li>
<li><p><strong>FIRE number:</strong></p>
<p><a href="https://en.wikipedia.org/wiki/FIRE_movement">Financial Indepence, Retire Early (FIRE)</a> is a movement with the goal of aggressively saving and investing enough money so that you can live off the returns indefinitely, meaning you no longer <em>need</em> to work (though some choose to). It’s something that appeals to me: I like my job and my lifestyle, but I would like having the same lifestyle <em>without</em> a job significantly more.</p>
<p>The rule of thumb is that if you have 25 years worth of expenses invested, you can withdraw one year’s expenses (4%) every year without the value of your investments decreasing, assuming an annual 7% growth and 3% inflation.</p>
<pre><code># average daily expense
(
  sum(hledger_balance{account=&quot;expenses&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  - on(target_currency)
  sum(hledger_balance{account=&quot;expenses&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  - on(target_currency)
  sum(hledger_balance{account=&quot;expenses:gross&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  + on(target_currency)
  sum(hledger_balance{account=&quot;expenses:gross&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
) / $agg_window

# $fire_annual_factor years worth
* 365 * $fire_annual_factor</code></pre>
<p>Here <code>$fire_annual_factor</code> is 25. I just made it a variable so I could give it a clear name.</p></li>
<li><p><strong>AAW / PAW thresholds:</strong></p>
<p><a href="https://en.wikipedia.org/wiki/The_Millionaire_Next_Door">The Millionaire Next Door</a>, a study of wealthy Americans, proposed a metric for wealth: if a person aged <code>N</code> years old has an annual income of <code>$D</code> (excluding any inheritance), then they should have a net worth of <code>$D * N / 10</code>.</p>
<p>Someone with under half that is an “under-accumulator of wealth” (UAW) and someone with more than double that is a “prodigious accumulator of wealth” (PAW).</p>
<p>So, the <strong>AAW threshold</strong> is the amount of money at which you are no longer a UAW:</p>
<pre><code>(
  # average daily income
  (
    sum(hledger_balance{account=&quot;income&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    - on(target_currency)
    sum(hledger_balance{account=&quot;income&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    - on(target_currency)
    sum(hledger_balance{account=&quot;income:gift&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    + on(target_currency)
    sum(hledger_balance{account=&quot;income:gift&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  ) / $agg_window * -1

  # $age/10 years worth
  * 365 * $age / 10
) / 2

# ignore gifted income
- on(target_currency)
sum(hledger_balance{account=&quot;income:gift&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)

# add (subtract) liabilities, other than student loan
- on(target_currency)
sum(hledger_balance{account=&quot;liabilities&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
+ on(target_currency)
sum(hledger_balance{account=&quot;liabilities:loan:slc&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)</code></pre>
<p>And the <strong>PAW threshold</strong> is the amount of money at which you are no longer an AAW:</p>
<pre><code>(
  # average daily income
  (
    sum(hledger_balance{account=&quot;income&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    - on(target_currency)
    sum(hledger_balance{account=&quot;income&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    - on(target_currency)
    sum(hledger_balance{account=&quot;income:gift&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
    + on(target_currency)
    sum(hledger_balance{account=&quot;income:gift&quot;} offset ${agg_window}d * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
  ) / $agg_window * -1

  # $age/10 years worth
  * 365 * $age / 10
) * 2

# ignore gifted income
- on(target_currency)
sum(hledger_balance{account=&quot;income:gift&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)

# add (subtract) liabilities, other than student loan
- on(target_currency)
sum(hledger_balance{account=&quot;liabilities&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)
+ on(target_currency)
sum(hledger_balance{account=&quot;liabilities:loan:slc&quot;} * on(currency) hledger_fx_rate{target_currency=&quot;$currency&quot;}) by (target_currency)</code></pre>
<p>It turns out that the PAW threshold is below the FIRE number. This makes some degree of intuitive sense: becoming financially independent requires a prodigious amount of money! But, since the FIRE number does not exclude gifts, it’s possible to become financially independent by receiving a large inheritance which you then invest, but you may still be a UAW if you’re otherwise not very good at saving.</p></li>
</ul>
<h3 id="smart-goals">SMART goals</h3>
<p>Once you’re tracking your finances and have some metrics of interest, even if it’s only something very simple like “total value of assets” or “net worth”, you can start to make goals. The best goals are SMART goals:</p>
<ul>
<li>Specific</li>
<li>Measurable</li>
<li>Achievable</li>
<li>Relevant</li>
<li>Time-limited</li>
</ul>
<p>In the past I’ve set goals like:</p>
<ul>
<li>Pay off my overdraft</li>
<li>Save 3 months expenses in cash</li>
<li>Increase emergency fund balance to £5k</li>
<li>Increase savings rate to 33%</li>
</ul>
<p>And so on. I currently have a long-term goal of saving for a house deposit, but that will take a few more years to complete.</p>
<p>I also have targets for all the key metrics I track, and display those on a dashboard:</p>
<figure>
<img src="personal-finance-dashboard.png" alt="My personal finance dashboard" />
<figcaption aria-hidden="true">My personal finance dashboard</figcaption>
</figure>
<p>I wrote <a href="https://github.com/barrucadu/nixfiles/blob/master/hosts/nyarlathotep/jobs/hledger-export-to-promscale.py">a script which imports the data every evening</a>. Sometimes I’ll also make some plans for the future, mock up some data, and import that into the dashboard, so I can try out different savings plans, or think about how to allocate an expected payrise or bonus.</p>
<h2 id="a-high-level-view-of-the-system">A high level view of the system</h2>
<p>I have one main bank account, and everything is driven by activity in there. This bank account is where I do the bulk of my envelope budgeting, it’s where my income arrives, and it’s where standing orders transfer money from into other accounts and investments.</p>
<p>This is my <strong>Nationwide FlexDirect</strong>. I picked it because it had a good introductory interest rate.</p>
<p>It has four “types” of envelope, and many envelopes of each of these types:</p>
<ul>
<li><p><strong>Discretionary envelopes</strong> are for money I can spend however I want, and I usually spend the entire contents of these within a month, rather than building up savings.</p></li>
<li><p><strong>Goal envelopes</strong> are for specific future expenses, like renewing my passport or visiting Japan.</p></li>
<li><p><strong>Pending envelopes</strong> are to hold cash which is due to be sent elsewhere in the near future.</p></li>
<li><p><strong>Saved envelopes</strong> are my regular budget categories: things like food, rent, travel, and so on.</p></li>
</ul>
<p>I also have a few other accounts:</p>
<ul>
<li>A <strong>Starling</strong> bank account, for foreign currency transactions (as it doesn’t charge a conversion fee).</li>
<li>A <strong>Marcus</strong> bank account, for cash savings.</li>
<li>A <strong>Fidelity</strong> stocks and shares ISA, holding my long-term investments for the future.</li>
<li>An <strong>AJ Bell</strong> stocks and shares LISA, holding half of my house deposit savings.</li>
<li>A <strong>Premium Bonds</strong> account, holding the other half of my house deposit savings.</li>
</ul>
<p>Both my ISA and LISA are invested in a low-cost Vanguard index fund.</p>
<h3 id="income-allocation">Income allocation</h3>
<p>On payday, money arrives in the Nationwide account. It’s split up between discretionary envelopes, goal envelopes, pending envelopes, and saved envelopes as appropriate. The allocations are fairly static, usually only changing when I intentionally change something in my process.</p>
<p>However, my income doesn’t necessarily exactly match my budget. There’s usually some excess income, which I allocate to two special accounts:</p>
<ul>
<li><p>I add up to £125 to a “saved goals” envelope, if I don’t have any specific goal envelopes right now, to be used towards future goals.</p></li>
<li><p>I add any remainder to a “saved invest” envelope, which I’ll manually invest in my ISA when it reaches a reasonable amount (say, £100 or more).</p></li>
</ul>
<h3 id="tracking-transactions">Tracking transactions</h3>
<p>As I spend or move money, I note down the transactions. I check all my statements once a week, on Saturday mornings, to reconcile and fix any inconsistencies. This only takes a few minutes.</p>
<p>I’m now very good at not having inconsistencies.</p>
<h3 id="credit-card">Credit card</h3>
<p>I have an <strong>American Express</strong> credit card, because it gives me some cashback. There is a £25 annual fee, but the cashback more than covers it.</p>
<p>When I buy something with the card, I note that down as two transactions: one spending money from the card, and one transferring money from the relevant discretionary / saved / goal envelope into a “pending amex” envelope. The card is paid off in full, from that envelope, by a direct debit around the start of each month.</p>
<h3 id="and-thats-it">And that’s it!</h3>
<p>It’s fairly straightforward. I think it’s important to keep things simple if you plan to stick to it. Most of the complexity in my personal finance system comes from manually entering all the data, and using the right envelopes.</p>
<h2 id="implementation-details">Implementation details</h2>
<p>As said earlier, I use <a href="http://hledger.org/">hledger</a>, which is a <a href="http://plaintextaccounting.org/">plain-text accounting</a> tool. This section covers how I use hledger: it’s pretty conventional, but has lots of examples.</p>
<h3 id="journal-files">Journal files</h3>
<p>I log all my financial transactions for the current year in a file called <code>current.journal</code>. There are <code>$YEAR.journal</code> files for historic data. I also have two files which all my journals include:</p>
<ul>
<li><code>commodities</code>, a list of all commodities (currencies, cryptocurrencies, funds) I deal with.</li>
<li><code>prices</code>, end-of-day exchange rates for all of my commodities.</li>
</ul>
<p>Finally, I have a <code>combined.journal</code> file, which includes the journal files from 2020 onwards (as the start of 2020 marked the last big change to how I tracked things), along with appropriate closing transactions for each year so that they fit together. This file is used as the data source for the dashboard.</p>
<p>This is the template for a new journal file:</p>
<pre><code>include commodities
include prices

* Starting balances
YYYY-01-01 ! Opening balances
  ...

* Ledger
** January
** February
** March
** April
** May
** June
** July
** August
** September
** October
** November
** December</code></pre>
<p>For each month, I fill in expected expenses, transfers, and income allocation based on previous months and my budget:</p>
<pre><code>YYYY-MM-30 Expenses
    # expected expenses (from previous months) go here
    expenses:virtual
YYYY-MM-30 Transfers
    # expected transfers (from budget) go here
YYYY-MM-30 Job
    # expected income allocations (from budget) go here
    income:job</code></pre>
<p>I then comment out these expected transactions. They’re there to uncomment if I want to forecast, but for every-day use they’re hidden away.</p>
<h3 id="chart-of-accounts">Chart of accounts</h3>
<p>The set of accounts I use is fairly stable: sometimes I’ll add one, or one will cease to be useful, but that’s a rare event. Here are all the regular accounts, which are mostly self-explanatory:</p>
<ul>
<li><code>assets</code>
<ul>
<li><code>cash</code>
<ul>
<li><code>paypal</code></li>
<li><code>petty</code>
<ul>
<li><code>hand</code>—physical cash, in my wallet
<ul>
<li><code>budgeted</code>—…which was withdrawn from my bank account</li>
<li><code>unbudgeted</code>—…which was a gift</li>
</ul></li>
<li><code>home</code>—physical cash, not in my wallet</li>
</ul></li>
<li><code>marcus</code>
<ul>
<li><code>savings</code>
<ul>
<li><em>subaccounts for specific categories</em></li>
</ul></li>
</ul></li>
<li><code>nationwide</code>
<ul>
<li><code>flexdirect</code>
<ul>
<li><code>discretionary</code>
<ul>
<li><code>other</code></li>
<li><code>social</code></li>
<li><code>tea</code></li>
</ul></li>
<li><code>goal</code>
<ul>
<li><em>subaccounts for specific future expenses, like renewing my passport</em></li>
</ul></li>
<li><code>pending</code>
<ul>
<li><em>subaccounts for money to be transferred to other accounts</em></li>
</ul></li>
<li><code>saved</code>
<ul>
<li><code>food</code></li>
<li><code>gift</code></li>
<li><code>goals</code>—money to allocate to future goals, if I don’t have any right now</li>
<li><code>graze</code>—monthly <a href="https://www.graze.com/uk/">Graze</a> subscription</li>
<li><code>health</code></li>
<li><code>household</code></li>
<li><code>invest</code>—money to invest, outside of my regular scheduled investments</li>
<li><code>phone</code></li>
<li><code>rent</code></li>
<li><code>travel</code></li>
<li><code>utilities</code></li>
</ul></li>
</ul></li>
</ul></li>
<li><code>starling</code>
<ul>
<li><code>saved</code>
<ul>
<li><code>patreon</code>—monthly <a href="https://www.patreon.com/">Patreon</a> subscriptions (charged in USD)</li>
<li><code>protonmail</code>—annual <a href="https://protonmail.com/">ProtonMail</a> fee (charged in EUR)</li>
<li><code>web</code>—AWS, domain names, and hosting (all charged in foreign currencies)</li>
</ul></li>
</ul></li>
</ul></li>
<li><code>investments</code>
<ul>
<li><code>ajbell</code></li>
<li><code>fidelity</code></li>
<li><code>nsi</code></li>
</ul></li>
<li><code>receivable</code>
<ul>
<li><code>deposit</code>—the deposit on my flat</li>
<li><em>subaccounts for people who owe me money</em></li>
</ul></li>
</ul></li>
<li><code>equity</code>—used for special transactions (see below)</li>
<li><code>expenses</code>
<ul>
<li><em>subaccounts for various things</em></li>
</ul></li>
<li><code>income</code>
<ul>
<li><em>subaccounts for various things</em></li>
</ul></li>
<li><code>liabilities</code>
<ul>
<li><code>creditcard</code>
<ul>
<li><code>amex</code></li>
</ul></li>
<li><code>owed</code>
<ul>
<li><em>subaccounts for people I owe money to</em></li>
</ul></li>
</ul></li>
</ul>
<p>An account name is the path to it through the tree, separated by colons. For example, <code>assets:cash</code>, or <code>expenses:utilities:electricity</code>.</p>
<p>Money (and other commodities) is only stored in leaf accounts.</p>
<h3 id="marking-transactions">Marking transactions</h3>
<p><a href="http://hledger.org/">hledger</a> allows transactions to be marked with a <code>!</code> or a <code>*</code>. The traditional meaning of these is “pending” and “cleared”.</p>
<p>I use <code>!</code> slightly differently. I use it to indicate a transaction which is just an artefact of the way I track my finances, which doesn’t involve any balance changes to a real-world account.</p>
<p>For example, putting aside money to pay off credit card expenses:</p>
<pre><code>2021-12-02 ! Bookkeeping
    assets:cash:nationwide:flexdirect:saved:food                         -£29.35
    assets:cash:nationwide:flexdirect:saved:household                     -£8.63
    assets:cash:nationwide:flexdirect:saved:health                        -£5.20
    assets:cash:nationwide:flexdirect:saved:gift                        -£119.00
    assets:cash:nationwide:flexdirect:saved:gift                         -£22.43
    assets:cash:nationwide:flexdirect:pending:amex</code></pre>
<h3 id="income">Income</h3>
<p>Income is recorded as the pre-tax amount coming from <code>income:$source</code>, and is split across <code>assets:*</code> and <code>expenses:gross:*</code>. All amounts are included.</p>
<pre><code>2021-11-30 * Cabinet Office
    assets:cash:nationwide:flexdirect:float                               £32.46
    assets:cash:nationwide:flexdirect:discretionary:other                  £2.66
    assets:cash:nationwide:flexdirect:discretionary:social                £30.00
    assets:cash:nationwide:flexdirect:discretionary:tea                   £30.00
    assets:cash:nationwide:flexdirect:goal:clothes                        £25.00
    assets:cash:nationwide:flexdirect:goal:monitor                        £25.00
    assets:cash:nationwide:flexdirect:goal:phone                         £250.00
    assets:cash:nationwide:flexdirect:goal:upgrades                       £25.00
    assets:cash:nationwide:flexdirect:pending:ajbell                     £400.00
    assets:cash:nationwide:flexdirect:pending:fidelity                   £500.00
    assets:cash:nationwide:flexdirect:pending:premium_bonds              £150.00
    assets:cash:nationwide:flexdirect:pending:starling:patreon             £8.00
    assets:cash:nationwide:flexdirect:pending:starling:protonmail          £5.00
    assets:cash:nationwide:flexdirect:pending:starling:roll20             £10.00
    assets:cash:nationwide:flexdirect:pending:starling:web                £80.00
    assets:cash:nationwide:flexdirect:saved:food                         £200.00
    assets:cash:nationwide:flexdirect:saved:gift                           £0.00
    assets:cash:nationwide:flexdirect:saved:graze                         £18.95
    assets:cash:nationwide:flexdirect:saved:health                         £0.94
    assets:cash:nationwide:flexdirect:saved:household                     £70.99
    assets:cash:nationwide:flexdirect:saved:phone                         £13.92
    assets:cash:nationwide:flexdirect:saved:rent                        £1406.21
    assets:cash:nationwide:flexdirect:saved:travel                         £0.00
    assets:cash:nationwide:flexdirect:saved:utilities                    £237.67
    expenses:gross:tax:income                                           £1145.27
    expenses:gross:tax:ni                                                £439.80
    expenses:gross:liabilities:loan:slc                                  £375.00
    expenses:gross:pension                                               £345.09
    income:job                                                         -£5826.96
    expenses:gross:pension                                              £1309.93
    income:job                                                         -£1309.93
2021-11-30 ! Student Loan
    expenses:gross:liabilities:loan:slc                                 -£375.00 = £0.00
    liabilities:loan:slc</code></pre>
<p>All the postings in an income transaction should be for <code>assets</code>, <code>expenses:gross</code>, or <code>income</code>, so that my net income can be easily calculated as “decrease in <code>income</code> - increase in <code>expenses:gross</code>”, as in the metrics above. So student loan repayments are handled slightly awkwardly, but the ease of calculation is worth it.</p>
<p>Some income transactions may not have anything to do with expenses or liabilities:</p>
<pre><code>2021-12-01 * Starling
    assets:cash:starling:saved:web                                         £0.05
    income:interest</code></pre>
<h3 id="investments">Investments</h3>
<p>I use the <code>@@</code> form to exactly specify the overall price:</p>
<pre><code>2021-08-10 * AJ Bell
    assets:investments:ajbell:lisa                                        1.6458 VANEA @@ £473.51
    expenses:fees                                                          £1.50
    assets:investments:ajbell:lisa</code></pre>
<p>Transferring the cash to the investment account and then investing it may be two separate steps:</p>
<pre><code>2021-08-02 * Fidelity
    assets:investments:fidelity:isa                                      £500.00
    assets:cash:nationwide:flexdirect:pending:fidelity

2021-08-09 * Fidelity
    assets:investments:fidelity:isa                                         1.75 VANEA @@ £500.00
    assets:investments:fidelity:isa</code></pre>
<p>If there isn’t enough cash in the account to pay for any fees, some other asset will be sold. That’s bad, so I always make sure there’s some cash.</p>
<h3 id="expenses">Expenses</h3>
<p>Expenses from a bank account or debit card are straightforward:</p>
<pre><code>2021-09-06 * Three Rivers District Council
    expenses:tax:council                                                 £128.00
    assets:cash:nationwide:flexdirect:saved:rent</code></pre>
<p>Foreign currency expenses are recorded like so:</p>
<pre><code>2021-01-04 * Hetzner
    expenses:web                                                           38.16 EUR @@ £34.52
    assets:cash:starling:saved:web</code></pre>
<h4 id="spending-physical-cash">Spending physical cash</h4>
<p>When I withdraw physical cash, I take it from the relevant budget category directly:</p>
<pre><code>2019-01-25 * Withdraw
    assets:cash:petty:hand:budgeted                                       £10.00
    assets:cash:nationwide:discretionary:other

2019-01-25 * Post Office
    expenses:other                                                         £1.01
    assets:cash:petty:hand:budgeted</code></pre>
<p>Foreign currency cash withdrawals are treated exactly the same as investment transactions, using <code>@@</code> to note down the exact exchange rate I got.</p>
<h4 id="using-a-credit-card">Using a credit card</h4>
<p>When I pay for something on my credit card I add a transaction from <code>liabilities</code> to track the debt, and also remove the money from the budget category:</p>
<pre><code>2021-12-06 * Tesco
    expenses:food                                                         £24.73
    liabilities:creditcard:amex

2021-12-06 ! Bookkeeping
    assets:cash:nationwide:flexdirect:saved:food                         -£24.73
    assets:cash:nationwide:flexdirect:pending:amex</code></pre>
<p>I pay off my credit card in full every month automatically via direct debit:</p>
<pre><code>2021-12-03 * American Express
    liabilities:creditcard:amex                                          £520.97
    assets:cash:nationwide:flexdirect:pending:amex</code></pre>
<p>Every year, I get cashback. As the cashback goes to the balance on the card, rather than being paid into my bank account, I treat it as a pair of an income transaction and an allocation transaction:</p>
<pre><code>2021-08-14 * American Express | cashback
    liabilities:creditcard:amex                                          £105.64
    income:amex

2021-08-14 ! Allocation | cashback
    assets:cash:nationwide:flexdirect:goal:amex_membership                £25.00
    assets:cash:nationwide:flexdirect:saved:health                        £80.64
    assets:cash:nationwide:flexdirect:pending:amex                      -£105.64</code></pre>
<h4 id="pre-orders-kickstarters-etc">Pre-orders, kickstarters, etc</h4>
<p>These are kind of like credit card transactions: I incur an expense, but the money isn’t actually taken for a while. In this case, “a while” could be months.</p>
<p>I put aside the money immediately:</p>
<pre><code>2022-02-04 ! Kickstarter | Knock! Issue Three
    assets:cash:nationwide:flexdirect:pending:preorder                    £38.00
    assets:cash:nationwide:flexdirect:discretionary:other</code></pre>
<p>And then note down the expense when it happens. Sometimes the amount I put aside won’t be quite right (e.g. if it’s a transaction in another currency, and I estimated the initial amount based on then-current exchange rates), so I’ll need to add or remove some money:</p>
<pre><code>2022-03-06 * Kickstarter | Knock! Issue Three
    expenses:ttrpg                                                        £32.43
    liabilities:creditcard:amex
2022-03-06 ! Bookkeeping | Kickstarter | Knock! Issue Three
    assets:cash:nationwide:flexdirect:pending:amex                        £32.43
    assets:cash:nationwide:flexdirect:discretionary:other                  £5.57
    assets:cash:nationwide:flexdirect:pending:preorder                   -£38.00</code></pre>
<p>I used to track this sort of thing by putting the money in <code>pending:amex</code> immediately, without going via <code>pending:preorder</code>. But that only works if I pre-order everything with my credit card, and also means that <code>pending:amex</code> almost never matches <code>liabilities:creditcard:amex</code>, which makes it easier to lose track of things. So I introduced this new account to make everything more explicit.</p>
<h3 id="maintenance">Maintenance</h3>
<h4 id="weekly">Weekly</h4>
<p>Every Saturday I check my financial statements and reconcile transactions in the journal:</p>
<ol type="1">
<li>For every transaction in the statement, find the corresponding journal transaction and mark it.
<ul>
<li>If there are transactions missing from the journal, add and mark them.</li>
<li>If there are transactions missing from the statement, the institution is being slow; reconcile as they come in over the next few days.</li>
<li>If all transactions have cleared but the balance is not what is expected, figure out what happened and fix it.</li>
</ul></li>
<li>Check the balance in my wallet and mark all <code>hand</code> transactions.</li>
</ol>
<p>If any of the account balances are incorrect, and I can’t find the mistake, give up and fix it with a transaction to/from <code>equity:adjustment</code>. For example:</p>
<pre><code>2020-12-04 ! Adjustment
    liabilities:creditcard:amex                                          -£76.15 = -£220.26
    equity:adjustment</code></pre>
<p>I don’t like making these adjustment transactions, and I’m pretty good at avoiding them now.</p>
<h4 id="annually">Annually</h4>
<p>At the end of December, I finish up the journal to start the new year:</p>
<ol type="1">
<li>Reconcile transactions.</li>
<li>Write off any small amounts owed between friends with a transaction to equity.</li>
<li>Rename the current journal file from <code>current.journal</code> to <code>$YEAR.journal</code>.</li>
<li>Create a new <code>current.journal</code>.</li>
<li>Generate opening / closing transactions with <code>hledger close</code>:
<ol type="1">
<li>Add the old journal file and the closing transaction to <code>combined.journal</code></li>
<li>Add the opening transaction to the new journal</li>
</ol></li>
</ol>
<p>Here’s an example of a (2) transaction:</p>
<pre><code>2020-12-31 ! Write-off
    assets:receivable:adam                                               -£11.95 = £0.00
    liabilities:owed:jake                                                 £10.94 = £0.00
    equity:writeoff</code></pre>
<p>Here’s an example of a (5.1) transaction:</p>
<pre><code>2021-01-01 ! Closing balances
    assets:cash:nationwide:flexdirect:pending:amex                      £-598.01 = £0.00
    assets:cash:nationwide:flexdirect:pending:cavendish                 £-200.00 = £0.00
    assets:cash:nationwide:flexdirect:pending:starling:patreon            £-8.00 = £0.00
    assets:cash:nationwide:flexdirect:pending:starling:protonmail         £-5.00 = £0.00
    assets:cash:nationwide:flexdirect:pending:starling:roll20             £-5.00 = £0.00
    assets:cash:nationwide:flexdirect:pending:starling:web               £-55.00 = £0.00
    assets:cash:nationwide:flexdirect:saved:food                        £-200.57 = £0.00
    assets:cash:nationwide:flexdirect:saved:graze                        £-50.00 = £0.00
    assets:cash:nationwide:flexdirect:saved:health                      £-500.00 = £0.00
    assets:cash:nationwide:flexdirect:saved:household                   £-300.00 = £0.00
    assets:cash:nationwide:flexdirect:saved:phone                       £-100.00 = £0.00
    assets:cash:nationwide:flexdirect:saved:rent                       £-2475.86 = £0.00
    assets:cash:nationwide:flexdirect:saved:travel                      £-523.69 = £0.00
    assets:cash:nationwide:flexdirect:saved:utilities                   £-800.00 = £0.00
    assets:cash:petty:hand:budgeted                                      £-19.05 = £0.00
    assets:cash:petty:hand:unbudgeted                                     £-2.00 = £0.00
    assets:cash:petty:home                                                 -3.35 EUR = 0.00 EUR
    assets:cash:petty:home                                              -1853.00 JPY = 0.00 JPY
    assets:cash:starling:saved:patreon                                   £-21.79 = £0.00
    assets:cash:starling:saved:protonmail                                £-42.43 = £0.00
    assets:cash:starling:saved:roll20                                    £-37.33 = £0.00
    assets:cash:starling:saved:web                                      £-283.38 = £0.00
    assets:investments:cavendish                                          -19.66 VANEA = 0.00 VANEA
    assets:investments:cavendish                                         £-36.08 = £0.00
    assets:investments:coinbase                                           -10.00 EUR = 0.00 EUR
    assets:investments:fundingcircle                                      £-0.03 = £0.00
    assets:investments:nsi:premium_bonds:emergency                     £-4475.00 = £0.00
    assets:investments:nsi:premium_bonds:move                          £-3775.00 = £0.00
    assets:receivable:deposit                                          £-1384.62 = £0.00
    assets:receivable:refund                                            £-161.00 = £0.00
    assets:pension:alpha                                           -2653.00 £/yr = 0.00 £/yr
    liabilities:creditcard:amex                                          £598.01 = £0.00
    liabilities:loan:slc                                               £20468.52 = £0.00
    equity:opening/closing</code></pre>
<p>And here’s an example of a (5.2) transaction:</p>
<pre><code>2021-01-01 ! Opening balances
    assets:cash:nationwide:flexdirect:pending:amex                        £598.01
    assets:cash:nationwide:flexdirect:pending:fidelity                    £200.00
    assets:cash:nationwide:flexdirect:pending:starling:patreon              £8.00
    assets:cash:nationwide:flexdirect:pending:starling:protonmail           £5.00
    assets:cash:nationwide:flexdirect:pending:starling:roll20               £5.00
    assets:cash:nationwide:flexdirect:pending:starling:web                 £55.00
    assets:cash:nationwide:flexdirect:saved:food                          £200.57
    assets:cash:nationwide:flexdirect:saved:graze                          £50.00
    assets:cash:nationwide:flexdirect:saved:health                        £500.00
    assets:cash:nationwide:flexdirect:saved:household                     £300.00
    assets:cash:nationwide:flexdirect:saved:phone                         £100.00
    assets:cash:nationwide:flexdirect:saved:rent                         £2475.86
    assets:cash:nationwide:flexdirect:saved:travel                        £523.69
    assets:cash:nationwide:flexdirect:saved:utilities                     £800.00
    ;
    assets:cash:petty:hand:budgeted                                        £19.05
    assets:cash:petty:hand:unbudgeted                                       £2.00
    assets:cash:petty:home                                               3.35 EUR
    assets:cash:petty:home                                            1853.00 JPY
    ;
    assets:cash:starling:saved:patreon                                     £21.79
    assets:cash:starling:saved:protonmail                                  £42.43
    assets:cash:starling:saved:roll20                                      £37.33
    assets:cash:starling:saved:web                                        £283.38
    ;
    assets:investments:fidelity                                             19.66 VANEA
    assets:investments:fidelity                                            £36.08
    assets:investments:coinbase                                         10.00 EUR
    assets:investments:fundingcircle                                        £0.03
    assets:investments:nsi:premium_bonds:emergency                       £4475.00
    assets:investments:nsi:premium_bonds:move                            £3775.00
    ;
    assets:receivable:deposit                                            £1384.62
    assets:receivable:refund                                              £161.00
    ;
    assets:pension:alpha                                                 2653.00 £/yr
    ;
    liabilities:creditcard:amex                                          -£598.01
    liabilities:loan:slc                                               -£20468.52
    ;
    equity:opening/closing</code></pre>
<section id="footnotes" class="footnotes footnotes-end-of-document" role="doc-endnotes">
<hr />
<ol>
<li id="fn1"><p>You might be wondering why I do the currency conversion one at a time for each account, rather than once at the end. This is because <code>FOO +on(FIELD) BAR</code> (or any binary operator) will discard those entries of <code>FOO</code> for which there isn’t a corresponding entry of <code>BAR</code>, it won’t assume <code>BAR</code> to be 0 in those cases. So this means that binary operators are <em>lossy</em> in PromQL! So to get around that issue, I convert all the series to the same currency before doing arithmetic on them.<a href="personal-finance.html#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2"><p>I’ve got rid of my dedicated emergency fund, since I have both a credit card and a few months regular expenses saved up. But I did have one in the past, so it’s taken into account in the short runway so that historic data works correctly.<a href="personal-finance.html#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>

      ]]>
    </summary>
  </entry>
  
  <entry>
    <title>Self Organisation</title>
    <link href="https://memo.barrucadu.co.uk/self-organisation.html" />
    <id>https://memo.barrucadu.co.uk/self-organisation.html</id>
    <published>2018-09-24T00:00:00Z</published>
    <updated>2021-12-19T00:00:00Z</updated>
    <summary type="html">
      <![CDATA[
<p>I’m good at remembering facts and details, but not so good at remembering tasks and experiences. I’d forget to do the laundry every weekend if I didn’t have it written down: so I wrote it down.</p>
<p>I’ve developed a system to organise myself and make sure I get around to doing the things I need to do. Like my <a href="personal-finance.html">personal finance</a> system, this system has evolved over the years based on what’s made noticeable improvements to my life, and this memo describes what I currently put into practice, and not some aspirational system I can only hope to achieve</p>
<h2 id="trello-for-to-do-lists">Trello for to-do lists</h2>
<p>I’ve worked at a few different programming jobs now, and I’ve noticed programmers on small agile teams tend to adopt a process like this:</p>
<ul>
<li><p>There’s a Trello board with various lists: some are lists for work not yet started, some are for work in progress, and one is for work which is done.</p></li>
<li><p>We regularly review the lists: to make sure work is progressing, to make sure we don’t have too much in progress at once, and to decide what to pick up next.</p></li>
<li><p>Once every week or two, there’s a more in-depth review in which new work gets prioritised, and old work might be changed or removed.</p></li>
</ul>
<p>I think this works really well. So I use this system to manage my life as well.</p>
<h3 id="trello">Trello</h3>
<figure>
<img src="self-organisation/todo.png" alt="A screenshot of my “To Do” Trello board" />
<figcaption aria-hidden="true">A screenshot of my “To Do” Trello board</figcaption>
</figure>
<p>Everything I need to do, which isn’t captured elsewhere (like in my email inbox, or in a GitHub issue), goes on the <a href="https://trello.com/">Trello</a> board. And if it’s a particularly important email or GitHub issue I want to make sure I don’t forget about, and I can’t deal with it straight away, I’ll make a card for it anyway.</p>
<p>I used to use <a href="https://orgmode.org/">org-mode</a> for this, but I’ve found I personally am more productive with Trello. <a href="https://orgmode.org/">org-mode</a> is very powerful, and so I felt I needed to tinker with it to come up with a <em>perfect</em> system, which in practice just meant I spent more time fiddling with <em>how I tracked things</em> than <em>actually doing things</em>. Trello is much more limited.</p>
<p>It’s also nice to have the board visualisation, so I can see the state of everything at a glance.</p>
<p>The rest of my process is now more complex than it was when I first started, but even just having “To Do”, “Doing”, “Waiting / Blocked”, and “Done” lists was a game-changer. I <em>would</em> have got my Ph.D corrections done without Trello (because I had to), but it would have been much more difficult.</p>
<h3 id="task-states">Task states</h3>
<pre class="graphviz"><code>digraph {
  nodesep=1;

  &quot;Normal tasks&quot;    [shape=plain,style=dashed]
  &quot;Urgent tasks&quot;    [shape=plain,style=dashed]
  &quot;Recurring tasks&quot; [shape=plain,style=dashed]

  &quot;Routines&quot;
  &quot;Has Prerequisites&quot;
  &quot;Nice To Have&quot;
  &quot;Priority&quot;
  &quot;Near Future&quot;
  &quot;Doing&quot;
  &quot;Waiting / Blocked&quot;
  &quot;Done&quot;

  &quot;Normal tasks&quot;    -&gt; &quot;Has Prerequisites&quot; [style=dashed];
  &quot;Normal tasks&quot;    -&gt; &quot;Nice To Have&quot;      [style=dashed];
  &quot;Normal tasks&quot;    -&gt; &quot;Priority&quot;          [style=dashed];
  &quot;Urgent tasks&quot;    -&gt; &quot;Doing&quot;             [style=dashed];
  &quot;Recurring tasks&quot; -&gt; &quot;Routines&quot;          [style=dashed];

  &quot;Routines&quot;          -&gt; &quot;Doing&quot;
  &quot;Has Prerequisites&quot; -&gt; &quot;Nice To Have&quot;
  &quot;Has Prerequisites&quot; -&gt; &quot;Priority&quot;
  &quot;Nice To Have&quot;      -&gt; &quot;Near Future&quot;
  &quot;Priority&quot;          -&gt; &quot;Near Future&quot;
  &quot;Near Future&quot;       -&gt; &quot;Doing&quot;
  &quot;Doing&quot;             -&gt; &quot;Waiting / Blocked&quot;
  &quot;Doing&quot;             -&gt; &quot;Done&quot;
  &quot;Waiting / Blocked&quot; -&gt; &quot;Doing&quot;
  &quot;Waiting / Blocked&quot; -&gt; &quot;Done&quot;
}</code></pre>
<p>Each task is in one of these states:</p>
<ul>
<li><p><strong>Routines</strong>—regular, time-based, tasks.</p></li>
<li><p><strong>Has Prerequisites</strong>—things I can’t do until I do something else.</p></li>
<li><p><strong>Nice To Have</strong>—things which would be nice to do, but aren’t particularly important or urgent.</p></li>
<li><p><strong>Priority</strong>—important, but non-urgent, things.</p></li>
<li><p><strong>Near Future</strong>—tasks regularly taken from <strong>Nice To Have</strong> and <strong>Priority</strong> which I’ve decided to get done soon.</p></li>
<li><p><strong>Doing</strong>—things I’m actively doing at the moment (this list is very small).</p></li>
<li><p><strong>Waiting / Blocked</strong>—things where I’ve done my part, and need to wait on something or someone else.</p></li>
<li><p><strong>Done</strong>—things I’ve done.</p></li>
</ul>
<p>Each of these is a list on my Trello board.</p>
<h3 id="the-near-future-state">The “Near Future” state</h3>
<p>I used to pick up tasks from <strong>Nice To Have</strong> and <strong>Priority</strong> as I felt like it. But one day I realised that some of the <strong>Priority</strong> tasks had been there for over a year. They were important, but I was putting them off, and still feeling good about myself because I was getting through lots of unimportant tasks instead.</p>
<p>This is standard procrastination behaviour.</p>
<p>So I decided to have a fortnightly “sprint planning” session where I would prioritise a small number of tasks, ensuring that nothing got neglected too much. I moved these into a <strong>This Sprint</strong> list, which I aimed to get through in that fortnight.</p>
<p>But, actually, I still found myself slipping a lot. The separate list of short-term priorities definitely helped out, but some things hung around in there for a while, or got moved back into a different list.</p>
<p>So I renamed it to <strong>Near Future</strong>. It does the same thing as <strong>This Sprint</strong> did, but it’s more honest.</p>
<h2 id="calendars-for-routines">Calendars for routines</h2>
<p>I track routines as recurring events in <a href="https://calendar.google.com/">Google Calendar</a>, another integral component of my self-organisation system.</p>
<p>Those routines which have multiple things to do (like my chores) have a corresponding card in the <strong>Routines</strong> list on my Trello board. When the time to do the routine arrives I move a copy of the template card to <strong>Doing</strong> and work through its checklist. Those which just have a single task, like “Near Future prioritisation”, just have a calendar entry.</p>
<p>Routines which I’ve got cards for are:</p>
<ul>
<li><p><strong>Weekly chores</strong>—household maintenance (cleaning, laundry, etc) and checking my <a href="personal-finance.html">ledger</a> is up to date.</p></li>
<li><p><strong>Prepare game</strong>—preparation for my regular RPG sessions (currently <a href="campaign-notes-2021-11-ars-magica.html">Ars Magica</a> and <a href="campaign-notes-2021-10-traveller.html">Traveller</a>).</p></li>
<li><p><strong>Monthly chores</strong>—more intense household maintenance (cleaning the oven, emptying the hoover, etc), updating computers, and reviewing the lists.</p></li>
<li><p><strong>Quarterly chores</strong>—updating my CV and website, and checking my credit report.</p></li>
<li><p><strong>Annual chores</strong>—reviewing my habits and preparing for the next year.</p></li>
</ul>
<p>Routines on my calendar which I don’t have cards for are:</p>
<ul>
<li><p><strong>Near Future prioritisation</strong>—every Sunday, review and move cards into and out of the <strong>Near Future</strong> list.</p></li>
<li><p><strong>Write up session notes</strong>—after my RPG sessions, write up notes from the game I prepared and ran.</p></li>
<li><p><strong>Weeknotes</strong>—every Sunday evening, write my <a href="https://weeknotes.barrucadu.co.uk/">weeknotes</a>.</p></li>
</ul>
<p>I find having the Trello cards, rather than just putting the steps to be done in the calendar event, helps. I like being able to look at the calendar and see when everything needs to be done; but I prefer the Trello card interface for text and checkboxes. It’s nice having everything in its place: temporal data on a calendar, procedural data in a card.</p>
<h2 id="going-analogue-for-household-organisation">Going analogue for household organisation</h2>
<p>The final component of my self-organisation system is a whiteboard and some pens.</p>
<p>I primarily use this to note down my shopping list, as it’s much easier to grab a pen and scribble something down than to open Trello and add a comment to a card.</p>
<p>I also use the whiteboard for meal planning. I have a simple 5-week calendar on the board, with rows labelled “Monday” to “Sunday” and columns labelled “1” to “5”, and the first cell of each column labelled with the day number. I tend to cook large portions of meals so I can freeze some of it for later, and I note down meals for future days as my freezer fills up. This has all but eliminated getting to meal time and realising I have nothing in, which has cut down on takeaways and helped to optimise my food budget.</p>

      ]]>
    </summary>
  </entry>
  
</feed>