Let $\mathcal M$ be the collection of martingle diffusions starting at zero and ending in $\{-1,1\}$. Equivalently, $X\in \mathcal M$ iff there exists a measurable function $a$ s.t. it holds almost surely


$$X\_t=\int\_0^t a(s,X\_s)dW\_s ~\in~ [-1,1],~ \forall t\ge 0 \quad\mbox{and} \quad X\_{\infty}:=\lim\_{t\to\infty}X\_t\in \{-1,1\}.$$


What is the condition on $a$ so that the above properties of $X$ can be satisfied? My guess is


$$a(t,x)=(1-|x|)^{p}k(t,x) \quad \mbox{or}\quad a(t,x)={\bf 1}\_{\{|x|<1\}}k(t,x)$$


for some $p>0$ and suitable function $k$. The simplest example is given as $a(t,x)={\bf 1}\_{\{|x|<1\}}$ by Mateusz Kwaśnicki ([Martingale representation of a stopped Brownian motion](https://mathoverflow.net/questions/400736/martingale-representation-of-a-stopped-brownian-motion))


Any answer, comments and references are highly appreciated.


PS : For the time-homogeneous case, i.e. $a(t,x)\equiv a(x)$, Mateusz provides a sufficient and necessary condition on $a$ to ensure the properties of $X$. I still look for the condition for general $a$.



Characterization of martingale diffusions ending in $\{-1,1\}$
This is an extended comment on the time-homogeneous case, when the coefficient $a(t, x)$ does not depend on $t$, so that it can be written as $a(x)$.


Suppose that $a(\pm 1) = 0$ and that $1/(a(x))^2$ is locally integrable over $(-1, 1)$. We claim that in this case the desired process $X\_t$ exists.




---


Define the *speed measure* $m$ by
$$ m(x) = \int \frac{1}{(a(x))^2} \, dx . $$
Then there is a (unique) *Feller diffusion* $X\_t$ on $(-1, 1)$ with speed measure $m$ and scale function $s(x) = x$, and this diffusion is a weak solution of the SDE
$$ dX\_t = a(X\_t) dB\_t \qquad \text{for $t$ less than the hitting time of } \{-1, 1\}; $$
for further information and references, see, for example, [DOI:10.1007/978-94-009-3859-5\_35](https://doi.org/10.1007/978-94-009-3859-5_35). (In this book chapter the author seems to assume that $a$ is locally bounded and bounded away from zero, but I believe the result is quite general. Time permitting, I can look up a better reference.)


This diffusion either hits $\{-1, 1\}$ in finite time $\tau$, in which case we extend it past $\tau$ so that $X\_t = X\_{\tau-}$ for $t \geqslant \tau$, or it stays in $(-1, 1)$ forever, approaching either $1$ or $-1$ as $t \to \infty$. Due to our assumption $a(\pm 1) = 0$, the above extension satisfies the SDE
$$ dX\_t = a(X\_t) dB\_t \qquad \text{for all } t > 0 . $$
Finally, we have already seen that $X\_\infty \in \{-1, 1\}$, as desired.




---


*Edit:* I believe that the above reference does not really cover the case of general $a(x)$ and processes in an interval. It was meant to give an entry point to the abundant literature on the subject.


However, the construction of $X\_t$ is in fact fairly simple. We start with a standard Brownian motion $W\_s$ and its local time $L\_s^x$ (not really needed here), we denote by $\sigma$ the hitting time of $\{-1, 1\}$ for $W\_s$, and we let
$$ T\_s = \int\_0^{s \wedge \sigma} \frac{1}{(a(W\_r))^2} dr = \int\_{-1}^1 \frac{L\_{s \wedge \sigma}^x}{(a(x))^2} dx . $$
Then $T\_s$ is strictly increasing on $[0, \sigma)$ and so it has a continuous inverse function $T\_t^{-1}$, defined on $[0, T\_\sigma)$ (with $T\_\sigma$ possibly infinite). Then we define
$$ X\_t = W\_{T\_t^{-1}} \qquad \text{for } t \in [0, T\_\sigma) $$
and $X\_t = W\_\sigma$ for $t \geqslant T\_\sigma$.


Then clearly $X\_t$ is a continuous diffusion in $(-1, 1)$ — a time-changed Brownian motion — which either reaches $W\_\sigma \in \{-1, 1\}$ in finite time $T\_\sigma$ and stays there forever, or it converges to $W\_\sigma \in \{-1, 1\}$ as $t \to T\_\sigma = \infty$, depending on whether $T\_\sigma$ is finite or not.


It remains to see that $X\_t$ is a weak solution of $dX\_t = a(X\_t) dB\_t$. To this end, oberve that for $t < T\_\sigma$, the quadratic variation of $X\_t$ satisfies
$$ d\langle X \rangle\_t = d\langle W \rangle\_{T\_t^{-1}} = dT\_t^{-1} = (a(W\_{T\_t^{-1}}))^2 dt = (a(X\_t))^2 dt , $$
and so
$$ dB\_t = (a(X\_t))^{-1} dX\_t $$
defines a continuous martingale $B\_t$ with quadratic variation $d\langle B\rangle\_t = dt$, hence a Brownian motion, for $t \in [0, T\_\sigma)$. Thus $X\_t$ indeed solves
$$ dX\_t = a(X\_t) dB\_t $$
for $t \in [0, T\_\sigma)$, and extension to $t \geqslant T\_\sigma$ is now immediate (expand the probability space to accommodate another Brownian motion $\tilde B\_t$, and let $dB\_t = d\tilde B\_t$ for $t \geqslant T\_\sigma$).




---


In fact, this should be essentially an "if and only if" condition, but due to time limitations I did not try to check this.


