Martingales composed with stopping times Let $(\Omega, \mathcal{F}, (\mathcal{F}_t),P)$ be a filtered probability space and $M_{t}$ be a continuous-time martingale. Suppose $\tau: \Omega \to \mathbb{R}$ is a stopping time with respect to $\mathcal{F}_t$. One often sees the composed functions $M_\tau : \Omega \to \mathbb{R}$, given by $M_{\tau}(\omega) = M_{\tau(\omega)}(\omega)$ being treated as random variables, but why are they measurable? Thanks. 
 A: Let $(\Omega, {\cal F}, ({\cal F}_t), P)$ be a filtered probability space.
In order to show that $M_\tau$ is a random variable we usually assume that $M$ is a measurable process,
meaning that the map $(t,\omega)\mapsto M(t,\omega)$ is (jointly) measurable from 
$[0,\infty)\times \Omega$ to $\mathbb{R}.$
Here $\mathbb{R}$ is equipped with its Borel $\sigma$-field ${\cal B}(\mathbb{R})$ and 
 $[0,\infty)\times \Omega$ with the product $\sigma$-field 
${\cal B}([0,\infty))\times {\cal F}.$
This condition  can be achieved, for example, by assuming that $(M_t)$
 has right continuous sample paths, in addition to being $({\cal F}_t)$-adapted. 
If $M$ is a measurable process and and $\tau$ a finite random time, then
the composition 
$$\begin{array}{ccccc}
\omega &\to& (\tau(\omega),\omega)&\to& M(\tau(\omega),\omega)\\[5pt]
{\cal F}&&{\cal B}([0,\infty))\times{\cal F} &&{\cal B}(\mathbb{R})
\end{array}
$$
is measurable.
In general, 
$M_\tau 1_{\{\tau<\infty\}}
=\lim_{t\to\infty} M_{\tau\wedge t} 1_{\{\tau<\infty\}} $ is ${\cal F}$-measurable. The random time $\tau$ does not need to be an optional or stopping
 time for this argument to work, just measurable. 
