  In this paper we propose a dynamic model of Limit Order Book (LOB). The main
feature of our model is that the shape of the LOB is determined endogenously by
an expected utility function via a competitive equilibrium argument. Assuming
zero resilience, the resulting equilibrium density of the LOB is random,
nonlinear, and time inhomogeneous. Consequently, the liquidity cost can be
defined dynamically in a natural way.
  We next study an optimal execution problem in our model. We verify that the
value function satisfies the Dynamic Programming Principle, and is a viscosity
solution to the corresponding Hamilton-Jacobi-Bellman equation which is in the
form of an integro-partial-differential quasi-variational inequality. We also
prove the existence and analyze the structure of the optimal strategy via a
verification theorem argument, assuming that the PDE has a classical solution.
