  We analyze an optimal trade execution problem in a financial market with
stochastic liquidity. To this end we set up a limit order book model in
continuous time. Both order book depth and resilience are allowed to evolve
randomly in time. We allow for trading in both directions and for c\`adl\`ag
semimartingales as execution strategies. We derive a quadratic BSDE that under
appropriate assumptions characterizes minimal execution costs and identify
conditions under which an optimal execution strategy exists. We also
investigate qualitative aspects of optimal strategies such as, e.g., appearance
of strategies with infinite variation or existence of block trades and discuss
connections with the discrete-time formulation of the problem. Our findings are
illustrated in several examples.
