  Under mild regularity assumptions, the transport problem is stable in the
following sense: if a sequence of optimal transport plans $\pi_1, \pi_2,
\ldots$ converges weakly to a transport plan $\pi$, then $\pi$ is also optimal
(between its marginals).
  Alfonsi, Corbetta and Jourdain asked whether the same property is true for
the martingale transport problem. This question seems particularly pressing
since martingale transport is motivated by robust finance where data is
naturally noisy. On a technical level, stability in the martingale case appears
more intricate than for classical transport since optimal transport plans $\pi$
are not characterized by a `monotonicity'-property of their support.
  In this paper we give a positive answer and establish stability of the
martingale transport problem. As a particular case, this recovers the stability
of the left curtain coupling established by Juillet. An important auxiliary
tool is an unconventional topology which takes the temporal structure of
martingales into account. Our techniques also apply to the the weak transport
problem introduced by Gozlan, Roberto, Samson and Tetali.
