Solution (source code)

= Solution

Work in the usual joint natural <filtration> of $B$ and $W$, in which both are Brownian motions. The integrand is $\operatorname{sgn}(B_s)$, as printed in the PDF. It is <predictable> and bounded, so $X$ is a zero-starting <continuous local martingale>. The <quadratic variation of a stochastic integral> gives
$$
[X]_t=\int_0^t\operatorname{sgn}(B_s)^2\,ds=t.
$$
If the sign is defined to be zero at zero, the final equality still holds: <Tonelli's theorem> gives $\mathbb E\int_0^t\mathbf1_{\{B_s=0\}}ds=\int_0^t\mathbb P(B_s=0)ds=0$. Thus the Brownian zero set has zero Lebesgue time on every compact interval. The <Lévy characterization of Brownian motion> proves that \b[$X$ is standard Brownian motion]. This is the <Brownian sign transform>.