Order execution algorithms determine the way in which systematic execution of a portfolio is actually done. We can examine the kinds of decisions the algorithms must make in real time in much the same framework in which we'd think about how discretionary traders implement their orders. The kinds of considerations are the same in both cases, and as has been the theme throughout this book, we find that quants differ here from their discretionary counterparts principally in the mechanics and not so much in the ideas. The principal goal of execution algorithms, and the function of most execution desks in general, is to minimize the cost of trading into and out of portfolios.

As a quick refresher, there are two kinds of orders one can use: market orders and limit orders. A market order is submitted to the marketplace and is generally unconditional, but it must be filled. It can be filled in pieces or in full at whatever price prevails at the market at the time the order's turn to be executed arrives. In contrast, limit orders allow the trader to control the worst price at which he is willing to transact, but the trader must accept that his order might not get executed at all or that only a part of it might be executed. Various versions of these orders, such as market-on-close orders or stop-limit orders, exist. There are also modifiers to orders, such as "fill or kill," "all or none," and "good till cancelled." A fill-or-kill order is a limit order in ...

Get Inside the Black Box: The Simple Truth About Quantitative Trading now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.