# Ito integral under an expectation.

I am trying to apply Ito's formula to $$P(t, X_t) = \mathbb{E}^\mathbb{Q}\left[\exp\left(-\int_t^{T}r(X_s)ds\right)\middle|X_t\right]$$ where $$T$$ is a fixed constant and $$dX_t = \mu\left(X_t\right)dt + \sigma(X_t)dZ_t.$$ I'm only interested in obtaining the term in front of dt which I understand should be $$r(X_t)P(t,X_t)$$ but I do not see how?

If you apply Ito's formula you get $$\begin{equation} \tag{1} dP = r(X_t)P(t,X_t)dt +\ldots dX_t + \frac12\frac{\partial^2P}{\partial X_t^2}\sigma^2dt \end{equation}$$ where I'm not sure what should be in the dots, presumably it must be $$0$$ otherwise the result would not be correct but I do not see this. Also can anyone provide a justification for applying Ito under the expectation?

[For context this appears in Duffie-Kan 1996 in the derivation for equation (3.5) https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjfo_Oqg5b5AhVxm1wKHf3FByoQFnoECAgQAQ&url=https%3A%2F%2Fwww.darrellduffie.com%2Fuploads%2Fpubs%2FDuffieKan1996.pdf&usg=AOvVaw2eP5RVrNc3m5LJ7rBiT44c]

• what is $\mathbb Q$? Jul 26, 2022 at 8:20
• It's just the measure that we are working under, I guess it matters only so that $Z$ is a standard brownian motion under $\mathbb{Q}$ Jul 26, 2022 at 8:23
• Probably you should use $\frac{\partial}{\partial t}\left( \exp\left(-\int_t^T r(x)\, ds\right)\right) = r(x) \exp\left(-\int_t^T r(x)\, ds\right)$ Jul 26, 2022 at 8:25
• so does the dependence on $X_t$ not come into it at all? It is stochastic after all right? Jul 26, 2022 at 8:30
• good question, I don't know, I just suggested something Jul 26, 2022 at 8:30

I think you are missing the key assumption: we are considering only affine models, i.e. models that are of the form $$f(x,t,T) = \exp{\{A(t,T) + B(t,T) x\}}$$.

Here we are saying that the ZCB has this form, hence: $$P(t,T)= \exp{\{A(T-t) + B(T-t) X_t\}}$$ (typically $$X_t = r_t$$ is the (stochastic) interest rate).

So you just need to apply Ito to this process and not the definition of P as expectation of discounted payoff.

Edit [proof of $$\mathcal{D}F-R(X_t)F = 0$$]:

We can use Feynman-Kac representation formula. Without all the details we have that for a function $$u(x,t)$$ following a PDE like BS and with terminal condition $$u(x,T) = \psi(x)$$ the solution is given as:

$$u(x,t) = \mathbb{E}_{t,x}^{\mathbb{Q}}\bigg[ \int_{t}^{T} e^{-\int_{t}^{s}R(X_s,s)ds } f(X_s,s)ds + e^{-\int_{t}^{T}R(X_s,s)ds }\psi(X_T)\bigg]$$

In our case $$\psi(X_T) = 1, u=P(t,T)$$ and $$f(x,t)=0$$. We just need to reason in the opposite direction: we know the conditional expectation then we know the PDE followd by the function is:

$$\mathcal{D}P(t,T) - R(X_t)P(t,T) = 0$$

where $$\mathcal{D}$$ is the Kolmogorov infinitesimal generator (the one you computed previously).

• I think the affine stuff is a key assumption that was missed, however following the paper the authors do as you suggested, but then they derive a second expression for the coefficient in front of $dt$ which is where I get stuck Jul 26, 2022 at 9:37
• Sorry, I thought you just didn't know how to compute the operator. I edited the anwer to include this second part. hope this solves all your doubts Jul 26, 2022 at 10:16
• Ok I will have to have a think about this, seems like everything I need is now there though Jul 26, 2022 at 10:33
• Very good (+1). Would you mind having a look at my approach? Jul 26, 2022 at 10:36

I will use the usual interest rate modelling framework. The process $$P(t,X_t)$$ satisfies the 'bond pricing' PDE $$\begin{cases} \partial_tP(t,x)+(\mu(x)-\sigma(x)\theta(t,x))\partial_xP(t,x)+\frac{1}{2}\sigma^2(x)\partial_{xx}P(t,x)-r(x)P(t,x)=0\\ P(T,x)=1 \end{cases}$$ where $$\theta$$ is the relative risk process (i.e. $$dW_t^\theta=dW_t+\theta(t,X_t) dt$$ is a $$Q$$-Brownian motion). Therefore by Ito \begin{aligned}dP(t,X_t)&=\partial_tP(t,X_t)dt+\partial_xP(t,X_t)dX_t+\frac{1}{2}\sigma^2(X_t)\partial_{xx}P(t,X_t)dt=\\ &=\bigg(\partial_tP(t,X_t)+\mu(X_t)\partial_xP(t,X_t)+\frac{1}{2}\sigma^2(X_t)\partial_{xx}P(t,X_t)\bigg)dt+\sigma(X_t)\partial_xP(t,X_t)dW_t=\\ &=\bigg(\partial_tP(t,X_t)+(\mu(X_t)-\sigma(X_t)\theta(t,X_t))\partial_xP(t,X_t)+\frac{1}{2}\sigma^2(X_t)\partial_{xx}P(t,X_t)\bigg)dt+\\ &+\sigma(X_t)\partial_xP(t,X_t)dW_t^\theta=\\ &=r(X_t)P(t,X_t)dt+\sigma(X_t)\partial_xP(t,X_t)dW^\theta_t\end{aligned} By Ito product rule $$d\bigg(P(t,X_t)e^{-\int_0^tr(X_s)ds}\bigg)=e^{-\int_0^tr(X_s)ds}\sigma(X_t)\partial_xP(t,X_t)dW^\theta_t$$ and $$e^{-\int_0^Tr(X_s)ds}-P(t,X_t)e^{-\int_0^tr(X_s)ds}=\int_{t}^Te^{-\int_0^sr(X_u)du}\sigma(X_s)\partial_xP(s,X_s)dW^\theta_s$$ In the context of bond pricing, a martingale assumption on the rhs yields $$E^Q[e^{-\int_0^Tr(X_s)ds}|\mathscr{F}_t]-P(t,X_t)e^{-\int_0^tr(X_s)ds}=0$$ as we knew already.

• (this approach is very similar, if not equivalent, to the one by @finch) Jul 26, 2022 at 10:36
• That works perfectly too. Jul 26, 2022 at 10:39