# Model of asset substitution/risk shifting in continuous time

Consider a firm with cash flows $$X_t$$, which under a risk-neutral probability measure, follows a geometric brownian motion: $$dX_t = X_t[(r-\beta)dt + \sigma dZ_t]$$ where $$r>0$$ is the risk-free rate, $$\beta>0$$ is the payout rate, and $$\sigma$$ is the earnings volatility. Let $$X_0 = x$$ be the initial value. Now assume that the firm has perpetual debt with coupon $$C$$ (which is taken to be fixed) and assume there are no taxes. Assume that shareholders can choose a stopping time at which the firm defaults, i.e., $$\tau = \inf\{t: X_t \le x_B \}$$ (for now assume that $$x_B$$ is fixed). Let $$E_t = E(X_t)$$ denote the value of equity at time $$t$$, then the value of equity at time $$t =0$$ is given by $$E_0 = E(X_0) = E(x)= \mathbb{E}\left[\int_0^{\tau} e^{-rt}(X_t - C)dt + e^{-r\tau} E(X_{\tau}) \right] \ \ \cdots (1)$$.

Applying the Feyman-Kac formula, we get $$rE(x) = x - C + (r-\beta) xE'(x) + \frac{\sigma^2 x^2}{2}E''(x) \ \ \cdots (2)$$

My question is: how do we get from Equation $$(1)$$ to $$(2)$$? What I've done so far is this.

Consider the value of the equity at time $$t$$, which is given by $$E_t = E(X_t) = \mathbb{E}\left[\int_t^{\tau} e^{-r(s-t)}(X_s - C)ds + e^{-r(\tau-t)} E(X_{\tau}) \right] \ \ \cdots (3)$$ Now use Ito's Lemma on Equation $$(3)$$ and we get \begin{align} dE_t & = E'(X_t) dX_t + \frac{1}{2}E''(X_t) (dX_t)^2 \\ & = (E'(X_t) X_t (r-\beta) + \frac{1}{2}E''(X_t) \sigma^2 X_t^2) dt+ E'(X_t)\sigma dZ_t \end{align} This is where I am stuck. I can see relevant terms in the above equation that appear in (2) but can't seem to go any further.