Regime-switching Merton equations (source code)

= Regime-switching Merton equations
{title2=$d_iA_i-(QA)_i-R A_i^{1-1/R}=0$}

For an observed finite-state <continuous-time Markov chain> with rate matrix $Q$, constant bank rate $r$, and state-dependent stock drifts $\mu_i$ and positive volatilities $\sigma_i$, <constant relative risk aversion utility> gives $V_i(w)=A_iw^{1-R}/(1-R)$. Set $\kappa_i=(\mu_i-r)/\sigma_i$ and $d_i=\rho-(1-R)(r+\kappa_i^2/(2R))$. The <Hamilton-Jacobi-Bellman equation> reduces to the displayed nonlinear algebraic system with $A_i>0$. Its feedback controls are $c_i=A_i^{-1/R}w$ and $\theta_i=(\mu_i-r)w/(R\sigma_i^2)$.

A damped <Newton method> in the logarithmic variables $A_i=e^{x_i}$ preserves positivity. Solving these equations produces a candidate value; admissibility, stochastic-integral bounds and the <investment value transversality condition> still need verification.