Whether you are a retail trader investing your savings in stock market or a technical analysis expert or a hedge fund manager, the first step to start your own algorithmic trading is to understand how it works.
Algorithmic Trading requires removing a human trader by a machine, which can make its own trading decisions and executes those decisions. The algorithmic trading system consists of three major components which are shown in the diagram below:
Market AdapterExchange or any market data vendor sends data in their own format. Your algorithmic trading system may or may not understand that language. Exchange provides you with an API or an Application Program Interface which allows you program and create your own adapter which can convert the format of the data into the format your system can understand.
Complex Event Processing EngineThis part is the brain of your strategy. Once you have the data, you would need to work with it as per your strategy which involves doing various statistical calculations, comparisons with historical data and decision making for order generation. The order terms of type of order, order quantity is prepared in this block.
Order Routing SystemThe order is encrypted in the language which exchange can understand, again using the APIs which are provided by the exchange. There are two kinds of APIs provided by the exchange: native API and FIX API. Native APIs are those which are specific to a certain exchange. The FIX (Financial Information Exchange) protocol is a set of rules used across different exchanges to make the data flow in security markets easier and effective.
In case of open economy, one can send orders to exchanges or non-exchanges and ORP should be able to handle orders to different destinations.