Does Optional Stopping theorem apply for bounded martingale and almost surely finite stopping time? Let $(M_t)_{t\ge 0}$ is a bounded martingale with respect to the completed right-continuous filtration $\left(\mathcal{G}_{t}\right)_{t \geq 0}$ and $T$ is almost surely finite stopping time.
My lecture has present a version of Optional Stopping theorem in which the martingale is bounded and the stopping time is finite. In this case, my stopping time is only almost surely finite.
I would like to ask if Optional Stopping theorem still applies in case $T$ is almost surely finite stopping time.
Thank you so much for your clarification!
 A: Yes, it does apply. The most general version of the theorem requires you to have a uniformly integrable right-continuous martingale, and an arbitrary stopping time. Hence, even if the stopping time is not finite, by the Martingale Convergence Theorem, your martingale converges almost surely and in $L^1$ to some almost surely finite limit $M_ \infty$, and is closed so that $\mathbb{E}[M_\infty|\mathscr{F}_t] = M_t$. This will take care of the cases when the stopping time blows up. 
A bounded martingale is a special case of a uniformly integrable martingale, so the theorem applies even if the stopping time is unbounded.
Finally, another common version of the theorem is when $T$ is a bounded stopping time and $M$ is any right-continuous martingale, not necessarily uniformly integrable. This follows from the Optional Stopping Theorem above applied to the martingale $(M_{t \wedge a})_{t \geq 0}$ where $a$ is any real number bigger than the bound of $T.$ The result will follow as this martingale is closed by $M_a$ by the Martingale Convergence Theorem.
Summary: You either want your martingale to be "nice" (eg. uniformly integrable) or your stopping times to be sufficiently "small" (eg. bounded). You generally don't need both. 
For details on all of the above, see for example Le Gall's book "Brownian Motion, Martingales, and Stochastic Calculus".
