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 lorenzo.cerreta · Oct 18, 2020 at 03:16 PM · python apitimeserieseikonapiprice

Get cumulative abnormal returns

I need to estimate CAR for a bunch of bonds issuers, so I am starting by getting their closing price. I am unable to resample with a single index and get the data on different columns.

bonds, err = ek.get_data(
    df['Ultimate Parent ID'],
    ['TR.PriceClose.date', 'TR.PriceClose'],
    {'SDate': '2020-01-01',
     'EDate': '2020-10-01'})

What I get is:

I would prefer to get a single timeseries with a column for each instrument, but I am unable to rearrange the df. Should I use ek.get_timeseries instead?


capture.png (12.0 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.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by chavalit.jintamalit · Oct 19, 2020 at 05:37 AM

Hi @lorenzo.cerreta

You can use pivot() and transpose() functions from dataframe.

Here is an example:


ahs.png (40.3 KiB)
Comment
lorenzo.cerreta

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
lorenzo.cerreta · Oct 19, 2020 at 06:49 AM 0
Share

Thanks for the great answer!

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

How to obtain historical Reuters poll for an economic indicator using Eikon Python API?

Rhistory to Python conversion

Get benchmark risk free returns

HTTPError:

Python Data API - retrieving time series data for FUNDS - Performance

  • 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