Accounting Dictionary for Beancount Users (A–Z)
· 17 минути четене
Welcome to your developer-friendly guide to accounting concepts, tailored specifically for the world of plaintext accounting with Beancount. This dictionary bridges the gap between traditional finance terminology and Beancount's unique syntax, directives, and tools. Whether you're a seasoned developer new to accounting or a finance pro exploring plaintext methods, this A–Z reference will help you master your ledger.
How to Read Each Entry
Each term is broken down into three parts for clarity:
- Conceptual Meaning — A simple, jargon-free explanation of the accounting or finance idea.
- Beancount Implementation — How the concept is represented or handled in Beancount, whether through directives, options, command-line tools, or reports.
- Example — A minimal, copy-paste-ready code snippet to illustrate the concept in a
.beancount
file.
Note: All examples adhere to the canonical syntax and behavior described in the official Beancount documentation.
A
Account
- Conceptual Meaning: A named category or "bucket" used to track the balance of something you own, owe, earn, or spend. Examples include your checking account, credit card, salary, or grocery expenses.
- Beancount Implementation: Account names are hierarchical and separated by colons (e.g.,
Assets:Bank:Checking
). Every account must belong to one of the five root account types:Assets
,Liabilities
,Equity
,Income
, orExpenses
. - Example:
2014-05-01 open Assets:US:BofA:Checking USD
Accounting Equation
- Conceptual Meaning: The fundamental formula on which all accounting is based: Assets = Liabilities + Equity. It means that everything a business or individual owns (assets) is financed by either debt (liabilities) or the owner's own funds (equity).
- Beancount Implementation: This equation is automatically and rigorously enforced. Every transaction must be zero-sum, meaning the total of all its postings must equal zero. This design makes it impossible to create an unbalanced entry.
Accrual vs. Cash Basis
- Conceptual Meaning: Two methods of recording transactions. Accrual basis records revenue when it's earned and expenses when they're incurred, regardless of when money changes hands. Cash basis records them only when cash is actually received or paid.
- Beancount Implementation: Beancount supports both methods. Accrual accounting is achieved by using
Assets:Receivables
for money owed to you andLiabilities:Payables
for money you owe. Cash basis accounting simply omits these intermediate postings.
Amortization / Depreciation
- Conceptual Meaning: The process of systematically spreading the cost of a tangible (depreciation) or intangible (amortization) asset over its useful life. For example, writing off the value of a company laptop over three years.
- Beancount Implementation: This is handled by creating periodic transactions that move a portion of the asset's cost from its asset account to an expense account (e.g.,
Expenses:Depreciation
). This can be automated using scheduled transaction plugins.
B
Balance Assertion
- Conceptual Meaning: A checkpoint to confirm that your recorded balance for an account matches the real-world balance (e.g., from a bank statement) on a specific date. This is the core of reconciliation.
- Beancount Implementation: The
balance
directive asserts an account's total value at the start of the specified day. Beancount will raise an error if the calculated balance from all prior transactions does not match the asserted amount. - Example:
2024-01-31 balance Assets:US:BofA:Checking 154.20 USD