  To execute a trade, participants in electronic equity markets may choose to
submit limit orders or market orders across various exchanges where a stock is
traded. This decision is influenced by the characteristics of the order flow
and queue sizes in each limit order book, as well as the structure of
transaction fees and rebates across exchanges. We propose a quantitative
framework for studying this order placement problem by formulating it as a
convex optimization problem. This formulation allows to study how the interplay
between the state of order books, the fee structure, order flow properties and
preferences of a trader determine the optimal placement decision. In the case
of a single exchange, we derive an explicit solution for the optimal split
between limit and market orders. For the general problem of order placement
across multiple exchanges, we propose a stochastic algorithm for computing the
optimal policy and study the sensitivity of the solution to various parameters
using a numerical implementation of the algorithm.
