Book 6D

© 2026 NeckPinch · www.neckpinch.com · All rights reserved.

Course 6Book 6D: Diffusions, Finance and ComputationChapter 8

Stochastic Control and the HJB Equation

Dynamic programming, the Hamilton–Jacobi–Bellman equation, verification and Merton’s portfolio problem.

30 min read · Updated Oct 20, 2026

Read with Øksendal, Stochastic Differential Equations, chapter 11 (application to stochastic control: the HJB equation, the verification theorem and the portfolio problem), and Evans, Partial Differential Equations, section 10.3 (the deterministic case, already met in 6C.9 Hamilton–Jacobi Equations and Viscosity Solutions). Fleming and Soner, Controlled Markov Processes and Viscosity Solutions, and Pham, Continuous-time Stochastic Control and Optimization with Financial Applications, are the references; Merton, "Lifetime portfolio selection under uncertainty: the continuous-time case" (Rev. Econ. Stat. 51, 1969), is the source of the portfolio problem. This chapter derives the HJB equation, proves the verification theorem, solves Merton's problem and the linear-quadratic regulator, and derives the Kelly criterion; the dynamic programming principle and the viscosity characterisation of the value function are stated. The portfolio results are mathematics about a model, not investment advice.

In this chapter · 8 sections
  1. 8.1How much to bet
  2. 8.2Controlled diffusions and dynamic programming
  3. 8.3The verification theorem
  4. 8.4Merton's portfolio problem
  5. 8.5The Kelly criterion
  6. 8.6The linear-quadratic regulator
  7. 8.7History
  8. 8.8Exercises
  9. ↗Free resources

In 6D.6 Black–Scholes the investor's task was to hedge: hold whatever position replicates a contract. Here the task is to choose: how much to invest, how fast to steer, how much to consume, to make some expected reward as large as possible. When the system is a diffusion and the choice can be revised continuously, the answer is governed by a nonlinear second-order PDE, the Hamilton–Jacobi–Bellman equation

∂tu+sup⁡a∈A{b(x,a)⋅∇u+12tr⁡(σσT(x,a)D2u)+f(x,a)}=0,\partial_tu + \sup_{a\in A}\Big\{b(x, a)\cdot\nabla u + \frac12\operatorname{tr}\big(\sigma\sigma^T(x, a)D^2u\big) + f(x, a)\Big\} = 0,

the stochastic version of the first-order HJB equation of 6C.9 Hamilton–Jacobi Equations and Viscosity Solutions. The supremum over controls of a family of linear operators makes it a fully nonlinear equation of the Bellman type of 6C.10 Fully Nonlinear Equations and Monge–Ampère.

The strategy is always the same. Guess or compute a solution of the HJB equation; read off the optimal control as the maximiser in the supremum, a feedback rule depending on the current state; and confirm, by a verification theorem proved with Itô's formula, that the candidate really is optimal. We carry this out for Robert Merton's portfolio problem, whose answer, a constant fraction of wealth in the risky asset, is one of the classical results of financial economics, and for the linear-quadratic regulator of engineering.

By the end of this chapter you will be able to:

  • set up a stochastic control problem, state the dynamic programming principle, and derive the HJB equation from it with Itô's formula;
  • prove the verification theorem;
  • solve Merton's problem for power utility, and derive the Kelly criterion as the logarithmic case;
  • solve the linear-quadratic regulator through a Riccati equation;
  • explain why value functions are in general viscosity solutions, and connect the Li–Yau Harnack inequality to an optimal control problem.

How much to bet

In the world Model Kelly, Thorp and Merton

In 1956 John Kelly, an engineer at Bell Labs, asked how a gambler with an edge should size repeated bets. Maximising expected wealth says "bet everything every time", which ruins the gambler almost surely. Kelly proposed maximising the expected logarithm of wealth, equivalently the long-run growth rate, and found that the optimal fraction for a bet won with probability pp at even odds is 2p−12p - 1. The mathematician Edward Thorp applied the criterion to blackjack, where card counting gives a small edge, published Beat the Dealer in 1962, and later used the same ideas in investment management.

In 1969 Robert Merton solved the continuous-time version for an investor choosing between a bank account and a stock following geometric Brownian motion, for a whole family of attitudes to risk. His answer is a constant fraction of wealth in the stock, μ−rγσ2\frac{\mu - r}{\gamma\sigma^2}, with γ\gamma the investor's risk aversion; the Kelly criterion is γ=1\gamma = 1 (Theorem 8.2). The formula shows how the optimal exposure falls with volatility and rises with the expected excess return. In practice the expected return is very hard to estimate, and errors in it pass straight into the optimal fraction, which is one reason why practitioners usually invest less than the formula says. The formula is a statement about a model, and this chapter treats it as mathematics.

Controlled diffusions and dynamic programming

Let AA be a set of control values (a subset of some Rk\mathbb{R}^k). A control is an adapted process αs∈A\alpha_s \in A, and the controlled state follows

dXs=b(Xs,αs) ds+σ(Xs,αs) dBs,Xt=x,dX_s = b(X_s, \alpha_s)\,ds + \sigma(X_s, \alpha_s)\,dB_s, \qquad X_t = x,

with bb, σ\sigma Lipschitz in xx uniformly in aa, so that the SDE has a unique solution for each admissible control (6D.3 Stochastic Differential Equations and Feynman–Kac). The controller collects a running reward f(Xs,αs)f(X_s, \alpha_s) and a terminal reward g(XT)g(X_T), and the value function is

u(t,x)=sup⁡αE[∫tTf(Xs,αs) ds+g(XT)].u(t, x) = \sup_\alpha\mathbb{E}\Big[\int_t^Tf(X_s, \alpha_s)\,ds + g(X_T)\Big].

(Minimising a cost is the same with f,gf, g replaced by −f,−g-f, -g.)

The dynamic programming principle (statement; Fleming and Soner, chapter IV, and Pham, section 3.3): for t≤t+h≤Tt \leq t + h \leq T,

u(t,x)=sup⁡αE[∫tt+hf(Xs,αs) ds+u(t+h,Xt+h)].u(t, x) = \sup_\alpha\mathbb{E}\Big[\int_t^{t+h}f(X_s, \alpha_s)\,ds + u(t + h, X_{t+h})\Big].

It is Bellman's principle of optimality, and its proof is the same as in the deterministic case (6C.9 Hamilton–Jacobi Equations and Viscosity Solutions) except for a measurable selection of nearly optimal controls from each intermediate state, which is technical.

Formal derivation of HJB. Suppose uu is C1,2C^{1,2}. Use the constant control aa on [t,t+h][t, t + h] in the principle, and Itô's formula (6D.2 Martingales and the Itô Integral) for u(s,Xs)u(s, X_s):

u(t,x)≥E[∫tt+hf(Xs,a) ds+u(t,x)+∫tt+h(∂su+Lau)(s,Xs) ds],u(t, x) \geq \mathbb{E}\Big[\int_t^{t+h}f(X_s, a)\,ds + u(t, x) + \int_t^{t+h}\big(\partial_su + \mathcal L^au\big)(s, X_s)\,ds\Big],

with La=b(x,a)⋅∇+12tr⁡(σσT(x,a)D2)\mathcal L^a = b(x, a)\cdot\nabla + \frac12\operatorname{tr}\big(\sigma\sigma^T(x, a)D^2\big) the generator for the fixed control aa (the stochastic integral has mean zero). Divide by hh and let h→0h \to 0: 0≥∂tu+Lau+f(x,a)0 \geq \partial_tu + \mathcal L^au + f(x, a) for every aa. For an optimal (or nearly optimal) control the inequality becomes an equality in the limit. So

∂tu+sup⁡a∈A{Lau+f(x,a)}=0,u(T,x)=g(x).(HJB)\partial_tu + \sup_{a\in A}\big\{\mathcal L^au + f(x, a)\big\} = 0, \qquad u(T, x) = g(x). \tag{HJB}

The equation is degenerate elliptic in the sense of 6C.9 Hamilton–Jacobi Equations and Viscosity Solutions, and parabolic backwards in time.

The verification theorem

Theorem 8.1 Verification

Let w∈C1,2([0,T)×Rn)∩C([0,T]×Rn)w \in C^{1,2}([0, T)\times\mathbb{R}^n)\cap C([0, T]\times\mathbb{R}^n) satisfy (HJB) with w(T)=gw(T) = g. Assume that for every admissible control the stochastic integral ∫∇wTσ dB\int\nabla w^T\sigma\,dB arising below is a martingale (for instance, σT∇w\sigma^T\nabla w bounded), and that the integrability needed to take expectations holds. Then:

  1. w(t,x)≥u(t,x)w(t, x) \geq u(t, x);
  2. if there is a measurable a∗(t,x)a^*(t, x) attaining the supremum in (HJB) at every point, such that the SDE with the feedback control αs∗=a∗(s,Xs)\alpha^*_s = a^*(s, X_s) has a solution, then w=uw = u and α∗\alpha^* is optimal.

Proof. Fix (t,x)(t, x) and an admissible control α\alpha with state XX. By Itô's formula,

g(XT)=w(T,XT)=w(t,x)+∫tT(∂sw+Lαsw)(s,Xs) ds+∫tT∇wTσ(Xs,αs) dBs.g(X_T) = w(T, X_T) = w(t, x) + \int_t^T\big(\partial_sw + \mathcal L^{\alpha_s}w\big)(s, X_s)\,ds + \int_t^T\nabla w^T\sigma(X_s, \alpha_s)\,dB_s.

By (HJB), ∂sw+Lαsw≤−f(Xs,αs)\partial_sw + \mathcal L^{\alpha_s}w \leq -f(X_s, \alpha_s) at every point. Taking expectations (the stochastic integral has mean zero),

E[∫tTf(Xs,αs) ds+g(XT)]≤w(t,x).\mathbb{E}\Big[\int_t^Tf(X_s, \alpha_s)\,ds + g(X_T)\Big] \leq w(t, x).

Taking the supremum over α\alpha gives (1). For the feedback control α∗\alpha^* the inequality ∂sw+Lα∗w≤−f\partial_sw + \mathcal L^{\alpha^*}w \leq -f is an equality, so the reward of α∗\alpha^* equals w(t,x)w(t, x). Hence u(t,x)≥w(t,x)u(t, x) \geq w(t, x), so u=wu = w and α∗\alpha^* attains the supremum.

The theorem needs a smooth solution of (HJB). When one exists (as in the examples below), it settles the problem completely and produces the optimal control in feedback form, which is how controls are implemented: measure the state, apply a∗(t,x)a^*(t, x). When the value function is not smooth, the dynamic programming principle still shows that it is a viscosity solution of (HJB), and comparison principles of the Crandall–Ishii–Lions type (6C.9 Hamilton–Jacobi Equations and Viscosity Solutions) show it is the unique one (statement; Fleming and Soner, chapters IV–V). Pierre-Louis Lions established this framework for stochastic control in 1983. It is the reason value functions are well defined and computable (by monotone finite difference schemes, which converge to viscosity solutions by a theorem of Guy Barles and Panagiotis Souganidis, 1991) even when they have kinks.

Merton's portfolio problem

An investor has wealth WtW_t, holds the amount πt\pi_t in a stock with dS=μS dt+σS dBdS = \mu S\,dt + \sigma S\,dB and the rest in a bank account at rate rr, with μ>r\mu > r. Since πt\pi_t in stock earns πtdSS\pi_t\frac{dS}{S} and Wt−πtW_t - \pi_t in the bank earns r(Wt−πt) dtr(W_t - \pi_t)\,dt,

dWt=(rWt+πt(μ−r))dt+πtσ dBt.dW_t = \big(rW_t + \pi_t(\mu - r)\big)dt + \pi_t\sigma\,dB_t.

The investor maximises expected utility of terminal wealth, E U(WT)\mathbb{E}\,U(W_T), with the power utility

U(w)=w1−γ1−γ(γ>0, γ≠1),U(w)=log⁡w(γ=1).U(w) = \frac{w^{1-\gamma}}{1 - \gamma} \quad (\gamma > 0,\ \gamma \neq 1), \qquad U(w) = \log w \quad (\gamma = 1).

Concavity of UU expresses risk aversion: a certain amount is preferred to a gamble with the same mean. The parameter γ=−wU′′(w)U′(w)\gamma = -\frac{wU''(w)}{U'(w)} is the relative risk aversion, constant for this family. Write θ=μ−rσ\theta = \frac{\mu - r}{\sigma} for the market price of risk (6D.6 Black–Scholes).

The HJB equation for u(t,w)u(t, w) is

∂tu+sup⁡π{(rw+π(μ−r))∂wu+12π2σ2∂wwu}=0,u(T,w)=U(w).\partial_tu + \sup_\pi\Big\{\big(rw + \pi(\mu - r)\big)\partial_wu + \frac12\pi^2\sigma^2\partial_{ww}u\Big\} = 0, \qquad u(T, w) = U(w).

If ∂wwu<0\partial_{ww}u < 0 (concavity in ww), the supremum of the quadratic in π\pi is attained at

π∗=−(μ−r) ∂wuσ2 ∂wwu,and the equation becomes∂tu+rw ∂wu−(μ−r)22σ2(∂wu)2∂wwu=0.\pi^* = -\frac{(\mu - r)\,\partial_wu}{\sigma^2\,\partial_{ww}u}, \qquad\text{and the equation becomes}\qquad \partial_tu + rw\,\partial_wu - \frac{(\mu - r)^2}{2\sigma^2}\frac{(\partial_wu)^2}{\partial_{ww}u} = 0.
Theorem 8.2 Merton's portfolio rule

For power utility with γ≠1\gamma \neq 1, the value function is

u(t,w)=e(1−γ)ρ(T−t) w1−γ1−γ,ρ=r+θ22γ,u(t, w) = e^{(1-\gamma)\rho(T-t)}\,\frac{w^{1-\gamma}}{1 - \gamma}, \qquad \rho = r + \frac{\theta^2}{2\gamma},

and the optimal strategy invests the constant fraction

πt∗Wt=μ−rγσ2\frac{\pi^*_t}{W_t} = \frac{\mu - r}{\gamma\sigma^2}

of current wealth in the stock. For γ=1\gamma = 1 (logarithmic utility) the optimal fraction is μ−rσ2\frac{\mu - r}{\sigma^2} and u=log⁡w+(r+θ22)(T−t)u = \log w + \big(r + \frac{\theta^2}{2}\big)(T - t).

Proof. Solving HJB. Try u=ϕ(t)w1−γ1−γu = \phi(t)\frac{w^{1-\gamma}}{1-\gamma} with ϕ>0\phi > 0. Then ∂wu=ϕw−γ\partial_wu = \phi w^{-\gamma}, ∂wwu=−γϕw−γ−1<0\partial_{ww}u = -\gamma\phi w^{-\gamma-1} < 0, and π∗=μ−rγσ2w\pi^* = \frac{\mu - r}{\gamma\sigma^2}w. Substituting,

ϕ′w1−γ1−γ+rϕw1−γ+(μ−r)22σ2γϕw1−γ=0,that isϕ′+(1−γ)(r+θ22γ)ϕ=0,\phi'\frac{w^{1-\gamma}}{1 - \gamma} + r\phi w^{1-\gamma} + \frac{(\mu - r)^2}{2\sigma^2\gamma}\phi w^{1-\gamma} = 0, \qquad\text{that is}\qquad \phi' + (1 - \gamma)\Big(r + \frac{\theta^2}{2\gamma}\Big)\phi = 0,

with ϕ(T)=1\phi(T) = 1. So ϕ(t)=e(1−γ)ρ(T−t)\phi(t) = e^{(1-\gamma)\rho(T-t)}.

Verification. With the constant fraction c=μ−rγσ2c = \frac{\mu - r}{\gamma\sigma^2}, wealth is a geometric Brownian motion, dW=W((r+c(μ−r)) dt+cσ dB)dW = W\big((r + c(\mu - r))\,dt + c\sigma\,dB\big), with all moments finite, so the feedback SDE has a solution. For a general admissible strategy, apply the argument of Theorem 8.1 to w(t,Wt)=u(t,Wt)w(t, W_t) = u(t, W_t): the drift is ≤0\leq 0 for every π\pi (the quadratic in π\pi has maximum 00 by HJB), so u(t,Wt)u(t, W_t) is a local supermartingale, and a supermartingale under the admissibility condition (Merton's admissible strategies keep W>0W > 0 and satisfy an integrability condition; Pham, section 3.6). Hence EU(WT)≤u(0,W0)\mathbb{E}U(W_T) \leq u(0, W_0), with equality for the constant-fraction strategy, for which u(t,Wt)u(t, W_t) is a true martingale (it is a geometric Brownian motion with zero drift, by the HJB equation). The case γ=1\gamma = 1 is the same with u=log⁡w+ψ(t)u = \log w + \psi(t) (Exercise 8.3).

Three features of the answer deserve comment. The fraction is constant: it does not depend on wealth or on the horizon, a consequence of the scale invariance of power utility and of the constant coefficients (Paul Samuelson proved the discrete-time analogue in 1969). It is myopic: the investor behaves as if the horizon were one instant away. And it is the mean–variance trade-off: the instantaneous excess return of the portfolio is c(μ−r)c(\mu - r) and its variance c2σ2c^2\sigma^2, and c∗c^* maximises c(μ−r)−γ2c2σ2c(\mu - r) - \frac\gamma2c^2\sigma^2. With μ=0.07\mu = 0.07, r=0.02r = 0.02, σ=0.2\sigma = 0.2 and γ=2\gamma = 2, the fraction is 0.052×0.04=0.625\frac{0.05}{2\times0.04} = 0.625.

The Kelly criterion

For γ=1\gamma = 1, the investor maximises Elog⁡WT\mathbb{E}\log W_T. For a constant fraction cc, by Itô's formula,

dlog⁡Wt=(r+c(μ−r)−12c2σ2)dt+cσ dBt,d\log W_t = \Big(r + c(\mu - r) - \frac12c^2\sigma^2\Big)dt + c\sigma\,dB_t,

so 1Tlog⁡WTW0→g(c)=r+c(μ−r)−12c2σ2\frac1T\log\frac{W_T}{W_0} \to g(c) = r + c(\mu - r) - \frac12c^2\sigma^2 almost surely as T→∞T \to \infty (the Brownian term grows like T\sqrt T). The long-run growth rate g(c)g(c) is maximised at the Kelly fraction cK=μ−rσ2c_K = \frac{\mu - r}{\sigma^2}, with g(cK)=r+θ22g(c_K) = r + \frac{\theta^2}{2}. Over long horizons, the Kelly strategy's wealth eventually exceeds that of any other constant-fraction strategy, almost surely (Leo Breiman proved a general version in 1961).

The parabola gg shows the danger of overbetting: g(2cK)=rg(2c_K) = r (Exercise 8.4), so betting twice the Kelly fraction gives no more growth than the bank account while taking large risks, and beyond 2cK2c_K the growth rate is below rr and eventually negative. The Itô correction −12c2σ2-\frac12c^2\sigma^2 is the volatility drag of 6D.2 Martingales and the Itô Integral (geometric Brownian motion there): it is why the median outcome of a leveraged position can lose money even when its mean grows.

The linear-quadratic regulator

In engineering, the standard control problem steers a linear system near a target with quadratic costs. In one dimension, with dX=α dt+σ dBdX = \alpha\,dt + \sigma\,dB and the cost

E[∫tT(qXs2+αs2)ds+kXT2]\mathbb{E}\Big[\int_t^T\big(qX_s^2 + \alpha_s^2\big)ds + kX_T^2\Big]

to be minimised (q,k≥0q, k \geq 0), the HJB equation is ∂tu+inf⁡a{a ∂xu+qx2+a2}+12σ2∂xxu=0\partial_tu + \inf_a\{a\,\partial_xu + qx^2 + a^2\} + \frac12\sigma^2\partial_{xx}u = 0, u(T)=kx2u(T) = kx^2. The infimum is at a∗=−12∂xua^* = -\frac12\partial_xu, and the ansatz u=p(t)x2+c(t)u = p(t)x^2 + c(t) gives the Riccati equation

p′=p2−q,p(T)=k,c′=−σ2p,c(T)=0,p' = p^2 - q, \quad p(T) = k, \qquad c' = -\sigma^2p, \quad c(T) = 0,

with optimal feedback α∗=−p(t)X\alpha^* = -p(t)X (Exercise 8.6). In nn dimensions with dX=(AX+Bα) dt+Σ dWdX = (AX + B\alpha)\,dt + \Sigma\,dW, costs XTQX+αTRαX^TQX + \alpha^TR\alpha, the same calculation gives the matrix Riccati equation −P′=ATP+PA−PBR−1BTP+Q-P' = A^TP + PA - PBR^{-1}B^TP + Q and the feedback α∗=−R−1BTPX\alpha^* = -R^{-1}B^TPX. Rudolf Kálmán's work on this problem and on filtering (1960) became standard in aerospace guidance and control engineering; the noise affects the cost but not the optimal feedback, a form of certainty equivalence.

Where this goes Control, Harnack and Perelman

The Li–Yau Harnack inequality (6A.12 Entropy, Information and Diffusion) is obtained from a differential inequality by integrating along a path and optimising over paths, a deterministic control problem whose value is the Gaussian exponent ∣x−y∣24t\frac{|x - y|^2}{4t} (Exercise 8.8). Hamilton's Harnack inequality for the Ricci flow is used the same way (11B.2 Ancient Solutions and the Harnack Inequality), and Perelman's L\mathcal L-length (12A.5 Reduced Distance and Reduced Volume) builds the optimisation into a definition: the reduced distance is the value function of a control problem on space-time, and its Hamilton–Jacobi inequalities (6C.9 Hamilton–Jacobi Equations and Viscosity Solutions) give the monotonicity of the reduced volume.

History

Richard Bellman formulated dynamic programming in the 1950s, and Lev Pontryagin's school developed the maximum principle for deterministic control at the same time. Wendell Fleming and others developed stochastic control in the 1960s, and Robert Merton solved the portfolio problem in 1969 (with consumption in 1971). Rudolf Kálmán's linear-quadratic theory dates from 1960, John Kelly's criterion from 1956, and Leo Breiman's optimality theorem from 1961. Pierre-Louis Lions proved in 1983 that value functions of stochastic control problems are viscosity solutions of the HJB equation, and Barles and Souganidis's convergence theorem for numerical schemes dates from 1991.

Recall Where we stand

For a controlled diffusion dX=b(X,α) dt+σ(X,α) dBdX = b(X, \alpha)\,dt + \sigma(X, \alpha)\,dB with rewards ff and gg, dynamic programming and Itô's formula give the HJB equation ∂tu+sup⁡a{Lau+f}=0\partial_tu + \sup_a\{\mathcal L^au + f\} = 0, u(T)=gu(T) = g. The verification theorem: a smooth solution dominates every strategy's reward, and equals the reward of the feedback control that attains the supremum. Merton: with power utility, invest the constant fraction μ−rγσ2\frac{\mu - r}{\gamma\sigma^2}; for log utility this is the Kelly fraction μ−rσ2\frac{\mu - r}{\sigma^2}, maximising the growth rate r+c(μ−r)−12c2σ2r + c(\mu - r) - \frac12c^2\sigma^2, and twice Kelly grows only at rr. The linear-quadratic regulator reduces to a Riccati equation with linear feedback. When value functions are not smooth they are the unique viscosity solutions. 6D.9 Finite Difference Methods turns to computation: finite difference schemes for parabolic equations, their stability and convergence.

Exercises

Exercise 8.3 Logarithmic utility

For U=log⁡wU = \log w, try u(t,w)=log⁡w+ψ(t)u(t, w) = \log w + \psi(t) in the HJB equation. Show that π∗=μ−rσ2w\pi^* = \frac{\mu - r}{\sigma^2}w and ψ(t)=(r+θ22)(T−t)\psi(t) = \big(r + \frac{\theta^2}{2}\big)(T - t).

Solution

∂wu=1w\partial_wu = \frac1w, ∂wwu=−1w2\partial_{ww}u = -\frac{1}{w^2}, so π∗=(μ−r)/wσ2/w2=μ−rσ2w\pi^* = \frac{(\mu - r)/w}{\sigma^2/w^2} = \frac{\mu - r}{\sigma^2}w. The equation becomes ψ′+r+(μ−r)22σ2=0\psi' + r + \frac{(\mu - r)^2}{2\sigma^2} = 0 (since −(μ−r)22σ2w−2−w−2=θ22-\frac{(\mu - r)^2}{2\sigma^2}\frac{w^{-2}}{-w^{-2}} = \frac{\theta^2}{2}), with ψ(T)=0\psi(T) = 0.

Exercise 8.4 Growth rates

With μ=0.07\mu = 0.07, r=0.02r = 0.02, σ=0.2\sigma = 0.2: (a) compute the Kelly fraction and the optimal growth rate. (b) Compute g(c)g(c) for c=12cKc = \frac12c_K and c=2cKc = 2c_K, and show in general that g(2cK)=rg(2c_K) = r and g(12cK)=r+38θ2g(\frac12c_K) = r + \frac38\theta^2.

Solution

(a) cK=0.050.04=1.25c_K = \frac{0.05}{0.04} = 1.25 (that is, 125%125\% of wealth, borrowing the rest), θ=0.25\theta = 0.25, g(cK)=0.02+0.03125=0.05125g(c_K) = 0.02 + 0.03125 = 0.05125. (b) g(c)=r+cθσ−12c2σ2g(c) = r + c\theta\sigma - \frac12c^2\sigma^2; with c=λcK=λθσc = \lambda c_K = \lambda\frac\theta\sigma, g=r+θ2(λ−λ22)g = r + \theta^2(\lambda - \frac{\lambda^2}{2}). For λ=2\lambda = 2: rr. For λ=12\lambda = \frac12: r+38θ2=0.02+0.0234=0.0434r + \frac38\theta^2 = 0.02 + 0.0234 = 0.0434. Half-Kelly keeps three quarters of the excess growth with half the volatility.

Exercise 8.5 Risk aversion and the certainty equivalent

For γ=2\gamma = 2 and the parameters of Exercise 8.4, compute the Merton fraction and ρ=r+θ22γ\rho = r + \frac{\theta^2}{2\gamma}. The certainty equivalent growth rate is the riskless rate that would give the same expected utility; show that it equals ρ\rho, using u(0,w)=U(weρT)u(0, w) = U(we^{\rho T}).

Solution

Fraction 0.052×0.04=0.625\frac{0.05}{2\times0.04} = 0.625; ρ=0.02+0.06254=0.0356\rho = 0.02 + \frac{0.0625}{4} = 0.0356. Indeed U(weρT)=w1−γe(1−γ)ρT1−γ=u(0,w)U(we^{\rho T}) = \frac{w^{1-\gamma}e^{(1-\gamma)\rho T}}{1 - \gamma} = u(0, w).

Exercise 8.6 The scalar Riccati equation

(a) Derive p′=p2−qp' = p^2 - q and c′=−σ2pc' = -\sigma^2p from the HJB equation for the linear-quadratic problem in the text. (b) Show that if k=qk = \sqrt q, then p≡qp \equiv \sqrt q, and the optimal control is the constant-gain feedback α∗=−q X\alpha^* = -\sqrt q\,X. (c) Under this feedback, XX is an Ornstein–Uhlenbeck process (6D.3 Stochastic Differential Equations and Feynman–Kac); find its stationary variance.

Solution

(a) With u=px2+cu = px^2 + c: ∂xu=2px\partial_xu = 2px, a∗=−pxa^* = -px, inf⁡a{⋯ }=−p2x2+qx2\inf_a\{\cdots\} = -p^2x^2 + qx^2, 12σ2∂xxu=σ2p\frac12\sigma^2\partial_{xx}u = \sigma^2p. So p′x2+c′−p2x2+qx2+σ2p=0p'x^2 + c' - p^2x^2 + qx^2 + \sigma^2p = 0 for all xx. (b) p′=q−q=0p' = q - q = 0 with p(T)=qp(T) = \sqrt q. (c) dX=−qX dt+σ dBdX = -\sqrt qX\,dt + \sigma\,dB, with stationary variance σ22q\frac{\sigma^2}{2\sqrt q}.

Exercise 8.7 A bang-bang control

Steer dX=α dt+dBdX = \alpha\,dt + dB with ∣α∣≤1|\alpha| \leq 1 to minimise E XT2\mathbb{E}\,X_T^2. Write the HJB equation and show that any smooth solution with ∂xu\partial_xu having the sign of xx gives the optimal feedback α∗=−sign⁡(X)\alpha^* = -\operatorname{sign}(X): push towards the origin at full strength.

Solution

For minimisation, ∂tu+inf⁡∣a∣≤1{a ∂xu}+12∂xxu=0\partial_tu + \inf_{|a|\leq1}\{a\,\partial_xu\} + \frac12\partial_{xx}u = 0, i.e. ∂tu−∣∂xu∣+12∂xxu=0\partial_tu - |\partial_xu| + \frac12\partial_{xx}u = 0, u(T)=x2u(T) = x^2. The infimum of the linear function a ∂xua\,\partial_xu over [−1,1][-1, 1] is at a=−sign⁡(∂xu)a = -\operatorname{sign}(\partial_xu), which is −sign⁡(x)-\operatorname{sign}(x) when ∂xu\partial_xu has the sign of xx (as it does by symmetry and monotonicity). Optimal controls of linear-in-control problems with bounded controls take extreme values: "bang-bang".

Exercise 8.8 Rehearsal: the Li–Yau Harnack inequality as a control problem

Let u>0u > 0 solve ut=Δuu_t = \Delta u on Rn\mathbb{R}^n and satisfy the Li–Yau inequality ∂tlog⁡u≥∣∇log⁡u∣2−n2t\partial_t\log u \geq |\nabla\log u|^2 - \frac{n}{2t} (6A.12 Entropy, Information and Diffusion). (a) For a path γ:[t1,t2]→Rn\gamma : [t_1, t_2] \to \mathbb{R}^n, show that ddtlog⁡u(γ(t),t)≥−∣γ˙∣24−n2t\frac{d}{dt}\log u(\gamma(t), t) \geq -\frac{|\dot\gamma|^2}{4} - \frac{n}{2t}. (Use ∣v∣2+v⋅w≥−∣w∣24|v|^2 + v\cdot w \geq -\frac{|w|^2}{4}.) (b) Integrate and optimise over paths from x1x_1 to x2x_2 to get

u(x2,t2)≥u(x1,t1)(t1t2)n/2exp⁡(−∣x2−x1∣24(t2−t1)).u(x_2, t_2) \geq u(x_1, t_1)\Big(\frac{t_1}{t_2}\Big)^{n/2}\exp\Big(-\frac{|x_2 - x_1|^2}{4(t_2 - t_1)}\Big).

(c) Identify the control problem: the control is γ˙\dot\gamma, the running cost ∣γ˙∣24\frac{|\dot\gamma|^2}{4}, and the value is the exponent. Hamilton's Harnack inequality for Ricci flow and Perelman's L\mathcal L-length are obtained by the same optimisation with curvature terms added to the cost (11B.2 Ancient Solutions and the Harnack Inequality, 12A.5 Reduced Distance and Reduced Volume).

Solution

(a) ddtlog⁡u(γ,t)=∂tlog⁡u+∇log⁡u⋅γ˙≥∣∇log⁡u∣2+∇log⁡u⋅γ˙−n2t≥−∣γ˙∣24−n2t\frac{d}{dt}\log u(\gamma, t) = \partial_t\log u + \nabla\log u\cdot\dot\gamma \geq |\nabla\log u|^2 + \nabla\log u\cdot\dot\gamma - \frac{n}{2t} \geq -\frac{|\dot\gamma|^2}{4} - \frac{n}{2t}. (b) Integrating, log⁡u(x2,t2)u(x1,t1)≥−14∫t1t2∣γ˙∣2 dt−n2log⁡t2t1\log\frac{u(x_2, t_2)}{u(x_1, t_1)} \geq -\frac14\int_{t_1}^{t_2}|\dot\gamma|^2\,dt - \frac n2\log\frac{t_2}{t_1}. By Cauchy–Schwarz, ∫∣γ˙∣2≥∣x2−x1∣2t2−t1\int|\dot\gamma|^2 \geq \frac{|x_2 - x_1|^2}{t_2 - t_1}, with equality for the straight line at constant speed, the optimal control. (c) As stated: the minimal cost ∣x2−x1∣24(t2−t1)\frac{|x_2 - x_1|^2}{4(t_2 - t_1)} is the value function of a deterministic control problem, the Hopf–Lax value of 6C.9 Hamilton–Jacobi Equations and Viscosity Solutions with L(v)=∣v∣24L(v) = \frac{|v|^2}{4}.

Free resources for this chapter

Chosen for what this chapter covers, and all free to read. Links checked Oct 20, 2026.

© 2026 NeckPinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.