When I search for active equities for the Johannesburg Stock exchange via the Advanced Search Tools I get 496 instruments.
The following screener expression:
exp = 'SCREEN(U(IN(Equity(active,public))), IN(TR.ExchangeMarketIdCode, XJSE))' dfxjse, e = ek.get_data(exp, ['TR.RIC','TR.ExchangeMarketIdCode','TR.InstrumentType','TR.InstrumentTypeCode'])
I get 573 issues - exactly the same as with the excel screener:
=TR("SCREEN(U(IN(Equity(active,public))), IN(TR.ExchangeMarketIdCode,""XJSE""))","TR.RIC;TR.CommonName;TR.ExchangeCountry;TR.CLOSEPRICE;TR.IsPrimaryQuote;TR.IsCountryPrimaryQuote;TR.IsCompositeQuote;TR.IsPrimaryInstrument","RH=In CH=Fd")
Why would this be? The screeener expression excludes MANY equities that should DEFINATELY be included i.e. BHPJ.J, RAVJ.J etc.
Also using the python screener with:
'SCREEN(U(IN(Equity(active or inactive,public)))....'
or excel screen with :
=TR("SCREEN(U(IN(Equity(active or inactive,public))),.....
Has NO Effect - yet if the Advanced Search Tool UI is used with active deselected we get 2806 instruments.
How do i programmatically get a list of ALL active equity instruments for an exchange that would mimic or at least encapsulate the list returned form the Advanced Search Tools UI?
How to get a list of inactive/delisted equities for an exchange? If the screener is adjsuted to filter by TR.ExchangeCountryCode it finally returns delisted RICs but thir TR.ExchangeMarketIdCode is set to NULL?!?!?!?! WHY?
Dual listed stocks like BHPJ.J and RAVJ.J are by default excluded from the results returned by Screener. To include them you need to check Include Dual Listings checkbox when editing the Include clause under the Universe in Screener GUI, which will modify screener expression from "SCREEN(U(IN(Equity(active,public)))..." to "SCREEN(U(IN(Equity(active,public,countryprimaryquote)))..."
The discrepancy in the results returned by Advanced Search and the Screener is due to several factors. The criteria you selected in Advanced Search include equity futures and prefs. But they exclude ETFs, which are included in the Screener.
The Screener can only screen against current values of any filters. See the discussion on this thread. TR.ExchangeMarketIdCode is set to NULL for delisted stocks because these stocks are presently not listed on any exchange.
If you have any further questions or would like to report any issues regarding the functioning and capabilities of Advanced Search and/or Screener in Eikon, the best resource for this is Refinitiv Helpdesk, which you can contact by either calling the Helpdesk number in your country or by using Contact Us capability in your Eikon application.
@Alex Putkov. Thank you so much for your response. The change in the Equity filter provides me what I need to go forward with my analysis. I very much appreciate your time in this regards.
I have sent ticket to Refinitiv to query the inactive search. Should I receive positive feedback I will post it here.
The setting of the TR.ExchangeMarketIdCode to NULL is frustrating for countries where there is more than one exchange so using TR.ExchangeCountryCode becomes problematic - guess that is not the intended use case for this endpoint. Just wish there was a way to duplicate the results of the Adv Search Tools when active is deselected!
Again - thanks Alex