question

Upvotes
Accepted
21 1 1 2

Custom Instruments do not appear in a portfolio's holdings when specifying a date (refinitiv.data API)

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).

capture.png

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:

  1. You have a defined default Refinitiv session through which you may access the Data Platform.
  2. You have access to a Portfolio named “TEST_PORTFOLIO”, with at least one holding date: 2023-10-11 (today’s date)
  3. 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()
python#technologyrdp-api#productportfolio
capture.png (12.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

<AHS>

case number 12962028 status is still work in progress, extend the triage for a month

Hello @Nino Soscia

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Thank you for your participation in the forum. Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvotes
Accepted
21 1 1 2

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
79.2k 251 52 74

@Nino Soscia

I tested it in Eikon Excel and got the same result.

1697602312941.png

1697602334692.png

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.


1697602312941.png (42.7 KiB)
1697602334692.png (40.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
21 1 1 2

@Jirapongse

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.