# Computing Itô differential of conditional expectation process (Heston SDE)

Going through this article on Heston's model, where the variance evolves following the SDE $$$$\label{sd1} d\sigma^2_t = \kappa \bigg( m - \color{red}{\sigma^2_t} \bigg)dt + \nu \sqrt {\sigma^2_t} dW_t$$$$ with $$\kappa, m, \nu$$ being constants, and $$W_t$$ a Brownian Motion (corrected errata shown in red).

the author defines $$$$\label{sd} M_t := \int_0^T \mathbb{E}[\sigma^2_s \vert \mathcal{F}_t ] ds$$$$

and then proceeds to claim (without further details) that $$$$\label{sd2} dM_t = \nu \sqrt {\sigma^2_t} \bigg( \int_t^T \exp[-\kappa(s-t)] ds \bigg)dW_t$$$$

How can one use Itô's lemma to compute the differential? I thought about first defining $$X_t := \mathbb{E}[\sigma^2_s \vert \mathcal{F}_t ]$$ and computing $$dX_t$$, but I don't really know how to proceed.

$$d v_t = \kappa (m-v_t) dt + \nu \sqrt{v_t} dw_t$$ where $$v_t := \sigma_t^2$$ is the variance.
Let $$\xi_t^T := \mathbb{E}_t [ v_T]$$ denote the forward variance and see that
\begin{align} \xi_{t}^{T} & = \mathbb{E}_t [ v_T] \\ & = \mathbb{E}_t \left[ v_t + \int_{t}^{T} \kappa (m-v_u) du + \int_{t}^{T} \nu \sqrt{v_u} dw_u \right] \\ & = v_t + \int_{t}^{T} \kappa (m- \xi_t^u ) d u \end{align} In differential form (with respect to $$T$$) $$d \xi_t^T = k (m-\xi_t^T) dT$$ Using the integrating factor method yields $$\xi$$ to be $$\xi_t^T = m + e^{-\kappa (T-t)} ( \xi_t^t - m)$$ In differential format (with respect to $$t$$) $$d \xi_t^T = e^{-\kappa (T-t)} \nu \sqrt{\xi_t^t} dw_t$$ Therefore the differential for $$M$$ (with respect to $$t$$) is $$d M_t = \int_{0}^{T} d \xi_t^s ds = \nu \sqrt{v_t} \left[ \int_{0}^{T} e^{-\kappa (s-t)} ds \right] d w_t$$