  We develop a general framework for extracting highly uniform bounds on local
stability for stochastic processes in terms of information on fluctuations or
crossings. This includes a large class of martingales: As a corollary of our
main abstract result, we obtain a quantitative version of Doob's convergence
theorem for $L_1$-sub- and supermartingales, but more importantly, demonstrate
that our framework readily extends to more complex stochastic processes such as
almost-supermartingales, thus paving the way for future applications in
stochastic optimization. Fundamental to our approach is the use of ideas from
logic, particularly a careful analysis of the quantifier structure of
probabilistic statements and the introduction of a number of abstract notions
that represent stochastic convergence in a quantitative manner. In this sense,
our work falls under the 'proof mining' program, and indeed, our quantitative
results provide new examples of the phenomenon, recently made precise by the
first author and Pischke, that many proofs in probability theory are
proof-theoretically tame, and amenable to the extraction of quantitative data
that is both of low complexity and independent of the underlying probability
space.
