Issues pulling historical MSCI data in Eikon API
I have an issue pulling in data from MSCI World and MSCI North America from 1969 and forward.
I can easily get the data from 2016 till today, but I need the entire history
If I use the ek.get_timeseries() function it seems that I am limited in the amount of data I can retrieve.
If I on the other hand use the ek.get_data() function, I get no data from 1969 even though the Datastream Navigator says that there should be data dating back to 31/12/1969.
Are you able to assist on this?
Best Answer
-
hi @sami01 ,
According to Eikon Data API Usage and Limits Guideline, call-based limit of get_timeseries is 3,000 data points (rows) for interday intervals. This limit applies to the whole request, whatever the number of the requested instruments.
So for 2 instruments, the limit of get_timeseries is 1500 (from 3000/2) rows per call. You may call the get_timeseries function as a batch of the 1500 dates per call. The code below can be used to generate the date-ranges between start and end dates
days = 1500
start_date = datetime.datetime.strptime('1969-12-31', '%Y-%m-%d')
end_date = datetime.datetime.strptime('2000-01-01', '%Y-%m-%d')
date_list = []
start_range = start_date
while start_range < end_date:
end_range = start_range + datetime.timedelta(days=days)
if end_range > end_date:
end_range = end_date
start_end = [start_range.strftime('%Y-%m-%d'), (end_range).strftime('%Y-%m-%d')]
date_list.append(start_end)
start_range += datetime.timedelta(days=days + 1)
date_listThen you can call get_timeseries for each date range, for example,
import numpy as np
columns = ['Date']
for ric in rics:
columns.append(ric)
dfs = pd.DataFrame(columns = columns).set_index('Date')
dfs.columns.name = 'CLOSE'
for dates in date_list:
df = ek.get_timeseries(rics, fields='CLOSE',start_date=dates[0], end_date=dates[1])
# if .dMINA00000PUS' have no data on the requested date range, restructure the dataframe so it can be appended properly
if len(df.columns) == 1:
df = df.rename(columns={'CLOSE':df.columns.name})
df.columns.name = 'CLOSE'
df['.dMINA00000PUS'] = np.nan
dfs = dfs.append(df)
display(dfs)Hope this could help
1
Answers
-
Hi @sami01,
About the null value of instrument .dMINA00000PUS's close price between dates 12/31/1969 and 6/5/1998, it is a content question. This forum is not the best place to ask content questions. The moderators here do not have deep expertise in every type of content available through Eikon.
For an authoritative answer to any content questions, the best resource is the Refinitiv Content Helpdesk, which can be reached using any method below
- Contact Us capability in your Eikon application
- or by calling the Helpdesk number in your country.
- or at https://my.refinitiv.com/content/mytr/en/productsupport.html
However, case number 11049931 was raised on behalf of you and the content support team is going to contact you regarding this soon.
0 -
as a reference, below is an answer from case number 11049931
Please be informed, we have sourced the values for “MSCI North America” <.dMINA00000PUS> from 08th June 1998 to our system ,so we don’t have the data prior to 1998 June on our product.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 6 Bot Platform
- 17 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛