For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
Hi,
I'm trying to replicate the following table using Eikon Python API:
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):
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,
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.
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
I hope this could help