Greetings
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?