  In this paper, we introduce and develop the theory of semimartingale optimal
transport in a path dependent setting. Instead of the classical constraints on
marginal distributions, we consider a general framework of path dependent
constraints. Duality results are established, representing the solution in
terms of path dependent partial differential equations (PPDEs). Moreover, we
provide a dimension reduction result based on the new notion of
"semifiltrations", which identifies appropriate Markovian state variables based
on the constraints and the cost function. Our technique is then applied to the
exact calibration of volatility models to the prices of general path dependent
derivatives.
