Deciding an Algo trading system architecture: Market Data Feeds API- PART 1

On another blog, we mentioned the most important components to be considered for an of an algo system. In this blog we handle one of the most important components: The Marker Data Feed handler component

In a Market data feed (mdf) system we have , the MDF providers and the program consuming the feed. There are multiple alternatives to MDF providers from open source to the most expensive ones

The free ones such as Yahoo, Google are available but for a robust Algorithmic trading system you would have to consider more real time data feed systems such as Bloomberg or Reuters. Bloomberg Terminal or Reuters come with a price tag, there are other data feed systems at a lower price however for the design of the architecture in our example, Reuters and Bloomberg will be explained in detailed.

Right now, the focus is not about choosing a Market data feed provider however the entire development of the component handling the raw data from a MDF provider will determine the course of the programming and the solution you need to take. Reuters and Bloomberg have API’s that allow programmers to consume certain methods and adapt the program to their needs.

Bloomberg API

Since 2012, Bloomberg has made their API open source. This allows developers to experiment and create solutions for the financial market however as mentioned on their website “Bloomberg is offering this programming interface (BLPAPI) under a free-use license. This license does not include nor provide access to any Bloomberg data or content. If you wish to use this API to access Bloomberg data, you will need a Bloomberg service subscription, and should contact the nearest Bloomberg sales office in your region.” Therefore we need a way to test a feed. An alternative is to pay for a developer account which costs USD $ 2000/month. Good news is, there is an alternative to simulate the data feed: Bloomberg API Emulator (.Net, Java, C++) .

Choosing a programming language

The BB API can be consumed using different languages and operating systems such as:

WINDOWS
C/C++ v3.7.5.1 Download
.NET v3.7.1.1 Download
Java v3.7.1.1 Download
Perl v3.5.0.1 Download
Python v3.5.5 Download
Python Binary Installer (for 32-bit Python 2.6) v3.5.3 Download
Python Binary Installer (for 64-bit Python 2.6) v3.5.3.3 Download
Python Binary Installer (for 32-bit Python 2.7) v3.5.3 Download
Python Binary Installer (for 64-bit Python 2.7) v3.5.3.3 Download

If we choose .NET we have also options such as using specific programming languages like C# or VB.NET

The BB API has also a Developer guide which explains in quite detail how it works. These examples are provided in C#

Developing Market Data feed handler using .NET C# Bloomberg API

Before starting , we strongly advice you to read http://www.openbloomberg.com/content/uploads/sites/2/2012/03/blpapi-subscription.pdf which explains in detail a use case handling subscription to Instruments

The .NET BLB API comes with multiple examples. Version of the Visual Studio Solution of .NET projects is 2008 but they are easily convertible to VS Studio 2013. Once converted, lets take a look of the example project SimpleSubscriptionExample

exampleBBAPI

 

As explained on the BLPAPI subscription document, the first thing that must be setup is to establish the session with the Bloomberg terminal server

session

The first part of the method (which runs a simple console file)  connects to a Bloomberg Server, which provides the market data. Since we do not have such server , we need to emulate the connection. Next part of the blog will show you how to create a server holding a dummy Bloomberg server and emulate the connection to fake market data

 

 

Leave a comment