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)
You can use OR operator on SCREENER syntax.
This is an example in Python: (For R you have to test it)
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.
You can use SCREENER app to define a syntax.
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.
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.