Putting the pieces together
I’ve zipped through a whole bunch of algorithmic trading stuff over the last several posts. Judging from the expressions on the faces of some very smart and experienced wall st professionals when I’ve covered the same material, it’s not obvious stuff. So, I’m going to back-track a bit by describing what each of the pieces are and how they fit together.
We’ll start with a trading strategy. What is it in an algorithmic trading context? Conceptually, it’s a simple enough thing. It’s something that can study market data and can manage positions. That’s really it. Its “eyes” monitor one or many sources of market data and its “hands” are poised over an Order Management System. There’s obvious potential for complexity with this simple definition and we’re even leaving out potentially important elements, but for now we’ll take this to be pretty much it.
The market data might be a simple stream of “bars” or “candles” representing a summarized Open-High-Low-Close-Volume (OHLCV) data. It might be a stream of time and sales tick data. It might include information on the market depth or order book. It might be many such streams of compressed or direct data. Maybe it comprises news as well and maybe some kind of layer – like a Complex Event Processing (CEP) engine – helps make sense of the streams as they arrive. Whatever. Conceptually, it’s one or more streams of data that the strategy receives. How it uses this data – whether to annotate a complex pre-existing financial model of the universe or to simply seed a random number generator which flips a conceptual coin on whether to buy, sell, hold or fold – is not important at this point.
When the strategy decides that it actually wants to do something, it interacts with its OMS. OMSes predate algorithmic trading and come in a variety of flavors. On the sell side, an OMS might be a server system which “listens” to clients’ orders and routes them to various exchanges or counter-parties and then echoes back executions, cancels, etc when appropriate. I’ve built and worked around such beasts, and they can be complex and interesting but this isn’t really what we’re talking about here.
We’re more concerned with a buy side OMS which will typically sit on a trader’s workstation and provide access to one or more markets, a trading blotter, and possibly various ancillary functions including portfolio management and analytics, risk management, reporting, compliance and regulatory functionality and potentially much more. But the basic function of the OMS is to provide a means of managing positions: entering, cancelling and modifying orders and creating and updating positions on receipt of execution reports. Such client-side OMSes typically will have a Graphical User Interface (GUI) which is frequently quite sophisticated and might include all sorts of bells and whistles. Increasingly, OMSes are opening themselves up to programmatic interaction through proprietary Application Programming Interfaces (APIs) or through common standards like the FIX Protocol.
This is how the algorithmic trading strategy can interact with the OMS – through some kind of an API. This, incidentally, is also how it will interact with the market data – it will typically subscribe to a set of data and then passively receive notifications of changes – through an API. So, a trading strategy will have at least a subscription-based relationship with a market data service and a close working relationship with an OMS. It may have many other such relationships, but these two are the minimum necessary.
It’s worth noting that this basic algorithmic trading setup is also what’s required for a wetware trader – in all cases you need to know where markets are trading and you need to be able to place orders and receive responses. As OMSes have opened up to programmatic interaction, a new kind of software has emerged – the Execution Management System (EMS). EMSes come in a variety of flavors but they’re important for our purposes because an algorithmic trading strategy needs a place or container in which to do its thing. This place is the EMS. The line between the OMS and EMS is blurry, but the OMS provides the baseline functionality (and maybe a whole lot more) while the EMS will typically rely upon an OMS and provide some special, specific functionality. Thus, most algorithmic trading products are EMSes in this sense.
Now that we’ve covered a basic trading strategy and its primary collaborators, we’re positioned to look inside a strategy container and try to make sense of what it’s doing and how it does it. Which is what we’ll do next time.