A User's view of Hledger

Learning about hledger

The Richest hledger User in Babylon

Last week I mentioned the book The Richest Man in Babylon. This tome of financial advice is often regarded as a classic in the field.

It occurred to me, is there any way that hledger could be used to put the suggestions of this book into practice? In other words, if you wanted to apply the teachings of The Richest Man in Babylon to your personal finances, could hledger help?

For example, one of the book’s key pieces of advice, perhaps even the starting point, is to save at least 10% of your income.

The hledger incomestatement command can help here. There are other ways, but incomestatement will work. The chart below shows the incomestatement command and the generated report for some fictitious data.

hledger incomestatement
Income Statement 2023-02-16..2023-02-19

                    || 2023-02-16..2023-02-19
 Revenues           ||
 income:salary      ||                 10 EUR
                    ||                 10 EUR
 Expenses           ||
 expenses:groceries ||                  3 EUR
 expenses:rent      ||                  6 EUR
                    ||                  9 EUR
 Net:               ||                  1 EUR

Comparing the figure for “Net” (1 EUR) to the total for “Revenues,” (10 EUR) we see that we have saved one Euro out of the ten we earned. So, at least for this time period, we have succeeded.

Two notes: First, for the above to work, you cannot list transfers of money as an expense. For example, if you moved the one Euro of cash to a savings account, and you list this as an expense, then the report will make it look as if you spent all your money, which you didn’t.

Second, don’t list money that you have invested as an expense. For example, if you buy shares of a mutual fund, don’t characterize the transaction as an expense.

However, if you characterize your expenses and income correctly, the hledger incomestatement command can let you know if you are on track for saving at least 10% of what you earn.

What else from the The Richest Man in Babylon can hledger help with? Look for next week’s blog, where I plan to discuss exactly that.