Issue retreiving RICs for the SPI index

I am trying to retrieve the RICs for the SPI index using the following code:

index_id    = '0#.SPIX(2020-06-30)'
data, err   = ek.get_data(index_id,['TR.RIC']) 

This returns me nan. When I try without the date in the request as follow, it works:

index_id    = '0#.SPIX'
data, err   = ek.get_data(index_id,['TR.RIC'])

Is that because it is not possible to get historical constituents or is this because of another reason?

How then could I get historical constituents for this index? Knowing that this works for others such as .SPX, .STOXX etc...

Best Answer

  • jason.ramchandani01
    Answer ✓

    Hi @Tulkkas - thanks for your question. You are right that we do not carry historical constituents for that index but we do carry it for the SPI (0#.SSHI) which appears to have the same underlying constituents.

    index_id    = '0#.SSHI(2020-06-30)'
    data, err   = ek.get_data(index_id,['TR.RIC']) 
    data.sort_values('RIC')

    image

    index_id    = '0#.SPIX'
    data, err   = ek.get_data(index_id,['TR.RIC']) 
    data.sort_values('RIC')

    image

    I hope this can help you.