Screening RICs with company names in R and Excel API

Hello, how do I screen RICs from a list of company in R or Excel? In R, it works well with one company name, but how to extend the query to 10,000 company names, for instance?

get_data(instruments = 'SCREEN(U(IN(Private(OrgType(COM,UNK,MKP)))),Contains(TR.CommonName,"AMNS Luxembourg Holding SA"))',fields=list("TR.CommonName"),debug =TRUE)

Best Answer

  • chavalit-jintamalit
    Answer ✓

    Hi @asantos2

    You can use OR operator on SCREENER syntax.

    image


    This is an example in Python: (For R you have to test it)

    image


    I do not know the maximum number of contain supported by SCREENER.

    But I do not think that it can support all 10000 name at once.

Answers

  • asantos2
    asantos2 Newcomer

    Many thanks for your prompt response! However, how can I make a reference to a list of company names in Excel cells or a dataframe in R or Python instead of adding the term or Contains(TR.CommonName, "Company Name") in the query?

  • Hi @asantos2

    You can use SCREENER app to define a syntax.

    https://developers.refinitiv.com/article/find-your-right-companies-screener-eikon-data-apispython


    Then if it is in excel, you can list the company in your excel sheet.

    And the formula can refer to your cell value in Excel.


    In R or in Python, you can store the value in variables and when you pass the screener syntax to API call, you can refer to the variable value.

    image

  • asantos2
    asantos2 Newcomer

    Many thanks. It works well in Python. I have also found out that you can download RICs in Excel with TR("SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))), Contains(TR.CommonName,'"&D3&"'))","TR.CommonName","RH=In TRANSPOSE:YES") and no double quotes in the company name in cell D3.