An HJB is made of two components:
- a "core component" that corresponds to applying an optimal control
- the "dynamics" of the value function (that is surrounding this optimizattion).
Take the one dimension version of the HJB (2.3) of L, C. A., & Mouzouni, C. (2019). A mean field game of portfolio trading and its consequences on perceived correlations. that I know well:
$${\gamma\over 2} q^2 =\partial_t u + a \mu\; \partial_s u+\sup_\nu \left\{ \nu\partial_q u - \ell \;\nu^2/V) \right\}$$
with the terminal condition $u_T=-Aq^2$ (here I took $L(x)=\ell x^2$ in the orginal equality to make it more simple).
To solve it a simple way is to apply a sequence of value-policy iterations:
- you can start with a arbirary (but not too stupid) guess for the value $u_n(t,q)$ to get a position of size $q$ at $t$.
- thanks to that you can solve the optimal control part and find on optimal trading speed $\nu^* $ that solves the supremum (for each $(t,q)$). You can do it numerically in general but here it can be done in close-form: $\nu^*=\partial_q u_n\cdot V / (2\ell)$.
- thanks to that you can plug it into the HJB and find a PDE. For us it will be
$${\gamma\over 2} q^2 =\partial_t u_n + a \mu\; \partial_s u+ {v\over 4\ell}(\partial_q u_n)^2.$$
- you can solve it a backward way since we have the terminal condition. It will give you $v_{n+1}$.
Now you can iterate. It is often talk the Howard method since it was explained in Howard, R.: Dynamic Programming and Markov Processes; MIT Press, Cambridge (1960).
What are the take-away:
- an HJB is a combination of a supremum (corresponding to solving the optimal control) and some PDE terms.
- once you solve the supremum, you get a PDE that is backward (that is natural: in control optimality comes from a backward reasoning).
- you can iterate and it will converge (moreover Howard tells you you converge a monotonic way: at each iteration you are closer to the true value function and the true optimal policy).
You can make the relation with Reinforcement Learning but it is not that true, since in RL the convergence is not monotonic. Nevertheless you can use RL to solve optimal trading problems, cf Section 5.4 of Mounjid, Othmane, and Charles‐Albert Lehalle. "Improving reinforcement learning algorithms: towards optimal learning rate policies." Mathematical Finance (2019).