Right now, I want to figure out the covariance of a stochastic integral and a riemann integral in the following form:


$$E\left(\int\_{0}^{t}\exp[B(t)-B(s)]ds \cdot \int\_{0}^{t}\exp[B(t)-B(s)]dW(s)\right).$$
where $B(\cdot)$ and $W(\cdot)$ are independent Brownian motions, or $d\langle B, W \rangle\_t = \gamma dt$. 


My guess to this is 0 and my calculation is


$$E\left(\int\_{0}^{t}\exp[B(t)-B(s)]ds \cdot \int\_{0}^{t}\exp[B(t)-B(s)]dW(s)\right) = E\left(\int\_{0}^{t}\exp[B(t)-B(s)]\int\_{0}^{t}\exp[B(t)-B(r)]dr dW(s)\right) = 0 $$
by virtue of $E(\int \cdot dW) = 0$. Am I correct? If not, what tool can I use to derive the correct result?



Covariance of the product of a stochastic integral and riemann integral
First of all, $\int\_0^t\exp[B(t)-B(s)]\,dW(s)$ should be understood as $\exp[B(t)]\int\_0^t\exp[-B(s)]\,dW(s)$, otherwise, the integral couldn't be defined as an Ito's integral.


Let 
\begin{align}
Z(t)&\Bigl(=\int\_0^t\exp[B(t)-B(s)]\,ds\int\_0^t\exp[B(t)-B(s)]\,dW(s)\Bigr)\\
&=e^{2B(t)}\int\_0^t\exp[-B(s)]\,ds\int\_0^t\exp[-B(s)]\,dW(s)
\end{align}
Using Ito's formula, we have
\begin{align}
dZ(t)&=2Z(t)\,dB(t)+2Z(t)\,dt+\Bigl(e^{B(t)}\int\_0^t\exp[-B(s)]\,dW(s)\Bigr)\,dt\\
&\quad +\Bigl(e^{B(t)}\int\_0^t\exp[-B(s)]\,ds\Bigr)\,dW(t)
+2\gamma \Bigl(e^{B(t)}\int\_0^t\exp[-B(s)]\,ds\Bigr)\,dt \tag{1}
\end{align}
Denote $m(t)=\mathsf{E}[Z(t)]$, then $m(0)=0$ and from (1) we have
\begin{align} dm(t)&=2m(t)\,dt+\mathsf{E}\Bigl[e^{B(t)}\int\_0^t e^{-B(s)}\,dW(s)\Bigr]
+2\gamma\int\_0^t\mathsf{E}[e^{B(t)-B(s)}]\,dt\\
&=2m(t)\,dt+6\gamma(e^{t/2}-1).\tag{2}
\end{align}
where we use following equalities:
\begin{align}
\mathsf{E}\Bigl[e^{B(t)}\int\_0^t e^{-B(s)}\,dW(s)\Bigr]&=2\gamma(e^{t/2}-1),\tag{3}\\
\mathsf{E}[e^{B(t)-B(s)}]&=e^{(t-s)/2}
\end{align}
Now from (2) and $m(0)=0$ we could get the expression of \begin{align}
m(t)&=\mathsf{E}\Bigl[\int\_0^t\exp[B(t)-B(s)]\,ds\int\_0^t\exp[B(t)-B(s)]\,dW(s)\Bigr]\\
&=\gamma e^{2t}-4\gamma e^{t/2}+3\gamma.\end{align}


To get (3) using same way as above(Ito's formula and solving a ODE).
Let $X(t)=e^{B(t)}\int\_0^te^{B(s)}\,dW(s)$ and $m\_X(t)=\mathsf{E}[X(t)]$, then
\begin{align}
dX(t)&=X(t)\,dB(t)+\frac12X(t)\,dt+dW(t)+\gamma dt,\\
dm\_X(t)&=\frac12m\_X(t)+\gamma dt, \qquad m\_X(0)=0\\
m\_x(t)&=\gamma\int\_0^te^{(t-s)/2}\,ds=2\gamma(e^{t/2}-1).
\end{align}
Please excuse me that above deduction may be included some errors and typos, since the process includes many details be checked.


