A User's view of Hledger

Learning about hledger

Mutual funds part 4 — Treasury Bills

One thing that can be purchased through some mutual fund companies is a T-bill. What is a way to track T-bills in hledger?

First, some background for this example: the mutual fund will offer T-bills in denominations of USD 100.00. This is the face value, and you normally buy at less than the face value. If you hold until the redemption date, you receive the face value. Because I am interested in tracking shares rather than the current value in dollars, I created a “currency” called “tbill.” Also, I consider the redemption date to be important information, so I include it as part of the asset name. You can see how the currency and redemption dates are used in the example transactions below.

How do you enter a T-bill that as a starting balance, meaning that you already own the T-bill? The way I chose was like this:

2026-01-01 starting balance
    assets:ACME:U.S. Treasury Bill due 01/22/26  100.0000 tbill
    equity:start                                -100.0000 tbill

As mentioned above, the 100.0000 is the face value, and the “currency” is “tbill.”

Later that same month, the T-bill matures, and the Acme mutual fund helpfully tells you that you purchased the T-bill for $97.00, so you earned $3.00 in interest. In addition, Acme deposits the total of $100.00 to your BigBank checking account.

Here is how I entered the transactions. First, two transactions to track the income and return of principal separately:

2026-01-22 Treasury Bill interest | U.S. Treasury Bill due 01/22/26
    income:ACME:U.S. Treasury Bill due 01/22/26   -$3.00
    assets:ACME:cash                               $3.00

2026-01-22 Treasury Bill principal returned | U.S. Treasury Bill due 01/22/26
    assets:ACME:cash                              $97.00
    assets:ACME:U.S. Treasury Bill due 01/22/26  -100.0000 tbill

And now one transaction to move the funds to my checking account:

    
2026-01-22 Treasury Bill redemption | U.S. Treasury Bill due 01/22/26
    assets:ACME:cash                   $-100.00
    assets:BigBank:checking             $100.00

The last transaction above (Acme depositing the money into your checking account) is only one possibility. The funds could be transferred to any account that you have.

In any case, I am so thrilled about earning $3.00, that I decide to purchase another T-bill through Acme. I write them a check for the current price of a $100.00 T-bill, which for this example is $96.78, and I record the transaction as:

2026-02-17 Treasury Bill purchase | U.S. Treasury Bill due 2027-02-18
    assets:checking                             -$96.78
    assets:ACME:U.S. Treasury Bill due 18/02/27  100.0000 tbill

And that’s it for adventures in T-bill purchasing and redemption in ways that I — a non-accountant — can understand. At some point I may discover drawbacks or even errors to my approach, but it seems to work for now.