Best execution

Best execution refers to the duty of an investment services firm (such as a stock broker) executing orders on behalf of customers to ensure the best execution possible for their customers' orders. Some of the factors the broker must consider when seeking best execution of their customers' orders include: the opportunity to get a better price than what Is currently quoted, and the likelihood and speed of execution.
In Europe there has been an attempt to define "best execution" within the Markets in Financial Instruments Directive (MiFID), which introduces the principle that when carrying out transactions on their clients' behalf "investment firms [shall] take all sufficient steps to obtain, when executing orders, the best possible result for their clients taking into account price, costs, speed, likelihood of execution and settlement, size, nature or any other consideration relevant to the execution of the order. Nevertheless, where there is a specific instruction from the client the investment firm shall execute the order following the specific instruction." MiFID II. Article 27 "Obligation to execute orders on terms most favourable to the client"
For most broker-dealers or execution agents, best executions are usually optimally constructed via either static or dynamic programming.
Benchmarks for "Best".
The keyword of "best" must be defined with respect to a chosen benchmark. The most common benchmark prices or costs are:
where formula_3 denotes the cumulative market volume at time formula_4, and formula_5 the execution horizon. In reality, formula_6 refers to the last trade price (LTP). 
Different benchmarks have their own pros and cons. For example, the Arrival Price is intuitive and is the "paper" price one would expect assuming abundant liquidity and zero market impact. However, it is transient. Under a Brownian motion with a high volatility, an instantaneous snapshot of the price process may not be a stable benchmark at all. VWAP and TWAP are more stable as they are averaged over the execution horizons, but they are somewhat "flying" targets as the market progressively rolls out. 
"Best" Liquidity Sources.
A source of liquidity is also called a "venue." A venue could be a national exchange such as the New York Stock Exchange (NYSE) in USA, or an Electronic communication network (ECN) or a more general off-exchange Alternative trading system (ATS - Americas) or Multilateral trading facility (MTF - Europe). Dark pool is a special ATS typically run by off-exchange broker-dealers or agency houses, where order information is not published or displayed and matching is done in the "dark" (albeit following a pre-defined set of matching rules). For most OTC products (e.g., non-listed derivatives), the single-dealer or multi-dealer platforms also provide access to principal liquidity sources offered by broker-dealers. 
Best execution crucially relies on identifying the "best" liquidity sources, which may involve the examination of several related factors, such as: 
Evaluating best execution.
Some of the factors a broker needs to consider when executing its customers' orders for best execution are these: the opportunity to get a better price than what is currently quoted, the speed of execution, and the likelihood trade will be executed.
Best execution is often mistaken for trading at market price without taking into consideration factors such as the size of trade or settlement period.
Related definitions.
"Price improvement" – the opportunity, but not the guarantee, that an order will be executed at a better price than what is currently quoted publicly.