Skip to content

Methodology

The objective function this solves and the formulas behind it.

SpendingPath computes how much to spend, how much to save, and how much to hold in a risky asset at each year of an inputted scenario. It does this by solving a lifetime utility maximization problem rather than by applying a rule of thumb such as spending 4% a year. This page states that problem. For the ideas behind it, see the primer under the streamlined model. Nothing here is investment, tax, or legal advice. The Terms of Service state that formally.

Utility

Each year’s consumption C is scored with constant relative risk aversion (CRRA) utility.

u(C) = (C^(1−γ) − 1) / (1−γ)      for γ ≠ 1
u(C) = ln(C)                      for γ = 1

The risk aversion coefficient γ sets how quickly utility falls as consumption falls. The time preference rate δ sets how much less a year of utility counts for each year it is delayed. Every dollar figure is in real terms, so all returns and growth rates are above inflation.

The objective

The model computes a consumption path that maximizes discounted lifetime utility over the horizon.

maximize  Σₜ e^(−δt) · Sₜ · u(Cₜ)  +  terminal value

Sₜ is the probability of surviving to year t. It equals 1 in every year unless mortality weighting is on (see below).

The problem is solved by backward induction, following Bellman. Starting from the final year, the model computes the value V of every point on a grid of account balances, one year at a time, back to the first year.

Vₜ(W) = max over C, k, ρ  of  [ u(C) + e^(−δ) · sₜ · Vₜ₊₁(W′) ]

W is the state, made up of three account balances. C is consumption, k is the amount contributed, and ρ is the Roth share of that contribution. sₜ is the one year survival probability. The balances left after spending, taxes, and contributions grow at the portfolio’s certainty equivalent return (defined below) to give next year’s state.

W′ = (W − gross withdrawals + contributions) · (1 + CER)

This makes each year’s transition deterministic. Market risk enters through CER, which is lower than the portfolio’s expected return by a penalty that grows with γ and with volatility.

The risky share

A portfolio holding a share π in the risky asset and the rest in the risk free asset is scored by its certainty equivalent return. CER is the guaranteed return that gives the same utility as the risky portfolio.

CER(π) = r_f + π · (r − r_f) − ½ · γ · π² · σ²

r is the risky asset’s expected return, σ its volatility, and r_f the risk free return. Maximizing CER over π gives Merton’s share.

π* = (r − r_f) / (γ · σ²)

The model applies π* to total wealth, which includes human capital. Human capital H is the present value of the scenario’s remaining after tax income and account contributions until the retirement age, discounted at r_f. The share actually held in the financial accounts F is then adjusted to reach that target.

π_F = clip( (π* · (F + H) − H_s) / F ,  0,  1 )

H_s = 0   when earned income is bond-like
H_s = H   when earned income is stock-like

Bond-like income acts as a safe holding, so the financial accounts take more risk to compensate. Stock-like income already carries market risk, so it counts against the risky target. The share is capped between 0 and 100 percent because the model allows no borrowing and no short positions. As H shrinks toward retirement, π_F converges to π*. The same π_F and its CER apply to all three accounts in a given year.

The model is a mathematical idealization. It has not been audited by an outside firm and does not replace a licensed financial, tax, or legal professional. See the Terms of Service.