Documentation
The general account
The general account (assets:general) is the central cash account through which every simulated
transaction flows. Think of it as your operating account: income lands here, expenses are paid from
here, and when the balance goes negative after a transaction, the simulation automatically tops it
back up by drawing from your other assets.
What flows through it
In (credits):
- Net salary after taxes and pre-tax deductions
- Social security payments
- Real estate sale proceeds
- Mortgage loan disbursements (the principal you borrow)
- Withdrawals from brokerage, IRA, 401k, and other assets when they are tapped by the funding cascade
Out (debits):
- All expenses (general, rent, healthcare, travel, etc.)
- Real estate down payments, mortgage payments, and closing costs
- Federal, state, city, Medicare, and social security taxes
- Income priority transfers (e.g. moving money into an emergency fund or brokerage account each month)
- The 10% early-withdrawal penalty when a tax-deferred account is tapped before retirement age
The funding cascade
Every transaction that debits the general account is checked: if the balance would go negative, the simulation automatically liquidates from your other assets to cover the shortfall before the transaction is recorded. This is the funding cascade.
Assets are tapped in this order by default (cheapest first):
- Savings accounts (other than general itself)
- Brokerage
- HSA
- Roth IRA
- Traditional 401k (incurs 10% penalty before retirement age)
- Real estate (triggers a full property sale; only if
liquidate: true)
This ordering is automatic and fixed; there is no configuration for it.
Within an account, holdings are sold safest class first — cash, then treasury, bond, equity, and
real property — so growth assets are preserved. Override this per account with sellOrder: (its
listed tickers are sold first, in order).
Which account it is
The general account is always assets:general — a synthetic operating account the simulation
routes through. It is not one of your declared accounts:, and it is not currently configurable.
One account, not a concept
The general account is a real hledger account in the output journal — you can query it directly:
hledger -f hforecast.journal balance assets:general
hledger -f hforecast.journal register assets:general
Its balance at any point represents the uninvested cash on hand after all income, expenses, transfers, and taxes for that period have been applied.