Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted

How do we get the historical credit spread for 0#AAGBPBMK=?

"Invalid RIC" error in Eikon Phython API RIC: 0#AAGBPBMK= RIC = "0#AAGBPBMK=" ek.get_timeseries([RIC], fields = "TR.CREDITSPREAD", start_date = start_date, end_date = end_date, interval="daily")

eikoneikon-data-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
10.1k 18 6 9

@Rachiel Angiela Barbosa Is this what you are looking for:

rics, err = ek.get_data('0#AAGBPBMK=','CF_NAME')
rics


This will give you a list of RICs for which you can then request spread data - in this case there are two chain entries that are not instruments so I exclude these by checking the last character of the RIC:

data = pd.DataFrame()

for ric in rics['Instrument'].astype(str).values.tolist():
    if ric[-1] == '=':
        df,err = ek.get_data([ric], fields=["TR.BENCHMARKSPREAD.date","TR.BENCHMARKSPREAD"], parameters={'SDate' : '2021-08-07', 'EDate': '2021-05-07', 'Frq':"D"})
        if len(data):
            data = pd.concat([data, df], axis=0)        
        else:
            data = df
data.reset_index(inplace=True)
data

Screenshot 2021-09-20 at 11.51.44.png

I hope this can help.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.