Hi,
I'm interested in retrieving historical joiners and leavers for stock exchanges. I've gone through a number of Q&As and am aware that there is functionality to obtain historical joiners and leavers for the main stock INDICES, but I wanted to know if the same exists for stock EXCHANGES.
For example, the code below (adapted from the screener tutorial (Tutorial #9) on github) returns several results for French companies, including the Name, Code, Ticker, and Market Identifier Code of the respective exchange that each company belongs to.
screen_p1 = "U(IN(Equity(active,public,primary))/
UNV:Public
/), "
screen_p2 = "IN(TR.HQCountryCode,'FR'), "
screen_p3 = "IN(TR.TRBCBusinessSectorCode,'5020')"
screen = screen_p1 + screen_p2 + screen_p3
screener = ld.get_data(
universe=ld.discovery.Screener(screen),
fields=['TR.CommonName','TR.ExchangeName','TR.ExchangeCode','TR.ExchangeTicker',
'TR.ExchangeMarketIdCode','TR.PriceMainIndexRIC','TR.TRBCBusinessSector'])
As you can see from the results, for several companies (e.g. ALVER.PA) they belong to the 'Main Index' of this exchange (in this case, the CAC40, i.e. Main Index RIC: .FCHI). However, I'm interested in understanding when these specific companies joined or left the Paris Stock Exchange. So, my questions are:
- Using the Python API and LDL, is there a way to obtain the historical joiners and leavers of a specific stock EXCHANGE, using the tickers/codes returned above (or maybe other tickers/codes that I'm not aware of?)
- If there is not such a way, would you by any chance know:
- the fields (via the Python API) that would help me identify when the firm (or instrument, at least) began trading on the exchange (also the IPO date, where applicable)?
- the field that displays when the firm (or instrument, at least) ceased trading (I know the instrument name sometimes includes text like 'DEAD' or 'DELIST', but I was hoping that there might be a specific TR.XYZ field to look this up more cleanly than relying on 'text' descriptions).
- The code above returns some apparent inconsistencies between exchange tickers and codes—could you help me understand what is the reason for it? For example, the following instruments (ALVER.PA; ALAGP.PA; WAGA.PA; ALHAF.PA) all belong to the Paris Stock Exchange (based on the 'Exchange Name' field), but then 3 of these 4 instruments (ALVER.PA; ALAGP.PA; ALHAF.PA) have the same value for the 'Exchange Market Identifier Code' (ALXP) while 1 instrument (WAGA.PA) has a different value for the 'Exchange Market Identifier Code' (XPAR).
In case further context is useful: I'm doing research not only on the largest companies in a stock exchange (which tend to be included in the 'Main Index'). This is why I'm so interested in all companies on a stock exchange and not just the largest companies on that exchange. Second remark: I have many stock exchanges to look at, so doing the above manually isn't an option for me.
A big thank you in advance for your help!