Whisperer Enterprise honours the implied precision of all prices and quantities passed between Client and Venue.
This is achieved by setting mantissa and exponent values for the relevant SBE datatypes (DecimalQtyNULL and PriceNULL) such that the original value is preserved exactly.
A feature of FIX protocol interfaces (vs binary APIs) is that they involve an integer to string conversion when constructing the message. The way this is performed varies not only across venues, but also across individual fields or message types. The net result is that trailing zeros for a fractional component may not always be published, so that a price could move between "1.1999" and "1.2", vs the "1.2000") that would be most consistent. |
Note that DecimalQtyNULL and PriceNULL may both be used to represent negative values:
|
Examples below:
| Value | Mantissa | Exponent |
|---|---|---|
| 1.2345 | 12345 | -4 |
| 1.23 | 123 | -2 |
| 1.2300 | 12300 | -4 |
| 123.00 | 12300 | -2 |
| 0.0001234 | 1234 | -7 |
| 1000000 | 1000000 | 0 |
| 1567234.56 | 156723456 | -2 |
| -0.01 | -1 | -2 |
| -500000 | -500000 | 0 |
| 0 | 0 | 0 |
| 0.0000 | 0 | -4 |
These datatypes differ from the equivalents defined in The Whisperer Classic SBE3 Schema, which defines fixed scalings for each. |
In PreviouslyQuoted sessions, it is important that the client takes care to provide both of the following in their NewOrderMultileg messages:
PriceLegPriceThere is a surprising amount of variation across Venues regarding Maker pricing - not just the required precisions that prices must be published to, but also how much looseness they allow across individual components. In order to guarantee a uniform interface, MarketFactory essentially has to adopt, and enforce, the strictest rules.
To assist this, the Whisperer Enterprise SBE Schema requires that forward points be expressed in a pip-based (scaled) form, rather than arithmetically (unscaled) - this enables run-time inference of the location of the pip to ensure that Fwd Pts are always correctly converted to/from scaled and unscaled forms as necessary to meet specific Venue API requirements.
It should be self-evident that Spot and All-in prices must be quoted to the correct precision for a given Venue and currency pair - e.g. for EUR/USD it would typically be 5dp for Spot (1/10 pip pricing) and 7dp for All-in. The provided Fwd Pts must be consistent with this. E.g. for a EUR/USD 1M quote, we would expect a value to 3dp.
In the context of the SBE schema, this means that attention must paid to the Exponent of the individual PriceNULL fields, since when necessary, Pip location is determined by reference to the difference between All-in and Fwd Pts exponents. In particular, it is very important to ensure that quoted all-in rates are to the correct all-in precision.
Worked Example for EUR/USD - Pip location is the fourth decimal place:
| Component | Value | Mantissa | Exponent |
|---|---|---|---|
| Spot | 1.10334 | 110334 | -5 |
| FwdPts | 25.751 | 25751 | -3 |
| All-in | 1.1059151 | 11059151 | -7 |
Another example (correct):
| Component | Value | Mantissa | Exponent |
|---|---|---|---|
| Spot | 1.10334 | 110334 | -5 |
| FwdPts | 25.750 | 25750 | -3 |
| All-in | 1.1059150 | 11059150 | -7 |
Versus (wrong, as it implies pip is at the fifth decimal place):
| Component | Value | Mantissa | Exponent |
|---|---|---|---|
| Spot | 1.10334 | 110334 | -5 |
| FwdPts | 25.75 | 2575 | -2 |
| All-in | 1.1059150 | 11059150 | -7 |