Skip to main content

hledger add for creating loan entries and more

Project description

hledger-tools

make-loan-entries

Make loan entries in the specified journal which include interest expense and liability decrements for each entry.

An example:

> hledger-tools loan-journal-entries output.journal
Loan Description: Test Loan for $10,000 over 3 Years at 8%
Beginning Date (YYYY-MM-DD): 2026-03-17
Loan Term in Years: 3
Annual Interest Rate (ex: 0.02): 0.08
Currency Code: USD
Loan Amount: 10000
Cash Account: assets:cash
Interest Expense Account: expenses:interest
Liability Account: liabilities:loan

Loan(name='Test Loan for $10,000 over 3 Years at 8%', begin=datetime.date(2026, 3, 17), term_months=36, annual_interest=Decimal('0.080'), principal=Money('0E-25', 'USD'))

2026-03-17 Opening Loan: $10,000.00 ; Opening Loan
   assets:cash  $10,000.00
   liabilities:loan  $-10,000.00

2026-03-17 Test Loan for $10,000 over 3 Years at 8%
   assets:cash  $-313.37
   expenses:interest  $66.67
   liabilities:loan  $246.70

2026-04-17 Test Loan for $10,000 over 3 Years at 8%
   assets:cash  $-313.36
   expenses:interest  $65.02
   liabilities:loan  $248.34

....

2029-01-17 Test Loan for $10,000 over 3 Years at 8%
   assets:cash  $-313.37
   expenses:interest  $4.14
   liabilities:loan  $309.23

2029-02-17 Test Loan for $10,000 over 3 Years at 8%
   assets:cash  $-313.37
   expenses:interest  $2.08
   liabilities:loan  $311.29

2029-03-17 Test Loan for $10,000 over 3 Years at 8%
   assets:cash  $-0.00
   expenses:interest  $0.00
   liabilities:loan  $0.00

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hledger_tools-0.1.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hledger_tools-0.1.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file hledger_tools-0.1.3.tar.gz.

File metadata

  • Download URL: hledger_tools-0.1.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.12 Darwin/25.3.0

File hashes

Hashes for hledger_tools-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2b4d69e7a3dd5c5d0d7149f8e14a76606d927ed6cbbf8cf0f1c9b05f75ff1033
MD5 dc349f4c215eddce079bbab6f724de70
BLAKE2b-256 f06151f5af4931582f2041e961df8b32870e0774fe49e0e3764602a3fa5e7b45

See more details on using hashes here.

File details

Details for the file hledger_tools-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: hledger_tools-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.12 Darwin/25.3.0

File hashes

Hashes for hledger_tools-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5b87cb0d0c137547328a536e4d238cec23d4675ffd8dc5a57f58c9185467a1f5
MD5 c63ea48d17ac7fc98abeedbcc0e43e82
BLAKE2b-256 3cbed8732d37952baa97d37f9b8c6d0a88654f97df7d537cc27bce4de94c53dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page