Merton's portfolio problem

asks how an investor should divide wealth between a risky asset and a risk-free asset while choosing consumption over time. The objective is to maximize expected utility. The problem was formulated and solved by Robert C. Merton in 1969 for both finite and infinite horizons.

For completeness, we will state the full continuous-time problem, then focus on the simple equation it produces for optimally sizing the risky asset.

This site is inspired by Bret Victor's “Explorable Explanations”. Values shown in red update dynamically with the controls.

Problem statement

The investor lives from time 0 to time T; their wealth at time T is denoted WT. They start with a known initial wealth W0. At time t they must choose their consumption rate, ct, and the fraction of wealth to invest in the risky asset, πt (the remaining fraction 1 − πt being invested in the risk-free asset).

The objective is to choose consumption and portfolio allocation to maximize expected utility from consumption over time and wealth left at T:

Here u is the utility function, ρ discounts future utility, ε weights utility from terminal wealth WT, and γ measures the investor's risk aversion.

The full problem jointly determines consumption and investment. We retain that setup, but follow its portfolio component: under the assumptions below, ρ, ε, and T shape the consumption policy but do not appear in the optimal risky share.

The wealth evolves according to the stochastic differential equation

where r is the risk-free rate, μ is the risky asset’s expected return, σ is its volatility, and dBt is a random shock from a Wiener process. The model treats r, μ, and σ as fixed.

The utility function is of the constant relative risk aversion (CRRA) form:

In this form, greater γ means greater relative risk aversion. Because γ appears in the denominator of the allocation rule below, a more risk-averse investor holds a smaller risky position.

Optimal allocation

The portfolio choice balances reward against risk. Investing a fraction π in the risky asset contributes expected reward π(μr). Its variance grows as π2σ2, and γ determines how strongly that risk is penalized. The relevant tradeoff is

Reward minus risk penalty by risky allocation A concave reward-minus-risk curve over nonnegative risky allocations. reward − risk penalty share of wealth in the risky asset, π

At the maximum, the slope is zero: (μr) − γπσ2 = 0.

Rearranging gives a closed-form portfolio rule:

Closed-form portfolio rule

The allocation rule above is commonly referred to as Merton's fraction. Its key intuitions are visible directly in the equation: more excess return increases the risky share, more risk aversion reduces it, and doubling volatility quarters the share. Neither W nor t appears on the right-hand side, so under the model's assumptions the investor maintains the same risky-asset fraction regardless of current wealth or remaining horizon. The dollar position changes with wealth; the proportion does not.

Portfolio implications

Once π is known, the portfolio's expected return and volatility follow directly:

After 10 years, median wealth is , with a 50% range of and a 90% range of .

Illustrative growth of $100 over 10 years at the optimal share. Model-implied 50% and 90% ranges assume constant inputs, continuous rebalancing, and no consumption, cash flows, fees, taxes, or inflation; they are not forecasts.

Comparative statics

In comparative statics, each panel varies one term while holding the others fixed. The middle band is an ordinary 0–100% allocation; below it the solution shorts the risky asset, and above it the solution uses leverage.

The highlighted points show the current assumptions, where π = .

Portfolio constraints

Merton's fraction is unconstrained. If borrowing and shorting are prohibited, both asset weights must remain between 0% and 100%, so the solution is clipped to that interval:

Adapted from “Merton's portfolio problem” on Wikipedia, licensed under CC BY-SA 4.0. Inspired by Bret Victor's “Explorable Explanations”. Scenarios combine illustrative August 2026 inputs: VT’s three-year σ was 12.4%; the 3.75% r approximates a continuously compounded equivalent of the 13-week Treasury bill’s 3.81% coupon-equivalent yield; and 5% μ is an expected-return assumption informed by Vanguard’s ten-year geometric-return forecasts. γ = 3 is a preference assumption, not a market observation. Source.