Is it possible to retrieve the historical constituents of the ACWI index using Python?

AGBC
AGBC Newcomer
edited January 24 in Eikon Data APIs

Our main challenge has been downloading the constituents of the MSCI ACWI index, whether current or historical, as both are crucial for our objective. Unfortunately, we have been unsuccessful despite multiple attempts. Below are the details of our efforts:

Code Attempt 1:

import refinitiv.data as rd

from refinitiv.data.discovery import Chain

fchi = Chain(name="ACWI.L")

print(fchi.constituents)

  • With .MXACW, I received the following error:
    Error code NotEntitled | Access Denied: User req to PE(9908)
  • With ACWI.L and ACWI.O, the request remained loading indefinitely without results.

Code Attempt 2:

ric = '.FTSE'
initial_constituents = rd.get_data(universe=[f"0#.{ric}(20240101)"],fields=["TR.PriceClose"],parameters={"SDATE": '2024-01-01', "EDATE": '2024-01-01'})

initial_constituents = initial_constituents['Instrument'].to_list()

While this worked for the example RIC provided, .FTSE, it did not work for any of the following RICs I tested:

  • ACWI.L
  • ACWI.O
  • .MXACW
  • 0#.MXACW
  • 0#.ACWI.O
  • 0#.ACWI.L

Forum Example Attempt:

I also tried an example from the Developer Forum, but unfortunately, it was unsuccessful as well.

link: link_to_forum

I would sincerely appreciate your guidance on how to correctly retrieve the constituents of the MSCI ACWI index, both current and historical.

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @AGBC

    Thank you for reaching out to us.

    First, you need to contact the content support team via MyAccount for chain RICs of MSCI ACWI index. Then, check that if those chain RICs can provide historical constituents.

    I found 0#.dMIWD00000PUS which is MSCI ACWI PR USD and it works with the Chain code.

    chain = Chain("0#.dMIWD00000PUS")
    chain.constituents
    

    This chain contains 2642 items. However, I can't retreive historical constituents of this chain RIC.

    Please contact the content support team directly to confirm this.

  • Hello @AGBC

    I have reviewed the question. Please see my investigation below.

    Firstly, I checked the ACWI.L and ACWI.O RICs. They are not look like the Chain RIC to me. I do not think you can use these RICs with the Library's Chain function.

    acwi_1.png acwi_2.png

    The Chain RIC should contain only constituents information like name, but not value like the following Chain RICs examples: 0#.SETI (Thai Stock Exchange Chain RIC) and 0#.HSI (Hong Kong Hang Seng Index Chain RIC)

    chain_1.png chain_2.png

    Secondly, I cannot find the 0#.MXACW, 0#.ACWI.O, 0#.ACWI.L RICs on the Workspace platform. I strongly suggest you contact the Workspace Content Support team to verify if they are the Chain RIC of the data that you need.

    You can contact the team via https://myaccount.lseg.com/en/productsupport website.

    contact_workspace_content_support.png

    Thirdly, the error message "Error code NotEntitled | Access Denied: User req to PE(9908)" when you are trying to request the .MXACW RIC indicates that you do not have a permission to request this RIC from Workspace.

    Please contact your LSEG account manager to verify your permission.

    I did a quick test with https://developers.lseg.com/en/api-catalog/lseg-data-platform/lseg-data-library-for-python

    import lseg.data as ld
    ld.open_session()
    
    ld.get_data(
    	universe=['ACWI.L', 'ACWI.O','.MXACW'],
    	fields=['TR.PriceClose'],
    	parameters= {"SDATE": '2024-01-01', "EDATE": '2024-01-01'}
    )
    

    The result is as follows:

    code_1.png