Custom Instruments do not appear in a portfolio's holdings when specifying a date (refinitiv.data AP
Hello,
We have a problem with the Python refinitiv.data API and custom instruments inside portfolios. We believe this is an unintended behaviour of the API that must be fixed.
We know that with the following rd.get_data() call
rd.get_data(["PORTFOLIO('"+ portfolio_code +"')"], ['TR.PortfolioShares'])
We can retrieve the holdings as of date of a given portfolio (with portfolio code variable: portfolio_code)
We are also able to specify a position date. For example, with a date defined as variable position_date (format: yyyymmdd):
rd.get_data(["PORTFOLIO('"+ portfolio_code +"', '" + position_date + "')"], ['TR.PortfolioShares'])
We are able to get the holdings of a portfolio inside PAL for any date.
This works for all instruments, except for custom assets:
If we retrieve the portfolio without specifying the position date, the custom instruments appear in the holdings (as of date).
If we specify a date, the custom instruments do not appear, and this is clearly wrong. The holdings are incomplete.
In the following screenshot, we show you the two different holdings: one without specifying the date, and the one with the current date. The holdings are, correctly, all the same, except for the fact that the custom data disappeared (note the absence of P_XS1778816436 in the second Dataframe).
We think this is an error from your end, and we ask you how we could fix this in order to correctly get the complete holdings, inclusive of custom assets, for any date. Thank you.
We include a sample code, very barebones and to the point, to replicate the issue and the above screenshot.
The following code assumes that:
- You have a defined default Refinitiv session through which you may access the Data Platform.
- You have access to a Portfolio named “TEST_PORTFOLIO”, with at least one holding date: 2023-10-11 (today’s date)
- The holding date 2023-10-11 (today’s date) of “TEST_PORTFOLIO” has at least one custom security.
Expected behaviour of the code: The script will output two identical Dataframes of today’s holdings of “TEST_PORTFOLIO”.
The first Dataframe is generated without specifying a position date in get_data().
The second Dataframe is generated by specifying a position date.
Since the position date is set at today’s date, the second Dataframe should be the exact same as the first one.
Actual behaviour: While the script correctly fetches the holdings for a precise date, it ignores the custom security. All the other instruments are correctly noted, with their correct quantities, but the custom security in the second Dataframe is missing.
import refinitiv.data as rd
import pandas as pd
portfolio_code = "TEST_PORTFOLIO"
position_date = "20231011"
rd.open_session()
print("Holdings without specified date: ")
print(rd.get_data(["PORTFOLIO('"+ portfolio_code +"')"], ['TR.PortfolioShares']))
print()
print("With specified date: ")
print(rd.get_data(["PORTFOLIO('"+ portfolio_code +"', '" + position_date + "')"], ['TR.PortfolioShares']))
rd.close_session()
Best Answer
-
According to the helpdesk support team, this issue has now been included in the list of Change Request, meaning that it is an acknowledged feature which must be developed by the Developer Team in the future.
Unfortunately, it is currently unknown when this task will be completed.
0
Answers
-
I tested it in Eikon Excel and got the same result.
I assume that it could be the problem in the Eikon backend service.
You may try to replicate this issue in Eikon Excel. If the problem also happens in Eikon Excel, please kindly contact the helpdesk support team via MyRefinitiv to verify what the problem is.
0 -
Thank you for your reply.
Indeed, it seems that we are able to replicate the issue in Eikon Excel, too, exactly as you did. We agree that it looks to be a problem related to the Eikon backend service.
We wrote in this forum because the helpdesk support team via MyRefinitiv sent us here when we first highlighted the issue to them. Nevertheless, we will contact them again with this new piece of information, hoping that this time someone will have a closer look at this wrong behaviour.I will keep this post updated once I hear back from them.
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 中文论坛