Let $Y_t=\int_0^t X_sdW_s$. I know that if $\mathbb E\int_0^tX_s^2ds<\infty $, then $(Y_t)$ is a martingale, and $\mathbb EY_t=0$ for all $t$. But what if we only have $\int_0^t X_s^2ds<\infty $ ?
I know that in this case, $(Y_t)$ is a local martingale only, but do we have that $\mathbb E Y_t=0$ or not ? What I know, is thata there is a sequence of stopping time $\tau_n\nearrow \infty $ s.t. $(Y_{\tau_n\wedge t})$ is a martingale. Therefore, if $\mathbb E Y_{t\wedge \tau_n}=0$ for all $t$ and all $n$. But I think that we can't switch $\mathbb E$ and limit, so I think that that $\mathbb EY_{t\wedge \tau_n}$ won't hold, but I can't find a concrete example. Any idea ? And if it doesn't work, is there a condition on $Y=(Y_t)$ to have that $\mathbb E Y_t=0$ ?