Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by keyan.z · Apr 06, 2020 at 06:58 PM · pythonequitystock marketreturn

how to retrieve last 10 years Return On Invst Cap for a stock/equity via Python?

the circled values, would be great to indicate code to retrive these yearly values in a dataframe Thanks


Edit 07/04: Thanks @chavalit, your code works. I would be grateful to have the reply of 3 questions:

1. would need the same things for the below 5 numbers for last 10 years(yearly):

sales, EPS(earnings per share), equity(BVPS), (free) cash and total long-term debt

2. would be great to have several stocks for these values in the same df

3. Instead of replying Q1 and Q2, if there is online guide/tutorial which help me achieve above directly, it would be good too.




roic.jpg (87.3 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by chavalit.jintamalit · Apr 07, 2020 at 02:33 AM

Hi @keyan.z

You can try this code:

df,e = ek.get_data('IBM.N',
                   ['TR.F.ReturnInvstCapPct.Date','TR.F.ReturnInvstCapPct'],
                   {'SDate':'0','EDate':'-9','Frq':'Y'})
df



ahs.png (28.4 KiB)
Comment
keyan.z

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
keyan.z · Apr 07, 2020 at 02:08 PM 0
Share

Thanks your code works. I would be grateful to have the reply of 3 questions:

1. would need the same things for the below 5 yearly numbers for last 10 years

sales, EPS(earnings per share), equity(BVPS), (free) cash and total long-term debt

2. would be great to have several stocks for these values in the same df

3. Instead of replying Q1 and Q2, if there is online guide/tutorial which help me achieve above directly, it would be good too.

avatar image
REFINITIV
Answer by chavalit.jintamalit · Apr 07, 2020 at 02:43 PM

Hi @keyan.z

You can click on the ? icon to get to know the field name.


Once you know the field name, you can read this tutorial to use Formula Builder or Data Item Browser to see the field parameter.


If you cannot find the field you are interested in, you can contact Refinitiv Content Helpdesk.

From API perspective, if the data can be retrieved into Excel using =TR worksheet function, it can also be retrieved using Eikon Data APIs.

The Refinitiv Content Helpdesk can be reached using Contact Us capability in your Eikon application.
Or by calling the Helpdesk number in your country.
Or at https://my.refinitiv.com/


ahs1.png (212.8 KiB)
Comment
keyan.z

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
keyan.z · Apr 07, 2020 at 03:03 PM 0
Share

Thanks, I started to search (total) sales but I only found "sales per employee", I am lost as I am not even sure it is in that initial table

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

why can't I retrieve BVPSTotalEquity via Python and Eikon API?

Type checking in Python

Error code 429| Client error: Too many requests, please try again later. Wait for XXXXX seconds. How is this error caused and how can we prevent this error from happening?

get_data Time parameter. Python

Eikon Python API Query - How do you get the list of ASX listed stocks which have Company Guidance issued for Fiscal Year 2020?

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges