Discussion Forums

FAST Extension proposal - SET
Rolf Andersson / Pantor Engineering
28 Sep 2008 3:21AM ET

All,

this is the second of four proposals announced in a previous post.
Please review and comment.
/Rolf

EXTENSION PROPOSAL - SET (multi-value string)

Background

FIX as well as other protocols make use of fields with a fixed
set of alternative values. These fields may either be single-value
(an enumerated value) or multi-value (a set of values).

Introduction

This proposal discusses an impl for multi-value fields.

Example

Let's use TradeCondition (tag 277) as an example:
(other examples are tags 276, 1031, and 1035)

[ 1] 0 = Cancel
[ 2] 1 = Implied Trade
[ 3] 2 = Marketplace entered trade
[ 4] 3 = Mult Asset Class Multileg Trade
[ 5] 4 = Multileg-to-Multileg Trade

[ 6] A = Cash (only) Market
[ 7] B = Average Price Trade
[ 8] D = Next Day (only)Market
[ 9] E = Opening/Reopening Trade Detail
[10] G = Rule 127 Trade (NYSE)

[11] F = Intraday Trade Detail
[12] H = Rule 155 Trade (AMEX)
[13] K = Opened
[14] I = Sold Last (late reporting)
[15] J = Next Day Trade (next day clearing)
[16] L = Seller
[17] M = Sold
[18] N = Stopped Stock
[19] P = Imbalance More Buyers
[20] Q = Imbalance More Sellers

[21] thru [80] omitted ...

[81] AO = Crossed (duplicate)
[82] AP = Fast Market
[83] AQ = Automatic Execution
[84] AR = Form T
[85] AS = Basket Index
[86] AT = Burst Basket
[87] AV = Outside Spread

Any combination of these 87 value could be represented using
a bit vector with 87 positions. With SBIT-enconding we get
7 bits per byte so 87 bits will require 13 bytes.

It is unlikely that a specific conversation between two FIX
parties would utilize more than a small part of the values
included in the list above. Furthermore, it's likely that
the values used will occur with different frequency. By only
including the values to be used and ordering them so that
the most frequent values get positions early in the value
space, the common case will have a short representation.

For example, let's say we want to include the following values:

[ 6] A = Cash (only) Market
[ 7] B = Average Price Trade
[ 8] D = Next Day (only)Market
[ 9] E = Opening/Reopening Trade Detail
[10] G = Rule 127 Trade (NYSE)
[11] F = Intraday Trade Detail
[12] H = Rule 155 Trade (AMEX)
[13] K = Opened
[14] I = Sold Last (late reporting)

Each of the values may be assigned a bit value and these
bit values can be mixed to give arbitrary combinations.

[ 6] A = 1 [0000001] Cash (only) Market
[ 7] B = 2 [0000010] Average Price Trade
[ 8] D = 3 [0000100] Next Day (only)Market
[ 9] E = 4 [0001000] Opening/Reopening Trade Detail
[10] G = 5 [0010000] Rule 127 Trade (NYSE)
[11] F = 6 [0100000] Intraday Trade Detail
[12] H = 7 [1000000] Rule 155 Trade (AMEX)

[13] K = 8 [0000001 0000000] Opened
[14] I = 9 [0000010 0000000] Sold Last (late reporting)

"A C" => [0000101]
"A H K" => [0000001 1000001]

(FAST encoding automatically adjusts the number of bytes
used in the wire representation and the decoding will
be able to detect how many bytes are used.)

The number of bytes needed in the wire representation is
dependent on the actual combination of values.

Optimizing The Bit Assignments

Let's assume G and H are uncommon.

Sequential assignment of the values places both G and H in
the first byte whereas the more frequent K and I would be
placed in the second byte:

Every time K or I needs to be represented, the field will be
two bytes long.

(this is similar to the pmap case of frequency of presence
and pmap position for a specific field)

By reordering G and H, and K and I, we can improve on the
efficiency of the common case:

[ 6] A = 1 [0000001] Cash (only) Market
[ 7] B = 2 [0000010] Average Price Trade
[ 8] D = 3 [0000100] Next Day (only)Market
[ 9] E = 4 [0001000] Opening/Reopening Trade Detail
[11] F = 5 [0010000] Intraday Trade Detail
[13] K = 6 [0100000] Opened
[14] I = 7 [1000000] Sold Last (late reporting)

[10] G = 8 [0000001 0000000] Rule 127 Trade (NYSE)
[12] H = 9 [0000010 0000000] Rule 155 Trade (AMEX)

Wire representation

No new representation needed.
SBIT-encoded fields will be used.

Template Syntax


  
  
  ...
  


FAST Extension proposal - SET
Rolf Andersson / Pantor Engineering   28 Sep 2008 3:21AM ET
Mutually Exclusive Values in Set
Jacob Northey / The LaSalle Technology Group   6 Nov 2008 4:59PM ET
Re: Mutually Exclusive Values in Set
Hanno Klein / Deutsche Börse Systems   7 Nov 2008 7:56AM ET
Re: Mutually Exclusive Values in Set
Jacob Northey / The LaSalle Technology Group   7 Nov 2008 8:47AM ET
Re: FAST Extension proposal - SET
Darshan Khedekar   11 Nov 2008 11:07AM ET
Re: FAST Extension proposal - SET
Darshan Khedekar   11 Nov 2008 11:16AM ET