Finding a stochastic process from Ito’s lemme on $Y_t$ such that $\int_0^1Y_s\,\mathrm{d}B_s= B_1-2B_1\mathbb{I}_{|B_1|}$ Problem:
I would like to zoom in on a particular part of a question as a follow-up on a question I have previously asked, which I feel deserves its own space. I was looking at the random variable
$$X=B_1-2B_1\mathbb{I}_{|B_1|}=\begin{cases}B_1&\text{if }|B_1|\geq1\\-B_1&\text{otherwise}\end{cases}$$
for $t\in[0,1]$, where $\{B_t\}$ is a standard BM. I also have
$$X_t=\mathbb{E}(X|\mathcal{F}_t)=\mathbb{E}(B_1-2B_1\mathbb{I}_{|B_1|<1}|\mathcal{F}_t)$$
where the filtration $\mathcal{F}_t$ satisfies the usual conditions. I need to find an adapted process $\{Y_t\}_{t\in[0,1]}$ s.t. $X=\int_0^1Y_s\,\mathrm{d}B_s$. I was thinking that $Y_t=1-2\mathbb{I}_{|B_1|<1}$ was a good choice, but apparently it is wrong, why is this so?
Furthermore, is it true that $X_t=\int_0^tY_s\,\mathrm{d}B_s$ in general? How does this lead to the result that $\int_0^tX_sY_s\,\mathrm{d}B_s$ is a martingale?
Lastly, in my original question, I was trying to figure out the distribution of $X$, and I mistakenly thought was a Brownian motion. How do we determine the distribution from the form of $X$ without looking at $Y_t$?
My attempt:
Using the Markov property and independent increments, I have established $X_t=B_t-2f(B_t,\sqrt{1-t})$ where $f(x,s)=\mathbb{E}\left[(x+sZ)\mathbb{I}_{|x+sZ|<1}\right]$ and $Z\sim\mathcal{N}(0,1)$. Letting $s=\sqrt{1-t}$, I have from Ito's formula
$$\mathrm{d}X_t=\left(1-2\frac{\partial f}{\partial B_t}\right)\mathrm{d}B_t-\left(\frac{\partial^2f}{\partial B_t^2}-\frac1s\frac{\partial f}{\partial s}\right)\mathrm{d}t.$$
Since $X_t$ is a martingale, it is also a local martingale and the drift term is zero, so the PDE satisfied by $f(x,s)$ on the interval $s\in(0,1]$ is
$$\frac{\partial^2f}{\partial x^2}=\frac1s\frac{\partial f}{\partial s}.$$
Additionally, $X_0=\mathbb{E}(X_t|\mathcal{F}_0)=\mathbb{E}(X_t)=0$ a.s., so we have initial condition $f(0,1)=0$. To my knowledge, there is no closed form solution to this PDE (I think). Then, $Y_t=1-2\frac{\partial f}{\partial B_t}$ which I got from the diffusion part of Ito's formula. If I have missed out on a possible closed form solution for $f$ or $\partial f/\partial B_t$ do let me know.
 A: Let $f(b) := b 1_{|b|< 1}$ and compute by the Markov property of Brownian motion and independent increments that $$E[f(B_1)|\mathscr{F}_t] = E[f(B_1)|B_t] = E[f((B_1-B_t) + B_t)|B_t] = E[f(Z\sqrt{1-t} + b)]|_{b=B_t},$$ where $Z \sim N(0,1)$.
Thus we need to compute for a fixed $b$ the value of the integral
$$
E[f(Z\sqrt{1-t} + b)]
= E[(Z\sqrt{1-t} + b) 1_{-1 <Z\sqrt{1-t} + b < 1}] 
= E[(Z\sqrt{1-t} + b) 1_{\frac{-1-b}{\sqrt{1-t}} <Z< \frac{1-b}{\sqrt{1-t}}}]
$$
$$
=\sqrt{1-t} E[Z1_{\frac{-1-b}{\sqrt{1-t}} <Z< \frac{1-b}{\sqrt{1-t}}}] +bP(\frac{-1-b}{\sqrt{1-t}} <Z< \frac{1-b}{\sqrt{1-t}})
$$
$$
=\left(\sqrt{1-t} E\left[Z\mid{\frac{-1-b}{\sqrt{1-t}} <Z< \frac{1-b}{\sqrt{1-t}}}\right] +b\right)P(\frac{-1-b}{\sqrt{1-t}} <Z< \frac{1-b}{\sqrt{1-t}})
$$
and using the formula for the mean of a truncated normal https://en.wikipedia.org/wiki/Truncated_normal_distribution this is (using $c:= \frac{-1-b}{\sqrt{1-t}} $ and $d:=\frac{1-b}{\sqrt{1-t}}$ and $\phi, \Phi$ normal density and CDF)
$$
=\left(\sqrt{1-t}\frac{\phi(c)-\phi(d)}{\Phi(d)-\Phi(c)} +b\right)(\Phi(d)-\Phi(c))
$$
$$
= \sqrt{1-t}(\phi(c)-\phi(d)) + b(\Phi(d)-\Phi(c)).
$$
Thus $$
E[B_1-2B_1 1_{|B_1|<1}|\mathscr{F}_t] $$
$$
= B_t - 2\sqrt{1-t}\left(\phi\left( \frac{-1-B_t}{\sqrt{1-t}}\right)-\phi\left(\frac{1-B_t}{\sqrt{1-t}}\right)\right) - 2B_t\left(\Phi\left(\frac{1-B_t}{\sqrt{1-t}}\right)-\Phi\left( \frac{-1-B_t}{\sqrt{1-t}}\right)\right) = M(B_t).
$$
Thus one should have
$
E[\int_0^1 Y_s dB_s|\mathscr{F}_t] =\int_0^t Y_s dB_s
$
equal to the previous line. Thus $Y_t = d M(B_t)$ can just be computed using Ito's formula on that monstrous formula, which involves only smooth functions of $B_t$. I'm confident a dedicated person could carry out the Ito formula calculation without further instruction, hopefully leading to some great cancellation of terms using that $\Phi' = \phi$, though I cannot force myself to type it up for you.
As for your question about $\int_0^t X_s Y_s dB_s$, this is a martingale because any integral with respect to Brownian motion is a local martingale, and you can check that $E\int_0^t (X_s Y_s)^2 ds < \infty$ so it is indeed a martingale.
One has that $X$ is normally distributed, this construction is used to give a standard example of normals that are uncorrelated but not independent. Check https://en.wikipedia.org/wiki/Normally_distributed_and_uncorrelated_does_not_imply_independent. I'm not sure about $X_t$.
