Tutorials › Stochastic Calculus › Merton Consumption and Investment with CRRA Preferences

Stochastic Control and the Hamilton-Jacobi-Bellman Equation · Tutorial 564 of 600

Merton Consumption and Investment with CRRA Preferences

Reduce the finite-horizon Merton consumption-investment HJB equation to a linear ODE and use its solution to obtain optimal feedback rules.

Advanced 11 min read

What You'll Learn

  • Formulate the finite-horizon wealth and utility problem with CRRA preferences.
  • Derive the HJB equation and optimize its portfolio and consumption terms.
  • Transform the value-function coefficient equation into a linear ODE.
  • Solve the coefficient equation, including the zero-parameter case.
  • Recover the consumption-to-wealth ratio and risky-asset allocation.
  • Check candidate policies against the HJB and a deterministic special case.

From Portfolio Choice to Consumption and Investment

The finite-horizon Merton problem asks how an investor should divide wealth between consumption now and investment for future returns. The portfolio choice determines exposure to risk; the consumption choice determines how much wealth is converted into utility before the terminal date. With constant market parameters and CRRA utility, the two decisions lead to a value function whose dependence on wealth is known in advance. The remaining unknown is a scalar function of time.

Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a Brownian motion \(B_t\). A riskless asset earns constant rate \(r\), and a risky asset has constant drift \(\mu\) and volatility \(\sigma>0\). Write \(\pi_t\) for the dollar amount invested in the risky asset, and \(c_t\) for the consumption rate. Under \(\mathbb{P}\), wealth \(X_t\) then satisfies

$$ dX_t=\big(rX_t+(\mu-r)\pi_t-c_t\big)\,dt+\sigma\pi_t\,dB_t,\qquad X_0=x>0. $$

Here \(rX_t+(\mu-r)\pi_t-c_t\) is the drift and \(\sigma\pi_t\) is the diffusion coefficient. Controls \(c_t>0\) and \(\pi_t\) are progressively measurable. The stochastic integral is an Ito integral with integrand \(\sigma\pi_t\); on each finite time interval where it is used as a square-integrable integral, assume \(\mathbb{E}\int_0^T\sigma^2\pi_t^2\,dt<\infty\). We consider controls for which wealth remains positive and the expected utility objective is well-defined. Detailed admissibility and terminal transversality checks are a separate issue.

Fix \(T>0\), a risk-aversion parameter \(0<\gamma<1\), and a terminal utility weight \(b>0\). The instantaneous utility is \(u(c)=c^{1-\gamma}/(1-\gamma)\), and terminal utility is \(bX_T^{1-\gamma}/(1-\gamma)\). The objective is

$$ \sup_{(c,\pi)}\mathbb{E}\left[\int_0^T\frac{c_t^{1-\gamma}}{1-\gamma}\,dt+ b\frac{X_T^{1-\gamma}}{1-\gamma}\right]. $$

The restriction \(0<\gamma<1\) keeps both utility terms positive on positive consumption and wealth. The logarithmic case \(\gamma=1\) has a different value-function form and is not included here.

The HJB Equation and the CRRA Ansatz

Let \(V(t,x)\) denote the value starting at time \(t\) with wealth \(x>0\). The terminal condition is \(V(T,x)=b x^{1-\gamma}/(1-\gamma)\). The dynamic programming principle gives the HJB equation

$$ 0=V_t+\sup_{c>0,\,\pi\in\mathbb{R}}\left\{ \frac{c^{1-\gamma}}{1-\gamma} +\big(rx+(\mu-r)\pi-c\big)V_x +\frac12\sigma^2\pi^2V_{xx} \right\}. $$

This equation applies to a classical value function with the derivatives displayed, subject to the dynamic programming and admissibility hypotheses. Its second-order term is the Ito correction: for a smooth function \(f(t,X_t)\), the \(dt\) contribution includes \(\tfrac12 f_{xx}\sigma^2\pi^2\), because \(dB_t\,dB_t=dt\), while \(dB_t\,dt=0\) and \(dt\,dt=0\).

Definition: The CRRA value-function ansatz is \(V(t,x)=A(t)x^{1-\gamma}/(1-\gamma)\), where \(A(t)>0\) is a time-dependent coefficient and \(A(T)=b\).

For this ansatz, the derivatives needed in the HJB equation are

$$ V_t=\frac{A'(t)x^{1-\gamma}}{1-\gamma},\qquad V_x=A(t)x^{-\gamma},\qquad V_{xx}=-\gamma A(t)x^{-\gamma-1}. $$

In particular, \(V_{xx}<0\), so the portfolio term is strictly concave in \(\pi\). The consumption utility is strictly concave in \(c\), and its marginal utility is \(c^{-\gamma}\). These facts give unique pointwise maximizers when \(A(t)>0\).

Optimizing the Two Controls

For the portfolio term, differentiate \((\mu-r)\pi V_x+\tfrac12\sigma^2\pi^2V_{xx}\) with respect to \(\pi\). Setting the derivative to zero gives \((\mu-r)V_x+\sigma^2\pi V_{xx}=0\), hence

$$ \pi^*(t,x)=\frac{\mu-r}{\gamma\sigma^2}x. $$

Substitution into the portfolio terms yields \(\frac{(\mu-r)^2}{2\gamma\sigma^2}A(t)x^{1-\gamma}\). Thus the risky-asset fraction is constant, while the amount invested scales with wealth.

For consumption, maximize \(c^{1-\gamma}/(1-\gamma)-cA(t)x^{-\gamma}\). The first-order condition is \(c^{-\gamma}=A(t)x^{-\gamma}\), so

$$ c^*(t,x)=A(t)^{-1/\gamma}x. $$

To evaluate the maximum consumption contribution, put \(q=(1-\gamma)/\gamma\). At the maximizer, the contribution is \(\frac{\gamma}{1-\gamma}A(t)^{-q}x^{1-\gamma}\). Inserting both maxima and the derivatives of \(V\) into the HJB equation, then equating the coefficient of \(x^{1-\gamma}\), gives the scalar equation below.

Theorem: For \(0<\gamma<1\), \(b>0\), and \(\sigma>0\), the CRRA ansatz satisfies the HJB equation with its terminal condition exactly when $$ A'(t)+(1-\gamma)\left(r+\frac{(\mu-r)^2}{2\gamma\sigma^2}\right)A(t) +\gamma A(t)^{-(1-\gamma)/\gamma}=0,\qquad A(T)=b. $$ When its admissibility and verification hypotheses hold, the associated feedback controls are \(\pi^*(t,x)=\frac{\mu-r}{\gamma\sigma^2}x\) and \(c^*(t,x)=A(t)^{-1/\gamma}x\).

Proof. The portfolio maximization follows from a strictly concave quadratic, since its second derivative is \(\sigma^2V_{xx}<0\). The consumption maximand has derivative \(c^{-\gamma}-A(t)x^{-\gamma}\), which decreases strictly from positive to negative as \(c\) runs from zero to infinity; its unique maximum is therefore the stated \(c^*\). Its value is \(\frac{\gamma}{1-\gamma}A^{-q}x^{1-\gamma}\). The portfolio maximum is \(\frac{(\mu-r)^2}{2\gamma\sigma^2}A x^{1-\gamma}\), and the riskless drift term is \(rA x^{1-\gamma}\). Consequently the HJB left side after maximization equals \(x^{1-\gamma}/(1-\gamma)\) times the left side of the displayed ODE. Since \(x>0\), this factor is nonzero, so the HJB holds for every \(x>0\) if and only if the ODE holds. The terminal condition follows by setting \(t=T\) in the ansatz. The control formulas are the unique pointwise maximizers just established. \(\square\)

Solving the Coefficient Equation

Define the constant

$$ \rho=\frac{1-\gamma}{\gamma}\left(r+\frac{(\mu-r)^2}{2\gamma\sigma^2}\right), \qquad y(t)=A(t)^{1/\gamma}. $$

The power transformation removes the nonlinear term. Since \(A=y^\gamma\), \(A'=\gamma y^{\gamma-1}y'\). Multiply the coefficient ODE by \(A^{1/\gamma-1}\); the derivative term becomes \(\gamma y'\), the term linear in \(A\) becomes \((1-\gamma)(r+(\mu-r)^2/(2\gamma\sigma^2))y\), and the final term becomes \(\gamma\). Dividing by \(\gamma\) gives \(y'+\rho y=-1\), with \(y(T)=b^{1/\gamma}\).

Result: The positive solution is $$ y(t)=b^{1/\gamma}e^{\rho(T-t)}+\int_t^T e^{\rho(s-t)}\,ds,\qquad A(t)=y(t)^\gamma. $$ If \(\rho\ne0\), the integral equals \(\big(e^{\rho(T-t)}-1\big)/\rho\); if \(\rho=0\), it equals \(T-t\). In either case \(y(t)>0\) on \(0\le t\le T\).

Proof. Multiply \(y'+\rho y=-1\) by \(e^{\rho t}\). The product rule gives \((e^{\rho t}y(t))'=-e^{\rho t}\). Integrating from \(t\) to \(T\) yields \(e^{\rho T}y(T)-e^{\rho t}y(t)=-\int_t^T e^{\rho s}\,ds\). Rearranging and using \(y(T)=b^{1/\gamma}\) gives the stated integral formula. Evaluating the integral gives the two cases, including \(\rho=0\) directly. The first term is strictly positive because \(b>0\), and the integral is nonnegative, so \(y(t)>0\). Differentiating the integral expression gives \(y'=-\rho y-1\), and at \(T\) it gives \(y(T)=b^{1/\gamma}\); thus the formula solves the transformed terminal-value problem. Since \(A=y^\gamma\), it solves the original coefficient equation as well. \(\square\)

The feedback consumption rate is particularly simple in this variable: \(c^*(t,x)=x/y(t)\). The value function can therefore be written \(V(t,x)=y(t)^\gamma x^{1-\gamma}/(1-\gamma)\). If the candidate satisfies the hypotheses of the standard Verification Theorem for Classical HJB Solutions, its HJB equation and terminal condition identify it as the value function and its feedback maximizers as optimal controls. That theorem supplies the required verification; solving the ODE alone does not establish admissibility or terminal transversality.

Worked Example: A Nonzero Coefficient Rate

Take \(T=2\), \(\gamma=\tfrac12\), \(b=1\), \(r=\tfrac1{10}\), \(\mu-r=\tfrac15\), and \(\sigma=\tfrac12\). Compute the feedback at \(t=1\).

First, \(\sigma^2=\tfrac14\), so \(2\gamma\sigma^2=2\cdot\tfrac12\cdot\tfrac14=\tfrac14\). Therefore \((\mu-r)^2/(2\gamma\sigma^2)=(\tfrac15)^2/(\tfrac14)=\tfrac4{25}\), and \(r+(\mu-r)^2/(2\gamma\sigma^2)=\tfrac1{10}+\tfrac4{25}=\tfrac{13}{50}\). As \((1-\gamma)/\gamma=1\), we have \(\rho=\tfrac{13}{50}\). Also \(b^{1/\gamma}=1\). The solution at \(t=1\) is

$$ y(1)=e^{13/50}+\int_1^2e^{(13/50)(s-1)}\,ds =e^{13/50}+\frac{50}{13}\left(e^{13/50}-1\right). $$

Thus \(c^*(1,x)=x/y(1)\) and \(A(1)=\sqrt{y(1)}\). The risky fraction is \((\mu-r)/(\gamma\sigma^2)=(\tfrac15)/(\tfrac12\cdot\tfrac14)=\tfrac85\), so \(\pi^*(1,x)=\tfrac85x\).

Check: Differentiating the general solution gives \(y'=-\rho y-1\); here this is \(y'=-(\tfrac{13}{50})y-1\), the transformed coefficient equation. At the terminal time the same formula gives \(y(2)=1\), hence \(A(2)=1=b\), as required.

Worked Example: The Zero-Rate Case

Let \(T=3\), \(\gamma=\tfrac12\), \(b=4\), \(r=0\), \(\mu-r=0\), and \(\sigma=1\). Find the coefficient and consumption ratio at \(t=1\).

The investment term in \(\rho\) is zero because \(\mu-r=0\), and \(r=0\), so \(\rho=0\). The terminal value for \(y\) is \(b^{1/\gamma}=4^2=16\). The zero-rate formula gives \(y(t)=16+3-t\), hence \(y(1)=16+3-1=18\). Therefore \(A(1)=18^{1/2}=3\sqrt{2}\), and \(c^*(1,x)/x=1/18\). The risky fraction is zero because its numerator \(\mu-r\) is zero.

Check: The coefficient equation for \(y\) is \(y'=-1\), and the computed function \(16+3-t\) has derivative \(-1\). At \(t=3\), it gives \(y(3)=16\), so \(A(3)=16^{1/2}=4=b\).

A Deterministic Check of the Value

Worked Example: Constant Consumption with No Risk Premium

Take \(T=1\), \(\gamma=\tfrac12\), \(b=1\), \(r=0\), \(\mu-r=0\), and \(\sigma=1\). Starting from \(X_0=x_0>0\), compute the feedback wealth path and objective.

Here \(\rho=0\) and \(b^{1/\gamma}=1\), so \(y(t)=1+(1-t)=2-t\). The risky allocation is zero and consumption is \(c^*(t,X_t)=X_t/(2-t)\). The wealth equation is therefore the ordinary differential equation \(dX_t/dt=-X_t/(2-t)\). The path \(X_t=x_0(2-t)/2\) satisfies the initial condition, since \(X_0=x_0\), and has derivative \(-x_0/2\), equal to \(-X_t/(2-t)\). Thus \(c_t=x_0/2\) throughout \([0,1]\), and \(X_1=x_0/2\).

For \(\gamma=\tfrac12\), utility is \(u(z)=2\sqrt{z}\). The running utility integral is \(\int_0^1 2\sqrt{x_0/2}\,dt=2\sqrt{x_0/2}\). Terminal utility is \(2\sqrt{x_0/2}\), since \(b=1\). Their sum is \(4\sqrt{x_0/2}=2\sqrt{2x_0}\).

Check: The candidate value at the initial time is \(V(0,x_0)=A(0)x_0^{1/2}/(1/2)\). Since \(A(0)=y(0)^{1/2}=\sqrt{2}\), this equals \(2\sqrt{2x_0}\), exactly the objective computed along the feedback path.

Interpretation and a Common Pitfall

The function \(y\) combines the terminal bequest weight with the horizon remaining. Its terminal value is fixed by \(b\); moving backward in time adds the integral term. The consumption-to-wealth ratio \(1/y(t)\) is therefore time-dependent even though the market parameters and preferences are constant. The portfolio fraction, by contrast, is constant under these assumptions and agrees with the CRRA portfolio rule.

Common mistake: dropping the Ito correction. If one replaces the HJB second-order term by an ordinary chain rule, the portfolio contribution \(\tfrac12\sigma^2\pi^2V_{xx}\) disappears. The resulting portfolio objective is linear in \(\pi\), so when \(\mu\ne r\) its supremum over unrestricted \(\pi\in\mathbb{R}\) is unbounded. The correction is not optional: it represents the quadratic variation of the Brownian-driven wealth and makes the portfolio maximization strictly concave.

A second error is to treat the coefficient ODE as a proof of optimality by itself. It proves that the ansatz solves the HJB equation, but a verification theorem also requires its own integrability, admissibility, and terminal conditions. The candidate formulas identify the controls to check; they do not remove those requirements.

Check Your Understanding

Use the HJB equation and the transformed coefficient equation to answer the following.

  1. Why does \(V_{xx}<0\) imply that the portfolio maximization has a unique finite maximizer when \(\sigma>0\)?
  2. For \(\rho\ne0\), differentiate \(\big(e^{\rho(T-t)}-1\big)/\rho\) with respect to \(t\).
  3. How does the terminal condition \(A(T)=b\) translate into a condition on \(y(T)\)?
  4. In the zero-rate example, what would the consumption-to-wealth ratio be at \(t=2\), and why is it finite?
  5. Which verification requirements are not established merely by solving the scalar ODE?