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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikon
icon clock
10 |1500

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

1 Answer

Upvote
Accepted
6.7k 8 6 7

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea