starting from the folowing SDE (HJM model):
$$df(t,T)=\left(\sigma(t,T)'\int_t^T{\sigma(t,u)du}\right)dt+\sigma(t,T)'dW_t$$
And having $r(t)=f(t,t)$, I have two questions :
1) how do we obtain the folowing differential equation :
$$dr(t)=df(t,T)|_{T=t}+\frac{\partial}{\partial T}f(t,T)|_{T=t}dt$$
I also think that i don't know how to read the derlimiter $\vert$. For me it does make sense doing this (replacing $T$ by $t$ in $df(t,T)|_{T=t}$):
$$dr(t)=df(t,t)=df(t,T)|_{T=t}+\frac{\partial}{\partial T}f(t,T)|_{T=t}dt =df(t,t)+\frac{\partial}{\partial T}f(t,T)|_{T=t}dt$$
which means $\frac{\partial}{\partial T}f(t,T)|_{T=t}dt=0$ ?
2) In the case $\sigma$ is constant scalar, how do we find the folowing? :
$$dr(t)=\sigma dW_t+\left(\frac{\partial}{\partial T}f(0,T)|_{T=t}+\sigma^2t\right)dt$$
NB: this is from my reading of Paul Glasserman, Monte Carlo Methods In Financial Engineering, page 153
thank you in advance!!!
For your first question, you should not mix $df(t, T)|_{T=t}$ with $df(t, t)$. For $df(t, T)|_{T=t}$, there is no differential to the second argument, that is, when taking the differential, the second argument is ignored, while setting $T$ to $t$ after the differential is done. However, for $df(t, t)$, you need to consider the differential for both the first and second arguments.
For your second question, if $\sigma$ is a constant, then \begin{align*} df(t, T) = \sigma^2(T-t)dt + \sigma dW_t. \end{align*} Consequently, \begin{align*} f(t, T) &= f(0, T) + \int_0^t \sigma^2(T-s)ds +\sigma W_t\\ &=f(0, T)+ \sigma^2 Tt -\frac{1}{2}\sigma^2 t^2 +\sigma W_t. \end{align*} Therefore, \begin{align*} r_t = f(0, t) +\frac{1}{2}\sigma^2 t^2 +\sigma W_t. \end{align*} Moreover, \begin{align*} dr_t &= \frac{\partial f(0, T)}{\partial T}\big|_{T=t} dt +\sigma^2 t\, dt + \sigma \,dW_t\\ &=\left(\frac{\partial f(0, T)}{\partial T}\big|_{T=t} + \sigma^2 t \right)dt + \sigma \,dW_t. \end{align*}