I am working through the mathematics behind the Hull-White short rate model and am currently stuck on how to take the partial derivative of and evaluate a stochastic integral when looking at how bond prices change.
Here is my set-up:
$dr_t = \kappa(\theta_t - r_t) dt + \sigma_t dW_t^Q$
This is solved by
$r_s = r_t \exp(-\kappa(s - t)) + \int_t^s{\kappa \theta_u \exp(-\kappa(s - u))} du + \int_t^s{\sigma_u \exp(-\kappa(s - u))} dW_t^Q$
where $r_t$ is the short rate, $W_t$ is a Wiener process and $Q$ denotes the risk-neutral measure.
At time $t$, the price of a zero coupon bond with maturity $s$ is:
$ P(t, s) = \mathrm{E}^Q_t \bigg[\exp(-\int_t^s{r_u} du)\bigg]$
To explore the dynamics of the bond, I want $dP(t,s)$. For this, I apply Ito's lemma and expect to be evaluating terms for:
$dP(t, s) = \frac{\partial P}{\partial t}dt + \frac{\partial P}{\partial r_t}dr_t + \frac{\sigma_t^2}{2}\frac{\partial P}{\partial r_t}dt$.
To do this, I apply chain rule to the exponential term in $P(t, s)$. If I apply Leibniz integration rule wrt $r_t$, I get
$$ \begin{aligned} \frac{\partial P}{\partial r_t} &= \mathrm{E}_t^Q\bigg[\frac{\partial}{\partial r_t}\bigg(-\int_t^s{r_u}du\exp(-\int_t^s {r_u} du)\bigg)\bigg] \newline &= \mathrm{E}^Q_t\bigg[\bigg(-\int_t^s {\exp(-\kappa(u - t)} du\bigg)\exp\bigg(-\int_t^s{r_u} du\bigg)\bigg] \newline &= \frac{1}{\kappa}\bigg(\exp(-\kappa(s - t)) - 1 \bigg) P(t, s) \end{aligned} $$
And using this, I can find
$$ \begin{aligned} \frac{\partial^2 P}{\partial r_t^2} &= \bigg(\frac{1}{\kappa}\bigg(\exp(-\kappa(s - t)) - 1 \bigg)\bigg)^2 P(t, s) \end{aligned} $$
What I'm uncertain about is with the $\partial P / \partial t$ term:
$$ \begin{aligned} \frac{\partial P}{\partial t} &= \mathrm{E}_t^Q\bigg[\frac{\partial}{\partial t}\bigg(-\int_t^s{r_u}du\bigg) \exp\bigg(-\int_t^s {r_u} du)\bigg)\bigg] \newline &= \mathrm{E}_t^Q\bigg[ \bigg(-\int_t^s {\frac{\partial r_u}{\partial t} du + \frac{\partial t}{\partial t} r_t} \bigg) \exp\bigg(-\int_t^s {r_u} du)\bigg) \bigg] \newline &= \mathrm{E}_t^Q\bigg[ \bigg(r_t + (r_t - \theta_t) \bigg(\exp(-\kappa(s - t) - 1\bigg) - \int_t^s \frac{\partial}{\partial t} \bigg(\int_t^u {\sigma_v \exp(-\kappa(u - v))dW_v^Q} \bigg) du \bigg) \exp\bigg(-\int_t^s {r_u} du)\bigg) \bigg] \newline &= r_t P(t,s) + (r_t - \theta_t)(\exp(-\kappa (s - t) - 1))P(t,s) - \mathrm{E}_t^Q \bigg[ \int_t^s \frac{\partial}{\partial t} \bigg(\int_t^u {\sigma_v \exp(-\kappa (u - v))dW_v^Q} \bigg) du \exp\bigg(-\int_t^s {r_u} du)\bigg) \bigg] \newline \end{aligned} $$
Initially I wanted to use Leibniz integral rule again to get $\mathrm{E}_t^Q \bigg[ \int_t^s \frac{\partial}{\partial t} \bigg(-\frac{\partial t}{\partial t}{\sigma_t \exp(-\kappa (u - t))} \bigg) du \exp\bigg(-\int_t^s {r_u} du)\bigg) \bigg]$ but having read around a bit more, I'm unsure this would be correct.
Would someone be able to help outline the correct process for evaluating this integral/integrals in this manner?
I'm also confused as there appears to be a stochastic Leibniz rule where $dW_u^Q$ does not disappear, remarks about the expectation of an Ito integral being zero if it is a bounded martingale, and remarks about partial derivatives of Ito integrals not making sense as $dW_t^Q$ is stochastic and cannot be evaluated normally.
Any additional clarification on these points would also be greatly appreciated.
Thanks in advance for your help!