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
75 4 6 6

How to get the common and preferential market cap (and stock history) separately?

Hello,

First, I have retrieved a list with all STOXX 600 firms with the following code:

# download data into pandas dataframe
all_equity, e = ek.get_data(0#.STOXX, ['TR.ISIN','TR.CommonName','TR.ICBIndustry',
                                       'TR.ICBSupersector', 'TR.ICBSector',
                                       'TR.ICBSubsector'])

I need, for a research project, the market cap and stock prices of the common stock and preferred stock separately. Is it possible, to modify the STOXX 600 query, to get a RIC for the common stock and for the preferred stock?

Or is it possible to retrieve the common / primary stock market cap and stock price history for each RIC somehow? To my current knowledge, is the stock price history linked to the RIC and the market cap always retrieved as a sum of common and primary stocks. And if the RIC for the common stock is used, then the stock price for the common stock is retrieved.


Thank you for your help!

pythonpython apiprice-history
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.

Upvotes
Accepted
14.9k 32 5 10

hi @Statistik Dude ,

Regarding the answer in the ticket, formulas below are provided

  • Company Market Cap
    • Excel Formula
      =TR("VOWG.DE","TR.CompanyMarketCap(ShType=DEF)","SDATE=1D CH=Fd RH=IN Scale=6 Curn=Eur")
    • Python Code
      df, err = ek.get_data('VOWG.DE','TR.CompanyMarketCap(ShType=DEF)',{'SDate' : '1D', 'Scale': '6', 'Curn' : 'Eur'})
      df
  • Issue Market Cap
    • Excel Formula
      =@TR("VOWG.DE","TR.IssueMarketCap","SDATE=1D CH=Fd RH=IN Scale=6")
    • Python Code
      df2, err = ek.get_data('VOWG.DE', 'TR.IssueMarketCap', {'SDate' : '1D', 'Scale' : '6'})
      df2

The output are as below

1654774607961.png

1654774583607.pngHope this helps


1654774607961.png (6.7 KiB)
1654774583607.png (26.8 KiB)
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.

Upvotes
14.9k 32 5 10

hi @Statistik Dude ,

This forum is more for programming-type queries, rather than content queries. I would recommend you to contact the Eikon support team directly via MyRefinitiv. You can ask for the =TR formula in the Eikon Excel which can be used to retrieve this report and if the formula is available, we can apply it to the get_data method in Eikon Data API. That way a content specialist can work closely with you to find a way to get the required data.

However, for this case, I've raised ticket number 11282964 to a content specialist team to confirm if it is possible to retrieve the data using Eikon Excel or Eikon Data API. They'll contact you soon if there's any information required.

Hope this could 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.