question

Upvotes
1 0 0 2

How to get Refinitiv Contributor Curves using rd.get_data or rd.get_history?

Hi,

Can we use the RD library to get the data, I need to generate a forward curve for these products (Look screenshot) as of 12/29/2023, which means I require data spanning 5-10 years. It should start from January 2024 to whatever the end date is for the curve.


For example, how do I access this data for 12/29/2023? This would include RICs that are expired right now—January, February, and March—and unexpired RICs. How would I programmatically access this curve for 12/29/2023 using the RD library, possibly with rd.get_data or rd.get_history?


1714490667298.png

1714490656348.png


#product#contentcommoditiesenergy
1714490656348.png (74.4 KiB)
1714490667298.png (220.0 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.

1 Answer

· Write an Answer
Upvotes
80k 257 52 75

@anurag.rathore

Thank you for recahing out to us.

To use the get_data or get_history methods, you need to know instrument codes which could be RICs.

You can use the search API in the Refinitiv Data Library for Python to search for RICs. For example, the following code searches RICs in the 0#ULSDCAL: chain RIC.

df = rd.discovery.search(
    view = rd.discovery.Views.SEARCH_ALL,
    filter = "PrimaryChainRIC eq '0#ULSDCAL:'",
    select = "DocumentTitle,RIC,PrimaryChainRIC,ExpiryDate",
    top = 1000)
df

1714711038033.png

Then, you can use RICs with the get_history method.

rd.get_history(["ULSDCALQZ3^2"])

1714711097846.png

You can refer to the examples on GitHub.



1714711038033.png (53.0 KiB)
1714711097846.png (31.7 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.

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.