question

Upvotes
Accepted
2 0 0 2

How to retrieve bond data using a huge list of Tickers?

Using Eikon API, I extracted a huge list of Tikers, which contains all green bond issuers before 2023 (n=2370). The following is the command I used.

response=search.Definition(
    view = rd.discovery.Views.GOV_CORP_INSTRUMENTS,
    top=8172,
    filter = "((DbType eq 'GOVT' or DbType eq 'CORP' or DbType eq 'AGNC' or DbType eq 'OMUN' or DbType eq 'OTHR') and (IsGreenBond eq true and IssueDate lt 2023-01-01))",
    select = "RIC,IsGreenBond,DBSTicker,ISIN"
).get_data()

df = response.data.df.sort_values(by='DBSTicker')
df=(
    df
    .sort_values (['DBSTicker'])
    .drop_duplicates(['DBSTicker'],keep='first')
)
df=df['DBSTicker']
print(df)

I would like to retrieve a list of all bonds issued (2004-2022) by all green bond issuers using the list of Tickers I extracted. Is there any good way without retrieving a bond list of each issuer one by one.

#contentbondssearch
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.

Upvote
Accepted
1.5k 5 3 6

Hi @haruo.ogawa

You can try the below but you would still need to add some additional filters as the response contains 2m+ results.

tickers = "'"+"' '".join(df.tolist())+"'"

response=search.Definition(
    view = rd.discovery.Views.GOV_CORP_INSTRUMENTS,
    top=10,
    filter = f"DBSTicker in ({tickers}) and IssueDate lt 2022-12-31 and IssueDate gt 2004-01-01",
    select = "RIC,IssueDate"
).get_data()
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.

The code works very well! Thank you so much!
Upvotes
1 0 0 0

To retrieve bond data using a large list of tickers, consider using financial data APIs like Bloomberg, Morningstar, or Yahoo Finance. cox customer support billing These platforms allow batch processing of multiple tickers for efficient data retrieval. Additionally, you can use Python libraries such as pandas with yfinance or requests to automate the process, ensuring you handle large datasets effectively.


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.