Saturday, May 20, 2006

Trading Spot FX via FIX

The following article will appear in the next issue of FIX Global (www.fixglobal.com).

[Cut]

Trading Spot FX via FIX

In this article, I will address trading spot FX using the FIX protocol. I’ll begin with some general views on using FIX for this purpose and will then look at two specific cases using FIX.

The Global Technical Comittee is currently working on a gab analysis of FX trading. They will most likely settle upon using the Market Data Request message for trading on streaming quotes (SQ),  only using the Quote Request message for request for quote (RFQ) trading. This is to differentiate between the two “ways” of trading. My own personal preference, is to differentiate between order placements and trading. For that reason, I favor using Quote Request methodology when trading on SQ (or RFQ), as the Quote Response message can be used, as opposed to the Order – Single message, which should be used with the Market Data Request methodology. The names of the two methodologies (quote vs. market data) also makes it easier to understand if we are talking about trading or order placement.

 
Please note, the Quote Response message is only available in version 4.4.

Regardless of the methodology used, best practice dictates that the trading session should be separated from the quote session. The reason for this is to avoid requesting old quotes using the Resend Request message, should one receive a sequence number that is too high. On the trade session it is paramount that all messages are received, but the same does not really apply on the quote session, as old quotes are basically useless.

Another best practice is that a trade should always trigger the send-out of a new quote (with a max trade amount). In this way, the receiving end is always aware of the amount of liquidity available for a given currency cross.

Prior to version 4.3, FIX did not really support FX trading. Saxo Bank has built their B2B FIX server around version 4.3, but will extend this to also offer support for version 4.4 in the near future. It is, however, quite possible to do FX trading over 4.2 as we will see below.

At Saxo Bank we have around a dozen liquidity providers, most of which supply prices using their own proprietary API. A couple of them use FIX, however. We will look more closely at two that represent two quite different ways of utilizing the FIX protocol.

So why is it interesting that liquidity providers use FIX when sending us prices? Can’t the proprietary API be just as good? The answer to the latter question is “yes.” There is nothing preventing us from bringing on a liquidity provider, just because they are not using FIX. That said, there are a number of advantages to using FIX (and assuming they are in compliance with the protocol).

From a development perspective, we are spared the hassle of “learning” and understand yet another way of integration., cutting down the time it takes to bring on the provider from months down to weeks. We actually had a case where a provider had been unable to begin integration work for another six months due to resource constraints. Instead, the provider moved from their own API to FIX and was then brought on three months earlier.

We face the same issues from a support perspective. Business support and operations do not need to familiarize themselves with a bunch of new error messages, disconnect scenarios and general troubleshooting, if the API is entirely new to them. With FIX they know what do to if something does not work as expected. Time is saved resolving any problem that may arise, which given the fast pace of FX trading can mean the difference between winning or losing money.

Let’s take a look at the two case studies:

One provider uses version 4.2 of the protocol. Quotes are delivered using the Market Data – Incremental Update message. The message has been modified with a custom tag to contain the QuoteID. The FIX protocol is an open standard, and there is nothing wrong with extending individual messages as long as this is done with custom tags - e.g. the QuoteID in the above should not have tag 117, but 5117. When hitting a trade, the New Order – Single message is used where the order type is set to previously quoted (40=D). Price, amount and QuoteID is also returned. If the trade is good, an Execution Report is sent back with ExecType equal to Fill (150=2) and OrderStatus equal to Filled (39=2).

Another provider is using version 4.4 and what I refer to as the Quote Request methodology. After the initial logon a number of Quote Request messages are sent. These indicate which currency pairs and for what amounts we would like to receive quotes. Multiple bands are supported, leading to a steady stream of quote messages from the provider. Whenever we wish to trade on a quote, the Quote Response message is used, with the quote response type set to hit/lift (694=1). If the trade is good, the provider responds in an Execution Report with ExecType equal to Trade (150=F) and OrderStatus equal to Filled (39=2).

The amount of data being sent over the wire in the two cases is almost the same. The Quote message is slightly smaller than the Market Data message, but only by a few tags.

As can be seen, there is nothing to stop companies from utilizing the FIX protocol for FX trading. In fact, since FIX is becoming – if not already so – the de-facto standard for all electronic trading, there is much to be gained from moving to FIX, in terms of faster time-to-market and reduced operating costs.

--

Karsten Strøbæk is Team Lead and Lead Developer for the STP Interfaces group at Saxo Bank. The group’s responsibilities include the development, maintenance and troubleshooting of all trading connections and order routing connections out of the bank. Instead of using a commercial offering, the bank has developed its own FIX library. Karsten writes a blog on FIX and high frequency trading in general (strobaek.blogspot.com)

Saxo Bank is a global investment bank, based in Copenhagen, Denmark. Founded in 1992, Saxo Bank has rapidly become a well-known specialist in online trading in the international capital markets. A fully licensed, EU-regulated financial institution, the bank is recognized for its award-winning information, execution and risk management platform, the SaxoTrader, which consistently earns top prizes in significant industry survey, poll and awards events.

The Bank’s business model, which emphasizes facilitation, decidedly promotes partnerships with liquidity providers and distributors alike.  As a result, Saxo Bank has emerged as a leading White Label Partner, able to accelerate licensed financial institutions’ time-to-market as providers of online trading for their client base.  Saxo Bank serves clients in more than 120 countries, supports sales and service in 35 languages and offers its platform in 20 languages.  www.saxobank.com.