Obtain both active and inactive stocks on an exchange using Datastream

Hello,

I'm trying to obtain both active and inactive/delisted stocks on a few exchanges, let's say the NYSE and Deutsche Börse. The period doesn't matter, I'll take everything and deal with that later.

I'm aware that this isn't possible on Eikon, both thanks to this thread and also from using the Screener in the Eikon application, as explained in this thread (and I've tried this myself now just to make sure).

I then tried with Datastream, and found that I can obtain the companies I need manually, via a Static Request, clicking around to filter equities, inactive, etc. build a list in Excel, and keep doing this manually until I build up the list of companies that I want. This is quite time consuming though, and I'm trying to find an equivalent way to do this using the Python API connecting to DatastreamWS.

Is this possible? Can you please explain how, using an example? I've tried looking this up in the API documentation but unfortunately cannot find how to do this.

Thank you very much in advance

Best Answer

  • @AAMZ

    I have searched this instrument (ATXWBIX) in the http://product.datastream.com/browse website. ATXWBIX is not a list so it can't return the constituents.

    image

    The list instrument should display like this:

    image

    I think that the correct instrument could be LATXWBIX|L.

    However, you need to directly contact the datastream support via MyRefinitiv to confirm LATXWBIX and verify the data of LFTSE1000820.


Answers

  • @AAMZ

    You can use the same instrument and fields in Excel with the DatastreamWS.

    Refer to the Getting started with Python, you can use the Datastream to request constituent Lists of instruments. For example:

    image

    You can append MMYY to obtain the list for that month, as mentioned in this thread.


  • Thank you very much for this answer. I'm trying to implement the formula, having also looked at the two links in the answer, however I'd need some further help:

    Implementing the following works fine, just as you wrote.

    sec = ds.get_data(tickers='LFTSE100|L',fields=['MNEM'],kind=0) 

    However, when I try to get the constituents as at August 2020 (as per the thread you indicated)

    sec = ds.get_data(tickers='LFTSE1000820|L',fields=['MNEM'],kind=0)

    I receive the same results and output date (i.e. as at 14 September 2020).


    In addition, when I try the formula above with the Vienna Stock Exchange, I do not get any results. However, this is strange because when I perform a static request using the Excel plugin, I can see all of the constituents of this index, so I know they're available.

    sec = ds.get_data(tickers='ATXWBIX|L',fields=['MNEM'],kind=0)

    Would you have any further thoughts on these two questions?

    Many thanks again

  • Thank you very much for this answer. I'm trying to implement the formula, having also looked at the two links in the answer, however I'd need some further help:

    Implementing the following works fine, just as you wrote.


    sec = ds.get_data(tickers='LFTSE100|L',fields=['MNEM'],kind=0) 

    However, when I try to get the constituents as at August 2020 (as per the thread you indicated)


    sec = ds.get_data(tickers='LFTSE1000820|L',fields=['MNEM'],kind=0)

    I receive the same results and output date (i.e. as at 14 September 2020).


    In addition, when I try the formula above with the Vienna Stock Exchange, I do not get any results. However, this is strange because when I perform a static request using the Excel plugin, I can see all of the constituents of this index, so I know they're available.


    sec = ds.get_data(tickers='ATXWBIX|L',fields=['MNEM'],kind=0)

    Would you have any further thoughts on these two questions?

    Many thanks again