Opening balances
The ledger starts on an opening date. Each account's balance at the end of that day is its opening balance: one entry against Equity:Opening-Balances, and a balance assertion that pins it. open_balances writes them all for one repository, in one commit. Ask for the prompt "Inventory balances as of a date" to go through every account.
- The date must be before each account's oldest statement line. History and opening balances must not cover the same days, or each amount would count twice. An account opened later is moved back to the opening date.
- A bank account's opening balance: when
assert_balancefails, it says how much is missing. If the bank's history starts after the account opened, that amount is the opening balance. - Money owed (a credit card, a loan) is a negative amount.
- Investment share lots (
securitiesandretirement): give the share count inamount, the ticker symbol incurrency, and either the per-share price or the total lot cost basis (when total cost basis is given,open_balancescomputes the per-share unit cost from total cost basis divided by share count), plus the original acquisition date if earlier than the opening date. Multiple lots for the same security sub-account can be included in one call;open_balanceswrites one opening lot entry per lot and pins the combined share count ininvariants.beancount. - Reconstructing from tax forms (
evidence): when original closing statements or purchase confirmations are missing, store prior-year tax forms (such asForm 1040,Schedule D,Schedule E,Form 4562,Form 1065, orForm 8825) understatements/tax-forms/withupload_linkorimport_fileand pass the file path inevidenceon each reconstructed balance inopen_balances(including depreciable asset basis and negative prior accumulated depreciation on<asset>:AccumulatedDepreciation). When a tax form gives only a combined figure, put the uncertain split on an:Estimatesub-account and annotate it withannotate_accountsolist_estimatestracks it untilcorrect_estimatereplaces it. - An account that has an opening entry already is refused (except additional share lots opened in the same call). To correct it, call
open_balancesagain withreplace: trueon the account's item (on every lot of an investment account): the old entry and its pinned assertion go, the new ones are written, and the commit message records what was there. For an opening entered on the wrong account, giveremove: trueinstead, with no amount.