Skip to content

Tax-Differentiated Account Model (401k/IRA/Roth/Taxable) #1731

@alanlujan91

Description

@alanlujan91

Summary

The choice among taxable, tax-deferred (traditional 401(k)/IRA), and tax-exempt (Roth) accounts can shift a household's lifetime tax burden by tens of thousands of dollars, yet HARK has no model of tax-differentiated saving. The existing RiskyContribConsumerType models a single tax-deferred account with withdrawal penalties, and issue #1588 proposes an IRA extension, but neither captures the full asset location problem: which assets to hold in which account type to minimize lifetime tax burden. A general multi-account model would address questions about retirement savings policy, optimal Roth conversion strategies, and the welfare effects of contribution limits.

Connection to Financial Services Practice

The wealth-management plugin includes a portfolio-rebalance skill (wealth-management/skills/portfolio-rebalance/SKILL.md) that explicitly optimizes asset location (placing bonds and REITs in tax-deferred accounts, high-growth equities in Roth accounts, and tax-efficient index funds in taxable accounts). The tax-loss-harvesting skill (wealth-management/skills/tax-loss-harvesting/SKILL.md) models capital gains realization timing, wash-sale compliance, and the $3,000 net loss deduction against ordinary income. The financial-plan skill models Required Minimum Distributions, Roth conversion ladders, and Social Security coordination with withdrawal sequencing. A HARK model would replace these practitioner heuristics with a fully optimized policy function over contributions, withdrawals, conversions, and asset location.

Mathematical Model

Environment

Time is discrete, $t = 0, 1, \ldots, T$. The agent allocates wealth across three account types: a taxable brokerage account with balance $W_t^{\text{tax}}$, a tax-deferred account (traditional IRA/401k) with balance $W_t^{\text{td}}$, and a tax-exempt account (Roth IRA/401k) with balance $W_t^{\text{roth}}$. Each account holds a portfolio of a risky asset (equity, gross return $\tilde{R}_t$) and a riskless asset (bonds, gross return $R_f$). The agent also receives stochastic labor income $Y_t$ subject to income taxation.

State Variables

The individual state is $(W^{\text{tax}}_t, W^{\text{td}}_t, W^{\text{roth}}_t, B_t, z_t, t)$ where we denote by $B_t$ the cost basis in the taxable account (needed to compute capital gains), and by $z_t$ the persistent income state.

Preferences

$$V_0 = \mathbb{E}_0 \sum_{t=0}^{T} \beta^t \varsigma_t, u(c_t) + \beta^T \varsigma_T, \Phi(W_{T+1}^{\text{tax}} + W_{T+1}^{\text{td}}(1 - \bar{\tau}) + W_{T+1}^{\text{roth}})$$

where the period utility is $u(c) = c^{1-\rho}/(1-\rho)$ with relative risk aversion $\rho$, survival probability $\varsigma_t$, and $\Phi(\cdot)$ is a bequest function. The tax-deferred account is discounted by the expected terminal tax rate $\bar{\tau}$ in the bequest valuation.

Choice Variables

Each period the agent chooses:

  1. Consumption $c_t$
  2. Contributions: $\ell_t^{\text{td}}$ to tax-deferred (pre-tax, up to limit $\bar{\ell}^{\text{td}}$) and $\ell_t^{\text{roth}}$ to Roth (after-tax, up to limit $\bar{\ell}^{\text{roth}}$)
  3. Withdrawals: $d_t^{\text{td}} \geq 0$ from tax-deferred (taxed as ordinary income), $d_t^{\text{roth}} \geq 0$ from Roth (tax-free if qualified)
  4. Roth conversion: $\xi_t \geq 0$ (amount converted from tax-deferred to Roth, taxed as ordinary income in year of conversion)
  5. Portfolio allocation: risky share $\alpha_t^{\text{tax}}$, $\alpha_t^{\text{td}}$, $\alpha_t^{\text{roth}}$ in each account

Tax System

Ordinary income tax: We denote the marginal tax function by $\mathcal{T}(\cdot)$, applied to taxable income:

$$\text{Taxable income} = Y_t - \ell_t^{\text{td}} + d_t^{\text{td}} + \xi_t$$

The tax-deferred contribution $\ell_t^{\text{td}}$ reduces current taxable income; withdrawals $d_t^{\text{td}}$ and Roth conversions $\xi_t$ increase it. This formulation abstracts from annual dividend and interest income taxation within the taxable account. A more complete model would add realized dividends, interest, and capital gains distributions to taxable income each year.

Capital gains tax: When the agent withdraws from the taxable account, realized gains are taxed:

$$G_t = \max\Bigl(0,; \text{withdrawal} - B_t \cdot \frac{\text{withdrawal}}{W_t^{\text{tax}}}\Bigr)$$

with long-term capital gains rate $\tau^{cg}$.

Required Minimum Distributions: For $t \geq t^{\text{RMD}}$ (currently age 73), the agent must withdraw at least

$$\text{RMD}_t = \frac{W_t^{\text{td}}}{\ell(t)}$$

where $\ell(t)$ is the IRS life expectancy divisor from the Uniform Lifetime Table.

Account Evolution

Taxable account:

$$W_{t+1}^{\text{tax}} = \bigl(W_t^{\text{tax}} + \text{net deposit}_t\bigr) \cdot R_t^{p,\text{tax}}$$

where the portfolio return in the taxable account is $R_t^{p,\text{tax}} = R_f + \alpha_t^{\text{tax}}(\tilde{R}_t - R_f)$. The taxable account serves as the residual buffer: after paying taxes, making contributions to tax-advantaged accounts, and consuming, any remaining resources are deposited in (or withdrawn from) the taxable account.

Tax-deferred account:

$$W_{t+1}^{\text{td}} = \bigl(W_t^{\text{td}} + \ell_t^{\text{td}} - d_t^{\text{td}} - \xi_t\bigr) \cdot R_t^{p,\text{td}}$$

where $R_t^{p,\text{td}} = R_f + \alpha_t^{\text{td}}(\tilde{R}_t - R_f)$. Growth is tax-free inside the account; only withdrawals trigger ordinary income tax.

Roth account:

$$W_{t+1}^{\text{roth}} = \bigl(W_t^{\text{roth}} + \ell_t^{\text{roth}} + \xi_t - d_t^{\text{roth}}\bigr) \cdot R_t^{p,\text{roth}}$$

where $R_t^{p,\text{roth}} = R_f + \alpha_t^{\text{roth}}(\tilde{R}_t - R_f)$. Both growth and qualified withdrawals are tax-free.

Cost basis:

$$B_{t+1} = B_t \cdot \frac{W_t^{\text{tax}} - \text{withdrawal}_t}{W_t^{\text{tax}}} + \text{new purchases}_t$$

where $\text{withdrawal}_t$ denotes the gross dollar amount liquidated from the taxable account and $\text{new purchases}_t$ denotes after-tax dollars newly invested, both determined by the flow-of-funds constraint. This formula applies average-cost accounting.

Recursive Formulation (Bellman Equation)

$$V_t(W^{\text{tax}}, W^{\text{td}}, W^{\text{roth}}, B, z) = \max_{c,, \ell^{\text{td}},, \ell^{\text{roth}},, d^{\text{td}},, d^{\text{roth}},, \xi,, \boldsymbol{\alpha}} ; u(c) + \beta, \varsigma_t; \mathbb{E}\bigl[V_{t+1}(W'^{\text{tax}}, W'^{\text{td}}, W'^{\text{roth}}, B', z')\bigr]$$

subject to:

  1. Flow of funds: Total after-tax resources equal consumption plus net contributions to all accounts:
    $$Y_t + d_t^{\text{td}} + d_t^{\text{roth}} - \mathcal{T}(Y_t - \ell_t^{\text{td}} + d_t^{\text{td}} + \xi_t) - \tau^{cg} G_t + W_t^{\text{tax}} = c_t + \ell_t^{\text{roth}} + \frac{W_{t+1}^{\text{tax}}}{R_t^{p,\text{tax}}}$$
  2. Contribution limits: $0 \leq \ell_t^{\text{td}} \leq \bar{\ell}^{\text{td}}(t)$, $0 \leq \ell_t^{\text{roth}} \leq \bar{\ell}^{\text{roth}}(t)$
  3. RMD constraint: $d_t^{\text{td}} \geq \text{RMD}_t$ for $t \geq t^{\text{RMD}}$
  4. No-borrowing: $W_{t+1}^j \geq 0$ for all account types $j$
  5. Portfolio constraints: $\alpha_t^j \in [0, 1]$ for each account $j$

Key Insight: Asset Location

The optimal asset location result (Dammon, Spatt, and Zhang 2004) is that, in a model with taxable and tax-deferred accounts, bonds should be held in the tax-deferred account and equities in the taxable account. With a Roth account added (Shoven and Sialm 2004), assets with the highest expected pre-tax returns are most valuable in the Roth, since both contributions and growth escape taxation entirely.

Key References

  • Dammon, R. M., Spatt, C. S., and Zhang, H. H. (2004). "Optimal Asset Location and Allocation with Taxable and Tax-Deferred Investing." Journal of Finance, 59(3), pp. 999-1037.
  • Shoven, J. B. and Sialm, C. (2004). "Asset Location in Tax-Deferred and Conventional Savings Accounts." Journal of Public Economics, 88(1-2), pp. 23-38.
  • Zhou, J. (2012). "Life-Cycle Stock Market Participation in Taxable and Tax-Deferred Accounts." Journal of Economic Dynamics and Control, 36(11), pp. 1814-1829.
  • Horneff, W. J., Maurer, R. H., Mitchell, O. S., and Stamos, M. Z. (2009). "Asset Allocation and Location over the Life Cycle with Investment-Linked Survival-Contingent Payouts." Journal of Banking and Finance, 33(9), pp. 1688-1699.

Implementation Notes

  • With 5 state variables $(W^{\text{tax}}, W^{\text{td}}, W^{\text{roth}}, B, z)$, computation is demanding. A practical simplification drops cost basis tracking (assume FIFO or average cost) for a 4D state, or discretizes one account balance.
  • RiskyContribConsumerType already handles a 3-stage-within-period structure (contribute, allocate, consume); the tax-differentiated model could adopt similar multi-stage timing.
  • Roth conversion optimization ($\xi_t$) is the key novel policy variable: the agent "fills up" low tax brackets with conversions in low-income years (early retirement, before RMDs begin). This standard financial planning technique lacks a rigorous dynamic programming treatment.
  • Could be implemented as a lifecycle model (ages 25-100) with age-dependent contribution limits, RMD schedules, and Social Security income.
  • Builds on HARK's existing PortfolioConsumerType and RiskyContribConsumerType.
  • Connects to the Social Security claiming model (Issue Social Security Claiming Decision Model #1732), where withdrawal sequencing interacts with claiming timing through the tax bracket, and to the multi-asset portfolio model (Issue Multiple Risky Assets Portfolio Choice #1735), which generalizes within-account portfolio choice to $N$ risky assets.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions