Organizing Your Account Hierarchy for Tax Analysis
This article is written for users in the US.
Introduction
How would an account hierarchy organized to help with
tax analysis look like? This article shows one way to
do it, and the underlying principles, for the Income:
and Assets:
hierarchies. See
here for how to organize the Expense:
hierarchy.
The Income Hierarchy
Let us look at an example hierarchy for Income
accounts:
Income:Investments:
ββ Federal-Only:
ββ State-Only:
ββ HSA:
ββ Tax-Free:
ββ Tax-Deferred:
ββ Taxable:
ββ Capital-Gains:
β ββ Long:[Midelity:AAPL, ...]
β ββ Short:
ββ Capital-Gains-Distributions:
β ββ Long:
β ββ Short:
ββ Dividends:[Midelity:ORNG, ...]
ββ Interest:
Some notes:
- the capital gains, dividends, and income substructure shown for
Taxable
is repeated for all the other categories (Tax-Deferred
,Tax-Free
, etc.) - the
Federal-Only
andState-Only
are for income that are taxed by one authority but not the other. An example is Treasury bills (Federal only) - income from an HSA account is tax free, and can be simply booked to that account, but is shown separately here for those who live in states that tax them
- Roth accounts go in
Tax-Free
- 401k and traditional IRA accounts go in
Tax-Deferred
What does this particular hierarchy buy us? Most importantly, it lets us see our taxable
investment at a glance, without running complicated, error prone queries. Simple see the
account sub-total in Beancount or Fava for Income:Investments:Taxable
(and/or
Federal
, State
). This helps estimate taxes, or make decisions on strategies such as
tax loss harvesting, with minimal friction.
Of course, if for some reason, it is more important for you to be aware of income by
type (dividends, interest etc.), simply invert those two in the hierarchy, so you have,
for example Income:Investments:Dividends:Taxable:...
. You might want to do this if you
only have tax-free income, for example.
Remember, bean-query is general enough and sophisticated enough for you to be able to write a query to get almost anything you want out of your journal. But why write complex queries prone to failure when it can be avoided? What we are doing by organizing our account hierarchy well is to classify our transactions so well at import time that we almost completely avoid the need for querying, to get the information we most commonly need out of our journal.
The Asset Hierarchy
For simplicity and consistency, simply mirror the hierarchy above for Assets
:
Assets:Banks:BankOfUSA
Assets:Investments:
ββ HSA:
ββ Tax-Free:
ββ Tax-Deferred:
ββ Taxable:
ββ Midelity:AAPL
ββ ...
Maintain the Hierarchy Above with Zero Effort
My importers automatically file using this hierarchy, which means there is no extra work in maintaining the hierarchy above. Here are a couple of subtle gotchas that my importers support:
- Funds in taxable accounts that are not subject to tax (eg: municipal bond funds)
automatically have their dividends booked into the
Tax-Free
hierarchy by the importer (this article shows how) - Capital gains distributions are matched by description and booked by the importer (this article shows how)
- I use βcommodity-leafβ accounts as the Beancount documentation recommends. Although not necessary, this makes debugging very easy. Again, my importers support these
Tax and financial laws vary geographically. This article is written for users in the US. Of course, I bear absolutely no liability if you read this article and make errors in your taxes or finances. This is not advice of any sort, legal, financial, or otherwise, yada yada.