Solving Merton’s Portfolio Allocation Problem with Finite Differences
Summary
The document sets up Merton’s optimal portfolio allocation problem as a Hamilton–Jacobi–Bellman equation for an investor choosing a portfolio share between zero and one. It proposes discretizing that control and solving the value function with an implicit finite-difference method. The example assumes constant interest rate, expected return, and volatility, and gives a one-year horizon, initial wealth, and boundary conditions at zero wealth, high wealth, and the terminal date.
The central practical guidance is that the equation is solved backward in time, starting from terminal utility and stepping toward the initial date. This is a question seeking implementation help, not a completed numerical solution: it provides no grid, discretization details, convergence evidence, or computed optimal allocation. The stated boundary condition for high wealth also introduces a parameter not otherwise defined in the prompt, so its interpretation would need to be clarified before implementation.
Key ideas
- The allocation problem is expressed as an HJB equation that maximizes over a bounded portfolio share.
- An implicit finite-difference scheme can approximate the value function across wealth and time grids.
- The terminal utility condition anchors a backward solution from the horizon toward the present.
- The prompt supplies example parameters and boundaries but does not show a numerical solution or validate a scheme.
Tags
Full text
# Optimal allocation problem by finite differences
# Optimal allocation problem by finite differences
I am attempting to apply implicit finite difference to solve Merton's problem of optimal portfolio allocation for constant parameters.
The equation to solve is the Hamilton-Jacobi-Bellman equation: $$\max_{\pi\in[0, 1]}\left\{ \frac{1}{2}\pi^2\sigma^2X^2\frac{\partial^2V}{\partial X^2} + \left[ r+\pi(\mu-r) \right]X\frac{\partial V}{\partial X} + \frac{\partial V}{\partial t} \right\} = 0$$
Since $r$, $\mu$ and $\sigma$ are constants, then so is the optimal portfolio allocation $\pi$.
By discretizing $\pi$ and using the following parameters:
$r=0.06, \;\; \mu=0.1, \;\; \sigma =0.35, \;\; X_0=100$ and $T=1$
I want to apply an implicit finite difference scheme with the following boundary conditions: $$V(t, x) = e^{-\alpha \gamma (T-t)}\frac{x^{\gamma}}{\gamma} \;\;\;, \ X>>1$$ $$V(t, 0) = 0 \;\;\;, \ X=0$$ $$V(T, x) = \frac{x^{\gamma}}{\gamma} \;\;\;, \ t=T$$
My professor says that the equation must be solved from time $T$ to time $t=0$, but I have no previous experience working with finite differences, so I would appreciate any pointers on how to get started.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.