# HJM model Baxter Rennie: differentiating the discounted asset price using Ito

From Baxter and Rennie Page 145:

$$Z(t,T) = exp(\int_{0}^{t}\Sigma(s,T)dW_s - \int_{0}^{T}f(o,u)du - \int_{0}^{t}\int_{s}^{T}\alpha(s,u)duds)$$

where $$\Sigma(t,T) = \int_{t}^{T}\sigma(t,u)du$$

How to get from here to $$d_tZ(t,T) = Z(t,T)(\Sigma(t,T)dW_t + (\frac{1}{2}\Sigma^2(t,T) - \int_{0}^{T}\alpha(t,u)du)dt)$$

I have tried (based on the answer Baxter & Rennie HJM: differentiating Ito integral):

$$Z_t = exp(-X_t)$$, where $$X_t = \int_{0}^{t}\int_{s}^{T}\sigma(s,u)dudW_s + \int_{0}^{T}f(0,u)du + \int_{0}^{t}\int_{s}^{T}\alpha(s,u)duds$$

$$X_t = f(t,W_t)$$

Therefore, $$dX_t = \frac{\partial}{\partial{t}}f(t,W_t)dt + \frac{\partial}{\partial{W_t}}f(t,W_t)dW_t + \frac{1}{2}\frac{\partial^2}{\partial{W_t}^2}f(t,W_t)d_t$$

Calculating $$\frac{\partial}{\partial{t}}f(t,W_t)dt$$:

$$\frac{\partial}{\partial{t}}(\int_{0}^{T}f(0,u)du) = 0$$

$$\frac{\partial}{\partial{t}}(\int_{0}^{t}\int_{s}^{T}\sigma(s,u)dudW_s) = 0$$

$$\frac{\partial}{\partial{t}}(\int_{0}^{t}\int_{s}^{T}\alpha(s,u)duds) = \frac{\partial}{\partial{t}}(\int_{0}^{t}\widetilde{\alpha(s,u)}ds)$$, where $$\widetilde{\alpha(s,T)} = \int_{0}^{T}\alpha(s,u)du$$

$$\frac{\partial}{\partial{t}}(\int_{0}^{t}\widetilde{\alpha(s,u)}ds = \widetilde{\alpha(t,T)}\frac{\partial}{\partial{t}}t + \widetilde{\alpha(0,T)}\frac{\partial}{\partial{t}}0 + \int_{0}^{t}\frac{\partial}{\partial{t}}\widetilde{\alpha(s,T)}ds$$

$$\frac{\partial}{\partial{t}}(\int_{0}^{t}\widetilde{\alpha(s,u)}ds = \widetilde{\alpha(t,T)} + 0 + 0$$

Therefore

$$\frac{\partial}{\partial{t}}f(t,W_t)dt = \widetilde{\alpha(t,T)}dt = \int_{t}^{T}\alpha(t,u)dudt$$

Calculating $$\frac{\partial}{\partial{W_t}}f(t,W_t)dW_t$$:

$$\frac{\partial}{\partial{W_t}}(\int_{0}^{T}f(0,u)du) = 0$$

$$\frac{\partial}{\partial{W_t}}(\int_{0}^{t}\int_{s}^{T}\alpha(s,u)duds) = 0$$

$$\frac{\partial}{\partial{W_t}}(\int_{0}^{t}\int_{s}^{T}\sigma(s,u)dudW_s)$$: I don't know how to calculate this term. I am not sure if we can apply the Leibniz integral rule (https://en.wikipedia.org/wiki/Leibniz_integral_rule) here, and even doing so the value comes out to be zero. Any help is appreciated.

• Is the value being zero leading to the correct answer? I didn't see an issue with it being $0$ – Slade Mar 4 at 16:05
• If the value for $\frac{\partial}{\partial{W_t}}(\int_{0}^{t}\int_{s}^{T}\sigma(s,u)dudW_s)$ is $0$, then $\frac{\partial}{\partial{W_t}}f(t,W_t)$ is $0$. This then removes the stochastic $dW_t$ part from the SDE of $Z_t$, i.e. in that case $dX_t = \frac{\partial}{\partial{t}}f(t,W_t)dt$ – SPaul Mar 5 at 10:51

This is my first ever answer so please bear with me. Apologies in advance for terrible formatting. Also fyi, you have some typos in your post that may be making things more confusing.

The issue here is that $$\int_{0}^{t}\int_{s}^{T}\sigma(s,u)dudW_s$$ is itself a stochastic process and trying to take its partial derivative with respect to time (which you set to $$0$$ in your question, which led to the issues later) is avoided by doing the following:

Let $$Q(t,x) = -x + \int_{0}^{T}f(0,u)du + \int_{0}^{t}\int_{s}^{T}\alpha(s,u)duds$$, and let $$X_t = \int_{0}^{t}\int_{s}^{T}\sigma(s,u)dudW_s$$, note that this is different than your $$X_t$$.

And so then we have that $$Q(t,X_t)$$ is such that $$Z_t = exp(-Q(t,X_t))$$. Also this makes things easier now since when taking the partial derivatives of $$Q(t,x)$$ we will have $$\partial_xQ(t,x) = -1$$ and $$\partial_{xx}Q(t,x) = 0$$

So applying Ito's lemma, we calculate \begin{align} dQ(t,X_t) = & \partial_tQ(t,X_t)dt + \partial_xQ(t,X_t)dX_t + \frac{1}{2}\partial_{xx}Q(t,X_t)d\langle X_t,X_t \rangle \\ & = \int_{t}^{T}\alpha(t,u)dudt - \int_{t}^{T}\sigma(t,u)dudW_t \end{align}
where the definition of Ito integral was used to calculate $$dX_t = d\int_{0}^{t}\int_{s}^{T}\sigma(s,u)dudW_s = \int_{t}^{T}\sigma(t,u)dudW_t$$

Now we use Ito's lemma on $$Z_t = f(Q(t,X_t)) = exp(-Q(t,X_t))$$ (so $$f = exp(-x)$$).

Note that $$\partial_tf = 0$$, $$\partial_xf = -exp(-x) = -f$$, and $$\partial_{xx}f = exp(-x) = f$$.

Also the quadratic variation is calculated as: \begin{align} d \langle Q(t,X_t), Q(t,X_t) \rangle & = dQ(t,X_t)dQ(t,X_t) \\ & = (\int_{t}^{T}\alpha(t,u)dudt - \int_{t}^{T}\sigma(t,u)dudW_t) * (\int_{t}^{T}\alpha(t,u)dudt - \int_{t}^{T}\sigma(t,u)dudW_t) \\ & = (\int_{t}^{T}\sigma(t,u)dudW_t) * (\int_{t}^{T}\sigma(t,u)dudW_t) \\ & = (\int_{t}^{T}\sigma(t,u)du)^2*dW_t*dW_t \\ & = (\int_{t}^{T}\sigma(t,u)du)^2dt \end{align}

So we can begin to calculate $$dZ_t = dZ(t,T)$$: \begin{align} dZ_t = & \partial_tf(Q(t,X_t))dt + \partial_xf(Q(t,X_t))dQ(t,X_t) + \frac{1}{2}\partial_{xx}f(Q(t,X_t))d \langle Q(t,X_t), Q(t,X_t) \rangle \\ & = -Z_tdQ(t,X_t) + \frac{1}{2}Z_td \langle Q(t,X_t), Q(t,X_t) \rangle \\ & = Z_t(-dQ(t,X_t) + \frac{1}{2}d \langle Q(t,X_t), Q(t,X_t) \rangle \\ & = Z_t(-\int_{t}^{T}\alpha(t,u)dudt + \int_{t}^{T}\sigma(t,u)dudW_t + \frac{1}{2}(\int_{t}^{T}\sigma(t,u)du)^2dt) \end{align}

And finally using $$\Sigma(t,T) = \int_{t}^{T}\sigma(t,u)du$$, we have \begin{align} d_tZ(t,T) = Z(t,T)(\Sigma(t,T)dW_t + (\frac{1}{2}\Sigma^2(t,T) - \int_{t}^{T}\alpha(t,u)du)dt) \end{align}

Note that the lower limit on the third term is $$t$$ unlike in your post.

• Thanks a lot for this detailed answer. I had two follow up queries: 1. $dX_t = d\int_{0}^{t}\int_{s}^{T}\sigma(s,u)dudW_s = \int_{t}^{T}\sigma(t,u)dudW_t$ -- Could you explain how this is valid? 2. The part where you compute $dZ_t = \partial_{t}f(Q(t,X_t))dt + \partial_{x}f(Q(t,X_t))d(Q(t,X_t)) + \frac{1}{2}\partial_{xx}f(Q(t,X_t))d<Q(.),Q(.)>$ -- Could you explain this breakup please? I am not able to reconcile the second and third terms. For example, the second term, $\partial_{x}f(Q(t,X_t))d(Q(t,X_t))$ -- Why should this not be $\partial_{x}f(Q(t,X_t))d(X_t)$ – SPaul Mar 6 at 15:14
• My attempt was: $dZ_t = df(Q(t,X_t)) = \frac{\partial{}}{\partial{Q(t,X_t)}}f(Q(t,X_t))d(Q(t,X_t)) + \frac{1}{2}\frac{\partial^{2}}{\partial{Q(t,X_t)}^{2}}f(Q(t,X_t))d<Q(.),Q(.)>$ where $\frac{\partial{}}{\partial{Q(t,X_t)}}f(Q(t,X_t)) = -f(Q(t,X_t) = -Z_t$ and $\frac{\partial^{2}}{\partial{Q(t,X_t)}^{2}}f(Q(t,X_t)) = f(Q(t,X_t)) = Z_t$ This would also give $dZ_t = Z_t(-dQ(t,X_t) + \frac{1}{2}d<Q(t,X_t),Q(t,X_t)>)$ – SPaul Mar 6 at 15:14
• Whatever you wrote in the 2nd comment matches my process for calculating $dZ_t$. You should try to use $\partial_x$ instead of $\partial_Q$ to keep things cleaner and less confusing in my opinion. $\partial_{x}f(Q(t,X_t))d(X_t)$ is not the correct term since we are using Ito's lemma on the stochastic process $Q$, rather than with $X$. Compare $dQ$'s equation to $dZ$'s equation. Consider the Ito integral $X_t = \int_{0}^{t}b(X_s,s)dW(s)$, we write $dX_t = b(X_t,t)dW_t$. So $\int_{s}^{T}\sigma(s,u)du$ is a stochastic process, so the differential of it's integral w.r.t $dW$ follows – Slade Mar 6 at 15:32
• Thanks a lot for the clarification. – SPaul Mar 13 at 11:13