Get rics of curves

Hi Everyone

I am trying to source RICs of particular swap curves - for example USDOIS=TWED or 1#USDOIS=TWED.
Does anyone know how to get all RICs which are related to this curve via ek.get_data() in Python, like USD1MOIS=TWED, USD2MOIS=TWED, etc? So for all tenors.


Thanks

Jurij

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @jurij.reichenecker

    You can try the code mentioned in this thread.

    LONGNEXTLR = 'USDOIS=TWEB'
    fields = ['LONGLINK{}'.format(x) for x in range(1, 15)]
    fields.append('LONGNEXTLR')

    all_components = []

    while LONGNEXTLR!='':
        df,e = ek.get_data(LONGNEXTLR,fields)
        LONGNEXTLR = df.iloc[0]['LONGNEXTLR'] if pd.notnull(df.iloc[0]['LONGNEXTLR']) else ''
        for x in range(1, 15):
            currentField = 'LONGLINK{}'.format(x)
            all_components.append(df.iloc[0][currentField]) if pd.notnull(df.iloc[0][currentField]) else None
            
    df,e = ek.get_data(all_components,['DSPLY_NAME','PRIMACT_1'])
    df

    The output is:

    image

Answers

  • Great thanks that works.

    Follow-up Question: I didn't know that "Longlink" exists. Can you tell me where I can explore more about such features?
  • @jurij.reichenecker

    The LONGLINK fields are available in chain RICs. Chains are used to hold instrument names that have a common association. For more information, please refer to this article. You can use Eikon Quote App with "Display All Fields" to verify the format of chain RICs.

    image

    Chain RICs are prefixed with 0# and they can be internally expanded by Eikon Data APIs. However, this could be an exception.

  • any RIC from REFINITIVE which tenor is more than 2 years? currently the max tenor is 2Y.