How to get Spread data of the product

Hi,

So I was fetching the data of the different commodities for making a historical database using the code snipet

now i have successfully fetched the contract chain of the products using that c1, c2..... nomenclature now i want to fetch the spread of those products kindly help the problem is for every product there are different contracts months

I there any function which will give the contract month on giving eg--- "LCOc1"--- it will give me "LCOU3" the current month of the contract

Best Answer

  • Hi @nitin.gupta

    You can do it with the rd library

    import refinitiv.data as rd
    rd.open_session()
    rd.discovery.search(
    view = rd.discovery.Views.SEARCH_ALL,
    filter = "RIC eq 'LCOc1'",
    select = "AliasRIC"
    )