Additional digits seen on price fields with RFA build app
Hi fellow developers,
We have build a RFA application and sometimes it generates prices for fields like BID or TRDPRC_1 with additional unexpected digits for equity instruments, for example 20.299999 or 20.290001 while the tic size is fixed at 0.005 by the exchange so we should never expect these additional digits that look like roundings somewhere in the RFA application. We are only not aware of any rounding being done in the coding itself.
Other test apps like example or Eikon does not show these additional digits, so the data coming from exchange / Thomson Reuters does definitely not contain these additions.
Does anyone have an idea in which part of the RFA decoding this could occur?
Or has anyone else seen this before and know what can be done to correct this?
Regards
Albert
Best Answer
-
This could be a limitation of IEEE 754 of floating-point
arithmetic. In computing, floating point is a method of representing an
approximation of a real number in a way that can support a trade-off between
range and precision. For example, if we directly assign 9605.4 to a double
variable, the value in memory of that variable is 9605.3999999999996.This is also mentioned in RFA C++ Developer Guide.
Note:
OMM preserves the precision of encoded numeric values. Note that some conversions from OMM numeric types to primitive types (e.g., Real to Float) may result in a loss of precision. This is a case of a narrowing precision conversion. Also note that because the IEEE Standard for Floating-Point Arithmetic (IEEE 754) cannot represent some values exactly, rounding may occur when manually converting from the OMM representation to other data types, or converting via the provided utility methods.
In cases where precision may be lost, converting to a string or using provided string conversion
helper as an intermediate point can help avoid the rounding precision loss.Moreover, the application must verify if the value of data is blank (isBlank()) before accessing the data.
If you have any further question, please let us know the following information.
- The version of RFA used by the application, such as RFA C++ 8.0.0.L1
- The RFA interface that the application is using MD or OMM interface
- The RIC that cause this issue
- The snippet code that the application uses to retrieve the price data
0
Answers
-
Thanks Jirapongse, it was exactly where the issue was appearing in the conversion from real64 to double / float, just like you mention. Your answer helped our developer to change his code so no rounding does happen any more.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛