Extracting All Canadian Preferred Shares Using Refinitiv Data Platform

Options

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

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @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)

Answers

  • cchen01
    cchen01 Newcomer

    Hi @Jirapongse

    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

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @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.