# stochastic optimal control/FOC/Reis(2021)

Reis (2021) The constraint on public debt when $$r < g$$ but $$g < m$$' : HJB: $$\rho V(a, q) = \max_{c/a, k/a} [\log c + V'(a,q)[r + (mq-r)\frac{k}{a} - \frac{c}{a}] a + \frac{V''(a,q)}{2} (k/a)^2 \delta^2 a^2 + v \int ((V(a,q') - V(a,q)) dQ(q'|q)]$$ where $$V'(.) = \partial V(.)/\partial a$$. It is standard to derive that at an optimum: $$c = \rho a$$ $$\frac{k}{a} = \frac{mq-r}{\delta(q)^2}$$ $$V'(.) = \frac1{\rho a}$$ $$\lim_{t\to\infty} e^{-\rho t} V'(.) a_t = 0$$

The author says standard', but I am having difficulty in deriving these FOC. Using $$\log c/a + \log a$$, I can get $$c/a = 1/aV'$$. Also, it is easy to get $$k/a = -(mq-r)V'/V'' \delta^2 a$$. I guess the next step is to differentiate HJB w.r.t. $$a$$ (the envelope condition). This gives me $$\rho V' = \frac1a + V'' \mu_a a + V'\mu_a + \frac{V'''}{2} \sigma_a^2 + V'' (k/a)^2 \delta^2 a + v \int (V'(a, q') - V'(a, q) dQ(q'|q)$$ where $$\mu_a$$ is the drift of $$da$$ and $$\sigma_a$$ is the volatility of $$da$$. For the third FOC in the paper to hold, the terms in right hand side should be cancelled out except $$1/a$$. But, why is that true? Can you give some help?

You can find the paper. It is on p.37 (Appendix A).

I think the "standard" approach in solving HJB equations like this is to guess a form for $$V$$ and then verify. Your first order conditions for $$c/a$$ and $$k/a$$ are right.
Now, guess that $$V(a, q) = K\log(a)$$. With this you get
\begin{align} c &= \frac{a}{K},\\ \frac{k}{a} &= \frac{mq - r}{\delta(q)^2},\\ V'(.) &= \frac{K}{a}. \end{align}
The verification step goes as follows. For notational simplicity, define $$\xi \equiv \frac{mq - r}{\delta(q)}$$ as the market price of risk (the Sharpe ratio). Plug in your guess of $$V$$ into the HJB and rearrange to get
$$\underbrace{\rho K\log(a)}_{\text{LHS of HJB}} = \underbrace{\log(a) - \log K + Kr - 1 + \frac{1}{2}K\xi^2}_{\text{RHS of HJB}}.$$ Comparing the terms involving $$a$$ on the LHS and RHS, we must have $$\rho K = 1$$, which when plugged into the FOC's above gives you the FOC's in the text.