0% found this document useful (0 votes)
516 views51 pages

Fix Basics PDF

The FIX protocol is an open standard for electronic communication of financial market transactions. It defines a common message format and communication model for parties like banks, brokers, and exchanges. FIX aims to simplify implementation and increase efficiency by reducing errors and automating processes. Key benefits include allowing higher trading volumes without increasing staff, enabling traders to focus on dialogue rather than clerical tasks, and preventing issues like trade errors or unauthorized activities. FIX messages have a standard structure including a header, body, and trailer, with fields identified by tags for elements like message type, sender, recipient, and transaction details.

Uploaded by

Gamindu Udayanga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
516 views51 pages

Fix Basics PDF

The FIX protocol is an open standard for electronic communication of financial market transactions. It defines a common message format and communication model for parties like banks, brokers, and exchanges. FIX aims to simplify implementation and increase efficiency by reducing errors and automating processes. Key benefits include allowing higher trading volumes without increasing staff, enabling traders to focus on dialogue rather than clerical tasks, and preventing issues like trade errors or unauthorized activities. FIX messages have a standard structure including a header, body, and trailer, with fields identified by tags for elements like message type, sender, recipient, and transaction details.

Uploaded by

Gamindu Udayanga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

FIX Protocol basics

Prof. Dr. Bernd Ulmann

18-OCT-2010

Hochschule fuer Oekonomie und Management, Frankfurt

1/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


1. Introduction

Introduction

2/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Introduction 1. Introduction

What is the FIX Protocol?


Acronym for Financial Information eXchange Protocol (not to
be confused with IPFIX, the Internet Protocol Flow
Information Export).
Open standard which defines a message format as well as a
communication model.
This standard has been created by an industry consortium
consisting of banks, independent vendors etc.
The intended audience consists of financial institutions like
banks, brokers, dealers, exchanges etc.
FIX is the defacto standard in financial information exchange
today.
FIX is platform independent (concerning systems and
networks).
Central point for all information about FIX is
http://www.fixprotocol.org.
3/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIX in the past 1. Introduction

How has FIX evolved over the years1 ?


FIX was conceived by the equity trading departments of
Fidelity Management & Research and Salomon Brothers.
After the feasibility of the concept developed by these two
companies became apparent, a FIX committee was established
which began work in June 1994.
In 1995 the first Technical Committee Meeting took place.
Also in January 1995, FIX was released to the financial
community in version 2.7.
In September 1995 version 3.0 of the FIX Protocol was
released.

1
These slides are based on
http://fixprotocol.org/implementation-guide/introduction.shtml,
28.10.2010.
4/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIX in the past 1. Introduction

The London FIX General Conference was held in June 1996.


FIX 4.0 was released in 1997.
FIX 4.1 was released in 1998.
In June 1998 the FIX Committee structure was formalized.
In March 1999 the Japanese FIX Commiettee was formalized.
In April 1999 the FIX Procotol Ltd. was started.
The FIX Protocol was extended for fixed income trading by
Putnam Investments and Merrill Lynch. A pilot
implementation was running in March 2000.
FIX 4.2 was released in March 2000 and included four
additional tags for fixed income trading.

5/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


FIX in the past 1. Introduction

The extension also included so called user defined tags, UDTs


for short.
In 2000 the FIX Protocol organization established the Fixed
Income Working Group, FIWG for short which became known
as the Global Fixed Income Committee (GFIC).
The FIX Protocol Limited (FPL) entered so called Statements
of Understanding (SoU) with other organizations like SWIFT,
the Bond Market Association etc.

6/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Who uses FIX? 1. Introduction

Who uses the FIX Protocol? The main user groups are these:
Buy-side firms: Communication with sell-side firms by means of
pre-trade, trade and post-trade messages.
Sell-side firms: Communictaion with buy-side firms via pre-trade,
trade and post-trade messages. In addition to that
communication with exchanges and OTC markets in
general.
Exchanges: Receiving trades from their members, sending
execution reports etc. back to them.
Currently a wide variety of product classes are suported ranging
from equities to fixed income products, derivatives and the like.

7/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Benefits of using FIX 1. Introduction

FIX offers a wide range of benefits in various areas:


FIX simplifies the implementation of interfaces by using so
called FIX engines (there are open source implementations as
well as commercial ones).
FIX increases the efficiency on the dealer side by saving time
for price and execution data transmission.
Since FIX defines message semantics, it reduces the risk of
human error in trade entry etc. and makes it possible to
detect errors earlier in the business process flow if they occur.
FIX engines implement all necessary means for logging FIX
message, for dealing with dropped connections etc. thus
simplifying application development.
Nearly every broker/dealer/exchange speaks FIX.
Nearly all vendors of order management systems, OMS, offer
FIX connectivity.
8/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Benefits of using FIX 1. Introduction

The main benefits of FIX from a traders perspective are the


following ones2 :
The use of FIX has allowed trading volumes to increase
without corresponding increases in staffing.
FIX allows traders to focus on dialogue and not on clerical
tasks.
FIX allows an individual to trade more stocks and decrease
the chance of errors at the same time.
With the increased volatility in the marketplace, FIX enables
me to stay on top of my positions in real-time.
FIX prevents Nick Leeson-type activities before they can
even happen, not just next day on confirmation or on
settlement day.

2
Cf. [Hong Kong 00][p. 25 ff.].
9/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIX System Connectivity 1. Introduction

A typical FIX setup is shown below3 :

3
Cf. http://upload.wikimedia.org/wikipedia/en/e/ea/Fix.jpg,
28.10.2010.
10/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
2. Message structure

Message structure and fields

11/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Message structure and fields 2. Message structure

Although FIX messages always have a similar structure, the


number and type of possible fields depends strongly on the version
of the FIX Protocol which is used.

At the time of this writing the latest version is FIX 5.0 although
most current production systems use older versions 4.x (4.4 being
the last).

FIX messages are grouped into two categories:


Admin messages: Connection establishment and termination,
heartbeat messages etc. (logon, logoff, heartbeat,
test request, resend request, reject, sequence reset,
...)
Application messages: Business related message transferring trade
data etc. (advertisement, indication of interest,
news, execution report, order cancel, new order,
quote and many, many more)
12/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Message structure 2. Message structure

Every FIX message is built according to the following structure:


Message header: Contains the message type, length,
sender/receiver name, sequence number, time stamp,
...
Message body: Contains session/application specific data.
Message trailer: Contains a message checksum and an optional
signature.
The message consists of so called FIX fields which look like this:
<tag>=<value><delimiter>

The tag is a numerical identifier, the value is a string (which must


be of correct type and length for this particular tag) and the
delimiter is SOH (Start of header ASCII 0x01) which is written
as in printed messages.
Although FIX supports literally hundreds of predefined tags, there
is room for custom defined tags (field numbers 5000 to 9999).
13/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Message example 2. Message structure

The following example of a New Order Single message is taken


from [FIXML 00][p. 8]:
8=FIX.4.1^9=0235^35=D^34=10^43=N^49=VENDOR^50=CUSTOMER^
56=BROKER^52=19980930-09:25:58^1=XQCCFUND^11=10^21=1^
55=EK^48=277461109^22=1^54=1^38=10000^40=2^44=76.750000^
59=0^10=165

Header: 8 (version), 9 (body length), 35 (MsgType), 34


(MsgSeqNum), 43 (PossDupFlag), 49
(SenderCompID), 115 (OnBehalfOfCompID), 56
(TargetCompID), 52 (time stamp)
Body: 1 (Account), 11 (ClOrdID), 21 (HandInst), 55
(Symbol), 48 (SecurityID), 22 (IDSource), 54 (Side),
38 (OrderQty), 49 (OrdType), 44 (Price), 59
(TimeInForce)
Trailer: 10 (Checksum)
14/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Message types 2. Message structure

The FIX Protocol supports many different message types some


of these are shown in the following:
0: Heartbeat
1: Test request
2: Resend request
3: Reject
4: Sequence reset
5: Logout
6: Indication of interest
7: Advertisement
8: Execution report
9: Order cancel reject
A: Logon
B: News
C: Email
D: Order single
E: Order list
15/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIXML 2. Message structure

The very same message may also be formatted using FIXML


(unfortunately FIXML is not in widespread use)4 :
<?xml version=1.0?><!DOCTYPE FIXML SYSTEM fixmlmain.dtd>
<FIXML>
<FIXMLMessage>
<Header>
...
</Header>
<ApplicationMessage>
<Order>
<ClOrdID>12345</ClOrdID>
<HandlInst Value="1"/>
<Instrument>
<Security>
<Symbol>EK</Symbol>
</Security>
</Instrument>
<Side Value="1"/>
<OrderQuantity>
<OrderQty>10000</OrderQty>
</OrderQuantity>
<OrderType>
<MarketOrder OrdType="1"/>
</OrderType>
<Currency Value="USD"/>
</Order>
</ApplicationMessage>
</FIXMLMessage>
</FIXML>

4
Cf. [FIXML 00][p. 10].
16/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIXML 2. Message structure

FIXML can even be embedded into standard FIX messages5 to


facilitate migration and maintain backward compatibility:
...
49=BROKER
56=HUB
128=INST
212=245
213=<FIXML>
<Header>
...
</Header>
<Indication>
...
</Indication>
</FIXML>
...

5
Cf. [FIXML 00][p. 12].
17/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIXML or not FIXML? 2. Message structure

+:
FIXML can be parsed with any XML parser.
FIXML allows automatic message validation.
FIXML is more human readable compared with
traditional FIX.
FIXML can be processed by various middlewares
etc.
:
FIXML needs much more bandwidth than the
traditional FIX Protocol.
Parsing (and especially validating) FIXML takes
way more CPU resources than processing
traditional FIX messages.
Still only a few parties use FIXML.

18/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Further reading 2. Message structure

[Shaik 10] contains a wealth of practical examples of FIX


messages ranging from single orders to order cancel/replace
etc.
Some example heartbeat and IOI FIX messages can be found
at http://fixprotocol.org/specifications/
TechResources-Examples

19/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


3. Choosing a network

Network

20/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Network model 3. Choosing a network

Communication using the FIX Protocol has the following


properties:
It is session based and thus point to point from a logical
perspective.
Communication partners act according to one of these roles:
Initiator: Initiates a communication by sending a logon
message and ends it with a logout message
this is the client.
Acceptor: Receives a login request, validates it and
establishes the connection this is the server.
The FIX protocol implements a session layer.
Messages are identified by sequence numbers. These are used
for resend or reject requests and the like.
Normally new sessions start with sequence number 1.

21/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Choosing a network 3. Choosing a network

FIX is rather network agnostic in that it supports a wide variety of


network models. Basically there are four network architectures to
choose from:
Leased line: In this case a leased line is employed between two
counter parts the big advantage is that this line is
truly private. On the other hand this solution
becomes quickly expensive when many leased lines
and/or high data rates/low latencies are necessary.
Internet: This is the cheapest solution from a technical point
of view. The main disadvantages are stability,
bandwidth and latency issues all of these
parameters can and will vary extremely. Another
disadvantage is the need for encryption (SSL, AES
etc.).
P2P-VPN: Quite like the Internet variant but the encryption is
normally done at the router level.
Hub-and-Spoke: Here a central FIX engine will be employed in the
22/50 hub to which
FIX Protocol basics all
Prof.partners connect.
Dr. Bernd Ulmann 18-OCT-2010
4. FAST

FAST

23/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


FAST 4. FAST

FAST is the acronym for FIX Adapted for STreaming and describes
a protocol which has been developed for the one-way exchange of
data between a sender and one or multiple receivers.

To quote [FAST 06][p. 5 f.]:


FAST, at its core, is a data compression algorithm which
when properly implemented will significantly reduce bandwidth
requirements and latency between sender and receiver.
FAST ist an extension of the base FIX specification [. . . ].
FAST exists as a stand alone specification which can be used
within either broadcast or point-to-point transports.
FAST performs the compression at two levels:
Field encoding (controlled by templates which specify the
message structure)
Transfer encoding

24/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


FAST 4. FAST

The following picture shows the levels FAST operates on6 :

6
Cf. [FAST 06][p. 6].
25/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FAST 4. FAST

A typical area for using FAST is broadcast communication


where one sender distributes data to a multitude of receivers.
This is normally inplemented using so called multicasts and
UDP as the transport mechanism.
Since UDP is a connection less communication model it is
important for FAST to be employed on a frame-by-frame
basis, thus data sent and received should never span mutliple
frames.

26/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


5. FIX engines

FIX engines

27/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


FIX engines 5. FIX engines

An actual implementation of the FIX Protocol is called a FIX


engine. There is a wide variety of FIX engines available on the
market some of which are open source while the majority are
rather expensive and sometimes only usable with other systems
from a particular vendor.

For small applications it might even be an option to develop your


own FIX engine the protocol is quite simple and if you can live
without semantics checking, writing your own FIX engine could
result in a remarkable short time to market (the author would, of
course, use Perl for the implementation of such a small FIX
engine).

Selecting a FIX engine is not a simple task and involves looking at


the following criteria7 at least:
7
Cf. http://www.fixprotocol.org/implementation-guide/engine.shtml,
28.10.2010.
28/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIX engine selection criteria 5. FIX engines

What FIX versions are supported?


Are all tags you need supported?
Is the FIX engine able to run multiple FIX Protocol versions?
Does it support your asset class?
How about stability, extendability etc.?
How much throughput is possible? Which memory/CPU
requirements does the engine have?
Does the engine run in your preferred hardware/software
environment (this includes necessary databases, too)?
Do you need a FIX engine that is capable of taking care of
business logic or will you implement the business logic for your
connection(s) at the application level?
Does the vendor of your business system offer an own FIX
engine?
What about support? Are the sources available?
Are there monitoring utilities included?
29/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Anatomy of a FIX engine 5. FIX engines

The following picture8 shows the anatomy of a typical FIX engine:

8
Cf. [Northey 04][p. 8].
30/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Anatomy of a FIX engine 5. FIX engines

A FIX engine implements the FIX session level protocol and takes
care of things like logon, log out, sequence numbering, message
resend requests etc. A typical login scenario looks like this9 :

9
Cf. [Northey 04][p. 12].
31/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Anatomy of a FIX engine 5. FIX engines

At logon time the sequence number is checked - if it is too high,


something has been lost and has to be resent etc.10 :

10
Cf. [Northey 04][p. 16].
32/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Anatomy of a FIX engine 5. FIX engines

Dealing with a sequence number being too low results in closing


the connection11 :

11
Cf. [Northey 04][p. 17].
33/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Anatomy of a FIX engine 5. FIX engines

During an established session heartbeat packets are exchanged in


regular (definable) intervals to make sure that the connection is
still valid12 :

12
Cf. [Northey 04][p. 20].
34/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Anatomy of a FIX engine 5. FIX engines

In addition to this test requests are supported13 :

13
Cf. [Northey 04][p. 23 f.].
35/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Anatomy of a FIX engine 5. FIX engines

Handling a logout request works like this14 :

14
Cf. [Northey 04][p. 27].
36/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
Available FIX engines 5. FIX engines

The following list of FIX engines is far from being complete


nearly every software vendor in the financial sector has its own FIX
engine the following entries just serve as examples:
FIX Antenna C++:
http://b2bits.com/trading solutions/fix engine cpp.html
(also available for Java and .NET)
QuickFIX: A free production quality FIX engine implementation
(see http://www.quickfixengine.org/).
QuickFIX/J: Quite the same as QuickFIX but completely Java
based (see http://www.quickfixj.org/).
VersaFix: An open source .NET based FIX engine,
implemented in C# (see
http://sourceforge.net/projects/versafix/).
UL FIX: Yet another free FIX implementation (cf.
http://www.ullink.com/index.php?page=free fix engine).

37/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Testing 5. FIX engines

After you have chosen a FIX engine to be used and integrated it


into your existing environment, you have to test it prior to use it in
a production environment.

Most communication partners like Bloomberg etc. require the


following tests to be performed successfully with their support
before you will be allowed to communicate with them via FIX:
Connectivity testing: Basic connectivity, reconnect in case of errors
etc. ( 10%)
Session level testing: Are the generated messages valid and
compatible with your communication partner etc.
( 10%)
In addition to that you will need more tests inhouse:
FIX/OMS (order management system) tests: 40%
Integration testing: 40%

38/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Session level testing 5. FIX engines

Session level tests normally include the following scenarios15 :


Stopping heartbeat on client and/or host to simulate a flaky
connection.
Send messages with sequence numbers being too high and too
low and check the response of the FIX engines.
Check how the FIX engines deal with messages they have
missed (or think they have missed).
...

15
Cf. [Johnson, Rhodes 01][p. 32].
39/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIX/OMS testing 5. FIX engines

Typical test scenarious from the business level viewpoint are the
following16 :
Orders:
Test all required parameters and their domains
(numerical values, strings containing special
characters, date/time values, . . . ).
The same tests are required for optional
parameters.
Test optional order types like Stop or Stop Limit
etc.
Cancels:
Simple cancel.
Cancel after a Partially Filled.
Partially filled while pending cancel.
Unsolicited cancels etc.
16
Cf. [Johnson, Rhodes 01][p. 30].
40/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
6. FIX tools

FIX tools

41/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


FIX tools 6. FIX tools

FIXForge FIX Dictionary:


http://www.onixs.biz/tools/fixdictionary/
FIXimate FIX Dictionary: This is the ultimate resource for digging
deeper into FIX message of various versions (see
http://www.fixprotocol.org/FIXimate3.0/).
FIXopaedia: http://btobits.com/fixopaedia/index.html
FIXwiki: http://fixwiki.org/fixwiki/FIXwiki
Mini-FIX: This is a handy Windows tool which implements a
simple FIX client/server with a simple GUI. Mini-FIX
has been proven to be very valuable during
development of FIX based interfaces etc. (see
http://69.64.38.175/).
ValidFIX: This is a free online tool for inspecting FIX messages
as well as logs produced by FIX applications (see
http://www.validfix.com).
42/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010
FIXForge 6. FIX tools

43/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


FIXimate 6. FIX tools

44/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


FIXopaedia 6. FIX tools

45/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


FIXwiki 6. FIX tools

46/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Mini-FIX 6. FIX tools

47/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


7. Thank you

Thank you for your interest.

The author would also like to thank Dr. Reinhard Steffens for his
support and proof reading.

48/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


8. Bibliography

Bibliography

49/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Bibliography 8. Bibliography

[FAST 06] A Basic Users Guide to Implementing The FAST


Protocol, Version 1.0, January, 2006, http://www.fixprotocol.
org/documents/2301/A%20Basic%20Guide%20to%20
FAST%20v1.0.pdf, requested October 31th, 2010
[FIXML 00] FIX AND XML: FIXML, http://www.fixprotocol.
org/documents/646/FIXSession-New.pdf, requested
28.10.2010
[Hong Kong 00] Financial Information eXchange General
Conference, Hong Kong, March 30, 2000,
http://fixprotocol.org/documents/627/
[Johnson, Rohdes 01] Sam Johnson, David Rhodes, FIX/FIXML
implementation

50/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010


Bibliography 8. Bibliography

[Northey 04] Jim Northey, Introduction to FIX The FIX Session


Layer, http://fixprotocol.org/documents/742/
FIX Session Layer rev1.ppt, requested Oct. 31th, 2010
[Shaik 10] Khader Shaik, FIX Protocol One Day Course,
http://www.ksvali.com/wp-content/uploads/2009/02/
fix 1day allsections.pdf, requested 28.10.2010

51/50 FIX Protocol basics Prof. Dr. Bernd Ulmann 18-OCT-2010

You might also like