Denis Evsyukov

@devsyukov@infosec.exchange

I have a question about #hledger.

Do you close out the year? I usually continue year after year, dividing them into separate files. But I don't use closing.

What about you? If so, what for?

January 3, 2026 at 8:30:53 AM
·

I do close it, mostly just so that things add up correctly no matter which file/files I'm sourcing for the particular command/report.

For example; for my own purposes I usually just work with the current year's file, but for my Fediverse instance I build a page summarizing all related expenses I've logged, so I source all files for that. It's late right now in my timezone so I can't remember for sure whether or not closing years affects that but it certainly can't hurt and only takes a couple minutes per year.

Here's the page in question, I'm rather proud of it: https://polymaths.social/financial-transparency/

polymaths.social

Financial Transparency

In the interest of financial transparency, we list all costs of running the instance here for you to see and consider.

I try to close out annually in January (I haven't yet gotten around to it this year), removing 2+ year old data, so my ledger has less than 3yr of data in it. I found that ledger (I haven't compared with hledger for performance) starts getting noticeably slower to run toward the end of the year with the volume of transactions in the ledger-file.

I chose the timeframe because it means that all transactions that get closed/archived-off have cleared. It's more awkward to have pending transactions still in flight when trying to close, and I haven't found a satisfactory solution there (I'm sure there's some Proper Accounting Way To Close Books on Pending Transactions™, but I've not had that click in my brain)

I also use a wrapper.ledger and transactions.ledger pair of files. The wrapper contains my opening balances, imports the transactions, then does a few balance assertions at the end. The advantage is that I can concatenate all my transaction files for multi-year reporting:

$ cat initial_opening_balance.ledger 20*.ledger transactions.ledger | ledger -f - …

where the initial_opening_balance.ledger is my initial opening balances when I started using ledger, the 20*.ledger files are previously closed years, and the transactions.ledger is the current data.

Elk Logo

Elk is in Preview!

Thanks for your interest in trying out Elk, our work-in-progress Mastodon web client!

Expect some bugs and missing features here and there. we are working hard on the development and improving it over time.

Elk is Open Source. If you'd like to help with testing, giving feedback, or contributing, reach out to us on GitHub and get involved.

To boost development, you can sponsor the Team through GitHub Sponsors. We hope you enjoy Elk!

三咲智子 Kevin DengPatakDaniel RoeAnthony Fu

The Elk Team