  Latency (i.e., time delay) in electronic markets affects the efficacy of
liquidity taking strategies. During the time liquidity takers process
information and send marketable limit orders (MLOs) to the exchange, the limit
order book (LOB) might undergo updates, so there is no guarantee that MLOs are
filled. We develop a latency-optimal trading strategy that improves the
marksmanship of liquidity takers. The interaction between the LOB and MLOs is
modelled as a marked point process. Each MLO specifies a price limit so the
order can receive worse prices and quantities than those the liquidity taker
targets if the updates in the LOB are against the interest of the trader. In
our model, the liquidity taker balances the tradeoff between missing trades and
the costs of walking the book. We employ techniques of variational analysis to
obtain the optimal price limit of each MLO the agent sends. The price limit of
a MLO is characterized as the solution to a new class of forward-backward
stochastic differential equations (FBSDEs) driven by random measures. We prove
the existence and uniqueness of the solution to the FBSDE and numerically solve
it to illustrate the performance of the latency-optimal strategies.
