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 /

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by tiago.m · Feb 18 at 02:55 PM · eikon-data-apihistoricaleconomic-data

Retrieve Historical Economic Data With Release Date Python API

Hi,

I'm trying to replicate the following table using Eikon Python API:

1645195824808.png

When I download it, in addition to reference point time series (first column above), I also get a worksheet with First Release Data (second column):

1645195896569.png

It is very important when performing backtests to avoid look-ahead bias, which is almost always the case when dealing with monthly economic data.

How am I able to replicate the table in the first image for not only this specific Brazil CPI series, but any economic data (=ECI) using Python API?

Thanks in advance,

1645195824808.png (142.9 KiB)
1645195896569.png (27.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.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jonathan.legrand · Feb 21 at 06:44 PM

Hi @tiago.marchiore,


Would you happen to have Datastream DSWS? If so, does the below provide you with the nessesary data?


df1 = ds.get_data(tickers="<BRCPIY=ECI>", # Datastream Mnemonic "BRCPW.%YR",
                 fields=["DS.NDOR1", "DS.NDOR2", "DS.NDOR3", "DS.NDOR4", "DS.NDOR5", "DS.NDOR6", "DS.NDOR7", "DS.NDOR8", "DS.NDOR9", "DS.NDOR10", "DS.NDOR11", "DS.NDOR12"],
                 kind=0)  # ' kind=0 ' is needed here as we are looking for static data that doesn't change with time.


1645468821865.png



1645468821865.png (29.5 KiB)
Comment
tiago.m
Jirapongse

People who like this

2 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
tiago.m · Feb 24 at 11:08 PM 0
Share
DATASTREAM indeed solved my problem. You can access PIT (point in time) series for economic data, using the fields "REL1" for first release value and "DREL1" for first release date. Thanks!
avatar image
REFINITIV
Answer by raksina.samasiri · Feb 22 at 04:18 PM

hi @tiago.marchiore ,

The code below can be used to retrieve the first release data.

However, refer to the answer in this thread, the original release date cannot be retrieved using Eikon Data API but it could be retrieved using Datastream DSWS as mentioned by Jonathan in the comment above.

import eikon as ek
ek.set_app_key('#### YOUR VALID APP KEY ####')

df=ek.get_timeseries(['BRCPIY=ECI'],start_date='2019-03-01',end_date='2022-02-20',interval='monthly')
df

1645545954572.png

I hope this could help


1645545954572.png (48.5 KiB)
Comment
jonathan.legrand

People who like this

1 Show 0 · 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.

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 >
11 People are following this question.

Related Questions

Trying to fetch Close Bid Price for CMO tranche from Python

How to pull historical Economic Indicator?

TR.OPENPRICE, TR.HIGHPRICE, TR.LOWPRICE, TR.SETTLEMENTPRICE returning NaN for ESU0

Historical Component Stocks of s&p 500 Index

Time series of economic events using Python API

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • FX Venues
    • FX Trading – RFQ Maker
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • Yield Book Analytics
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges