How to derive the dynamics of the perpetual bond price I have a perpetual bond price dynamics under a martingale measure $Q$:
$$
dp(t,T)=p(t,T)r(t)dt+p(t,T)v(t,T)dW(t)
$$
where $W$ is a vector-valued $Q$-Wiener process. I also have a bond pricing formula:
$$
C(t) = \int_t^\infty p(t,s)ds
$$
How can I prove that the dynamics of $C(t)$ is:
$$
dC(t)=(C(t)r(t)-1)dt+\sigma_C(t)dW(t)
$$
where $\sigma_C(t)=\int_t^\infty p(t,s)v(t,s)ds$?
I think we might use the idea of the derivation of HJM drift condition, but I don't have any further clues.
 A: Your first equation is not a perpetual bond price dynamics. It is the well-known HJM SDE for the zero coupon bond that matures at $T\,.$ Your $C(t)$ is in fact a perpetual bond that pays a continuous coupon. Writing the HJM SDE for $p(t,T)$ in
in integral form and plugging it into the definition of $C(t)$ we have
\begin{align}
C(t)&=\int_t^\infty\left\{ p(0,s)+\int_0^tp(u,s)\,r(u)\,du+\int_0^t p(u,s)\,v(u,s)\,dW(u)\right\}\,ds\,.
\end{align}
Applying Fubini and stochastic Fubini we get
\begin{align}
C(t)&=\int_t^\infty p(0,s)\,ds+\int_0^t\int_t^\infty p(u,s)\,r(u)\,ds\,du+\int_0^t\int_t^\infty p(u,s)\,v(u,s)\,ds\,dW(u)\,.
\end{align}
This can be written as
\begin{align}
C(t)
&=\int_t^\infty p(0,s)\,ds\\
&\quad+\int_0^t\int_u^\infty p(u,s)\,r(u)\,ds\,du+\int_0^t\int_u^\infty p(u,s)\,v(u,s)\,ds\,dW(u)\\ \tag{1}
&\quad-\int_0^t\int_u^t p(u,s)\,r(u)\,ds\,du-\int_0^t\int_u^t p(u,s)\,v(u,s)\,ds\,dW(u)\,.
\end{align}
The first two double integrals are obviously
\begin{align}\tag{2}
\int_0^tC(u)\,r(u)\,du+\int_0^t\sigma_C(u)\,dW(u)\,.
\end{align}
Using again
(stochastic) Fubini the last two double integrals can be written as
\begin{align}
-\int_0^t\int_0^s p(u,s)\,r(u)\,du\,ds-\int_0^t\int_0^s p(u,s)\,v(u,s)\,dW(u)\,ds\,.
\end{align}
Using the HJM SDE for $p(u,s)$ this is
\begin{align}
-\int_0^t\underbrace{p(s,s)}_{1}-p(0,s)\,ds=-t+\int_0^tp(0,s)\,ds\,.
\end{align}
Therefore, (1) becomes
\begin{align}
C(t)=\underbrace{\int_0^\infty p(0,s)\,ds}_{C(0)}+\int_0^tC(u)\,r(u)\,du+\int_0^t\sigma_C(u)\,dW(u)-t\,.
\end{align}
In differential form this equation is
$$
\boxed{
dC(t)=C(t)\,r(t)\,dt+\sigma_C(t)\,dW(t)-dt\,.}
$$
