question

Upvotes
Accepted
11 1 1 6

Extracting All Canadian Preferred Shares Using Refinitiv Data Platform

Hello,

I'm looking for the syntax to pull all Canadian Preferred Shares using the Search function in RDP. I'm interested in the following fields:

- volume

- shares outstanding

- CFI

- LEI/CUSIP/ISIN

- RIC


This is the code I currently have at the moment that does not pull anything:

filterStr = "RCSCountryLeaf eq 'Canada' and RCSAssetCategoryLeaf xeq 'Preferred Share'"srchfields = "Country, RIC, FullName, CommonName,CompanyName, SeniorityType, NativeIdentifier, DerivedCategory, OriginalIssueCurrency, ParentIndustrySector, CouponCurrency, CouponTypeDescription, CFI"GroupSize = 10000 #max at 10000 data = rdp.search(view=rdp.SearchViews.EquityInstruments, filter=filterStr, top=GroupSize, select=srchfields)


Any help is greatly appreciated, I can't find too much official documentation on this topic

Regards

rdp-apirefinitiv-data-platform
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.

Upvote
Accepted
38.1k 71 35 53

@cchen01

The RCSCountryLeaf field is not available in the rdp.SearchViews.EquityInstruments view. You need to use RCSIssuerCountryLeaf instead.

filterStr = "RCSIssuerCountryLeaf eq 'Canada' and RCSAssetCategoryLeaf xeq 'Preferred Share'"
srchfields = "RCSIssuerCountryLeaf, RCSAssetCategoryLeaf, Country, RIC, FullName, CommonName,CompanyName, SeniorityType, NativeIdentifier, DerivedCategory, OriginalIssueCurrency, ParentIndustrySector, CouponCurrency, CouponTypeDescription, CFI"
GroupSize = 100 #max at 10000 
data = rdp.search(view=rdp.SearchViews.EquityInstruments, filter=filterStr, top=GroupSize, select=srchfields)
data

The output is:


1625726966642.png

You can view all available fields in the rdp.SearchViews.EquityInstruments view by using the following code.

rdp.get_search_metadata(view=rdp.SearchViews.EquityInstruments)

1625726966642.png (68.3 KiB)
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.

Upvotes
11 1 1 6

Hi @jirapongse.phuriphanvichai

After implementing this code, I pull a dataframe the size of [372 x 6]. Using the search app in Eikon, it pulls 4,566 preferred shares.

1625781801223.png

Is there a reason why RDP SearchView only pulls 372 entries?


Thanks


1625781801223.png (315.7 KiB)
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.

Upvotes
38.1k 71 35 53

@cchen01

From my checking, the EquityInstruments view doesn't have this RIC: AGQPF.PK.

Therefore, you can try the EquityQuotes view instead.

filterStr = "RCSIssuerCountryLeaf eq 'Canada' and RCSAssetCategoryLeaf xeq 'Preferred Share'"
srchfields = "RCSIssuerCountryLeaf, RCSAssetCategoryLeaf, Country, RIC, FullName, CommonName,CompanyName, SeniorityType, NativeIdentifier, DerivedCategory, OriginalIssueCurrency, ParentIndustrySector, CouponCurrency, CouponTypeDescription, CFI"
GroupSize = 10000 #max at 10000 
data = rdp.search(view=rdp.SearchViews.EquityQuotes, filter=filterStr, top=GroupSize, select=srchfields)
data

It returns 7015 rows.

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