# Baxter & Rennie HJM: differentiating Ito integral

From Baxter and Rennie, page 138: $$f(t,T)=\sigma W_t+f(0,T)+\int_0^t\alpha(s,T)ds$$ $$Z_t=\exp-\bigg(\sigma(T-t)W_t+\sigma\int_0^tW_sds+\int_0^Tf(0,u)du+\int_0^t\int_s^T\alpha(s,u)ds\bigg)$$ $$dZ_t=Z_t\bigg(-\sigma(T-t)dW_t-\bigg(\int_t^T\alpha(t,u)du\bigg)dt+\frac{1}{2}\sigma^2 (T-t)^2dt\bigg)$$

How would Ito's Lemma be applied here?

I have tried: $$Z_t=\exp-\bigg(\sigma(T-t)W_t+\sigma\int_0^tW_sds+\int_0^Tf(0,u)du+\int_0^t\int_s^T\alpha(s,u)ds\bigg)=e^{-X_t}$$ $$X_t=\sigma(T-t)W_t+\sigma\int_0^tW_sds+\int_0^Tf(0,u)du+\int_0^t\int_s^T\alpha(s,u)ds$$ \begin{align} dX_t &=\sigma(T-t)W_t-\sigma W_tdt+\sigma(W_tdt-W_0d0)+f(0,T)dT-f(0,0)d0+\bigg(\int_t^T\alpha(t,u)du\bigg)dt-\bigg(\int_t^T\alpha(0,u)du\bigg)d0\\ &=\sigma(T-t)W_t+f(0,T)dT+\bigg(\int_t^T\alpha(t,u)du\bigg)dt \end{align} \begin{align} dZ_t&=-Z_tdX_t+\frac{1}{2}Z_t(dX_t)^2\\ &=Z_t\bigg(-\sigma(T-t)W_t-f(0,T)dT-\bigg(\int_t^T\alpha(t,u)du\bigg)dt+\frac{1}{2}\sigma^2(T-t)^2dt\bigg) \end{align}

A few concerns are that I've written $d0$ and that I have $f(0,T)dT$ remaining. I do think that I've applied Ito's Lemma correctly, the issue is with $dX_t$.

Any help is appreciated.

Let $$Z_t = \exp(-X_t)$$ with $$X_t = \sigma(T-t)W_t+\sigma\int_0^tW_sds+\int_0^Tf(0,u)du+\int_0^t\int_s^T\alpha(s,u)du ds$$ and $W_t$ a standard Brownian motion, along with the usual assumptions.
We can write $X_t=f(t,W_t)$ and apply Itô's lemma to get: $$dX_t = \frac{\partial f}{\partial t}(t,W_t) dt + \frac{\partial f}{\partial W_t} (t,W_t) dW_t + \frac{1}{2}\frac{\partial^2 f}{\partial W_t^2}(t,W_t) d \langle W, W \rangle_t$$ \begin{align} \frac{\partial f}{\partial t}(t,W_t) &= -\sigma W_t + \sigma W_t + \int_t^T \alpha(t,u) du\\ \frac{\partial f}{\partial W_t}(t,W_t) &= \sigma(T-t)\\ \frac{\partial^2 f}{\partial W_t^2}(t,W_t) &= 0\\ \end{align} where we have used Leibniz integral rule (see here) to express the time derivatives of integral terms, notably the following: \begin{align} \partial_t \int_0^t \underbrace{\int_s^T \alpha(s,u) du}_{\tilde{\alpha}(s,T)} ds &= \partial_t \int_0^t \tilde{\alpha}(s,T) ds \\ &= \int_0^t \underbrace{\partial_t \tilde{\alpha}(s,T)}_{=0} ds + \underbrace{\partial_t(t)}_{=1} \tilde{\alpha}(t,T) - \underbrace{\partial_t(0)}_{0} \tilde{\alpha}(0,T) \\ &= \tilde{\alpha}(t,T) \\ &= \int_t^T \alpha(s,u) du \end{align} Wrapping up, yields the following differential for the process $X_t$ $$dX_t = \left(\int_t^T \alpha(t,u) du\right) dt + \sigma(T-t) dW_t$$ from which one can deduce $$d\langle X, X\rangle_t = \sigma^2(T-t)^2 dt$$ and finally, applying Itô's lemma to the continuous semi martingale $Z_t = \tilde{f}(t,X_t) = \exp(-X_t)$ \begin{align} dZ_t &= - Z_t dX_t + \frac{1}{2} Z_t d\langle X, X \rangle_t \\ &= Z_t \left( \left(\frac{1}{2} \sigma^2(T-t)^2 - \int_t^T \alpha(t,u) du \right)dt - \sigma(T-t) dW_t \right) \end{align}
• While calculating the term $\frac{\partial }{\partial W_t}f(t,W_t)$, the term $\frac{\partial }{\partial W_t}(\sigma \int_0^tW_sds)$ would have come. What is the logic of setting this term to 0? – SPaul Mar 1 '19 at 14:19