Thursday, February 24, 2011

FIX Protocol and User Defined Fields in Repeating Groups

This post is driven by discussion on fixprotocol.org about message parsing and user defined fields (UDF) in repeating groups.

The main concern is if you really need to correct a dictionary when adding UDF to the repeating group or message can be parsed just based on the standard. Popular (and theoretically correct) answer is yes, you should modify dictionary. But in fact there is something you can do without dictionary and still be able to parse such messages properly.


When you parse repeating group you know several things about it:

  1. From the leading tag you know the number of entries 
  2. From the standard you know the start tag, which is alway required for repeating group
When you parse particular entry of the repeating group and it is not the last entry (you can easily find out that by counting start tags) you can consider all UDFs as part of this repeating group.
When you parse the last entry and you find UDF, which appeared in previous entries you can also consider it as a part of repeating group.
What you CANNOT do:

  1. If you find UDF the first time when parsing the last entry of the repeating group you cannot decide if it belongs to repeating group or body (actually you can check if it is followed by the tag defined for repeating group but this is too much). 
  2. If message is invalid i.e. contains incorrect number of entries you cannot make correct decision.
After all keep in mind that all these "guesses" slow down your parsing so think twice whether you really need it and then think one more time. :)

Some additional links are under cut.

Wednesday, February 2, 2011

FIX Antenna vs QuickFIX: battle or marriage?

It is always difficult to compete with freeware and opensource as they have at least one unquestionable advantage - price. When thinking of what proprietary paid solution can oppose to free opensource one usually come to two obvious options:
  • Service (maintenance and support)
  • Technological advantages
B2BITS FIX Antenna definitely addresses both of the items. It is discussed in detailed here. In general I would say that the most substantial advantage of FIX Antenna nowadays is performance.

For those who have chosen QuickFIX in the past and now are suffering from the performance deficiency being scared of  long migration process to some proprietary solution, B2BITS developed QF Adaptor, which simplifies migration process and minimizes time to market. And still it outperforms QuickFIX.

For more information please click the links below.

Friday, January 28, 2011

FIX Engines and High Frequency Trading

FIX engine is usually just a small part of trading application however it plays an important role and adds its own latency. To be in business today FIX engine's latency should not exceed 100 usec. In fact the demand on the market is for 10 usec while standard OS stack normally takes around 40 usec

We in B2BITS tried to optimize CME Market Data adaptor and with the help of special Myricom card (Myri 10G-PCIE2-8B2-2S) were able to improve the latency 3-4 times.

Follow links below for more details:

http://fixprotocol.org/discuss/read/977094fb
http://www.b2bits.com/b2bits/news_25jan11.html
http://www.b2bits.com/performance_lab/cme_fast.html

Wednesday, December 1, 2010

FIX Expert Express Training Course

Basic Topics
Day 1 (10 hours)


  1. FIX message syntax
    1. FIX
      1. Read about syntax of FIX 4.4 (self education)
      2. message structure
        1. tags
        2. field names
        3. delimiter
      3. header
        1. body length
        2. message type
      4. trailer
        1. check sum
      5. repeating groups
        1. leading tag
        2. start tag
        3. nested repeating groups
      6. encryption
      7. user defined tags
      8. protocol customization
      9. message validation
        1. Garbled message
        2. Invalid message
      10. Learn how to construct FIX message manually
      11. Test (6 tasks for 2 hours)
        1. be able to construct FIX message on demand
        2. be able to identify error in FIX message
    2. FIXML
      1. Read about FIXML syntax 4.4.
      2. Learn how to convert between FIX and FIXML
      3. Embed FIXML into FIX XML message
      4. Test (2 tasks for 2 hours)
        1. be able to convert FIX to FIXML
        2. be able to convert FIXML to FIX

Wednesday, September 1, 2010

Translated books - blessing or cursing?

Nassim Taleb is quite known guy mostly thanks to his Black Swan theory and his book The Black Swan: The Impact of the Highly Improbable, which made a lot of noise.

The book was from my "should" list and finally it was its turn to be read. Since it is something what we call "popular science" rather than "science" or "technical literature" I've decided to read it in translation and that decision led me to significant time waste.

The book appeared to be a set of trivial thoughts about applicability of probability theory and statistics and some strange statements, which actually did not make any sense to me. But then I've decided to look at original text and you know things are slightly different there.

So I restarted reading the English version of it and I do not know if I change my mind after that but so far I've got yet another evidence of the old known principles:

  1. Never read translation if you can read original text.
  2. Never judge based on translation (or interpretation)
  3. Never trust ballyhoo
And yes, most likely I will post my thoughts about the book after I finish reading it.

PS Funny statement from the book:
Note that, by symmetry, the occurrence of a highly improbable event is the equivalent of the nonoccurrence of a highly probable one.
Interesting, what kind of symmetry he is referring to... :)

Sunday, July 25, 2010

Trade on MICEX via FIX

On Wednesday MICEX officially announced that public testing of the MFIX Transactional - FIX interface for trading - starts on July 24th.

This is the second solution (the first was for market data) implemented by EPAM Systems and capital market division in particular for MICEX.

MFIX Transactional is the result of Kyiv and Saratov teams cooperation. Professionalism, responsibility, focus and real customer involvement were key factors to overcome all pitfalls and deliver.

Well done guys and keep going!

PS For those of you who can read Russian try links below (under cut).

Monday, July 19, 2010

FIX logs analyzer. Part I.

x
FIX Log Analyzers (FIX Grep and FIX Eye) are the small tools, which were started for internal use only, developed with the lapse of time and finally grew up to the powerful (but still lightweight) product suit.

BTW Today there is a free demo version of FIX Eye available for download from official B2BITS web site.


History
Originally the main purpose of the utility was making testers' life easier. Namely:
  • Help FIX  newbies read and understand FIX logs
  • Save time for searching orders and related messages in logs to analyse order life-cycle
Additional requirements were:
  • Deal with any free-form text file (often there is a need to extract messages from log files with a lot of debug info)
  • Deal with multiple files (in most cases in and out messages are stored in multiple files, also data for different sessions can be in different files)
  • Deal with archives (log files grow fast so there is a need to take into account housekeeping procedures normally performed at the end of the day)