Download indices in percentages

Hi,
is it possible to download indices in percentage change as can be seen on all the servers (investing.com and others), even in eikon on list called INOV (INFOV for futures)?
If not, then i understand basic operations, for example for dax this works well
ric_dax='.GDAXI'
dax=ek.get_timeseries(ric_dax,start_date='2019-09-03T07:00:00',interval="daily")
dax_diff=dax['CLOSE'].pct_change()*100
But it doesnt work for longer traded futures. for example for nikkei futures this code
ric_nikkei_futures='JNIc1 '
nikkei_futures=ek.get_timeseries(ric_nikkei_futures,start_date='2020-09-03T07:00:00',interval="daily")
nikkei_futures_diff=nikkei_futures['CLOSE'].pct_change()*100
gives different values than on the eikon window called INFOV. does someone know how to solve it? I am from GMT +1, i think it has something to do with a time zone
Even the us indices futures (nasdaq, sp500) does not give the same results as on INFOV page with the code above
Thanks
Best Answer
-
If you're looking for the percent change value displayed in "% Chng" column in INFOV app in Eikon, you can get it from the PCTCHNG field of real-time record using for example
ek.get_data(['.GDAXI','.SPX','JNIc1','SPcv1'], ['PCTCHNG'])
0
Answers
-
@Novotnyja So your code is correct for a daily close pct value. So for example the Nikkei225 JNIc1 future closed at 07:00 gmt at a value of 29480 which is 1.37% higher than the previous close on the 29 march of 29080. What you are seeing now in the eikon viewer is the live future trading vs the official close of today:
you can get this information by choosing a different interval: eg daily will give you the daily close for each day - if a future trades after the normal market hours have shut you will not get those. However if you change the interval to hour or minute you can get the latest values:
df = ek.get_timeseries('JNIc1',start_date='2020-09-03T07:00:00',interval="hour")
dfOur monitors use a steaming live price feed to update in real time. You can find out more about using those here. I hope this can help.
0 -
Oki, thanks, i know understand the issue, that the percentage is calculated as latest value vs. the official close, which in the case of nikkei is not same as the last value that day in gmt +1
But unfortunately i still dont know how to deal with it using eikon api, if i want the same percentage value for nikkei futures as on INFOV page
Thanks
0 -
@Novotnyja here you go you can add any realtime fields from the quote window to these and even build up the same display as you see in infov screen.
import refinitiv.dataplatform as rdp
rdp.open_desktop_session('YOUR APP KEY HERE')streaming_prices = rdp.StreamingPrices(universe = ['JNIc1','JNIc2'], fields= ['NETCHNG_1','PCTCHNG','TRDPRC_1','SALTIM'] )
df = streaming_prices.get_snapshot()
display(df)This is the simplest example of synchronous streaming workflow there are also event driven modes with callbacks you could use, I hope this can help.
0 -
Thank you very much Alex, it shows the values i need! i have the last question, this way is showing data in a unusual format for me. for example i cant do
nikkei_futures=ek.get_data(['JNIc1'], ['PCTCHNG'])
new=nikkei_futures['PCTCHNG']+1
and so on..
Please how to do it, if i want to get one callable numeric value of the 'PCTCHNG'
Thank you very much for your help
0 -
get_data method of Eikon Data APIs library returns a tuple containing pandas dataframe with the data payload and the error object. To extract the dataframe from the result returned by get_data method just get the first element of the tuple. Or use the following notation
nikkei_futures, err = ek.get_data(['JNIc1'], ['PCTCHNG'])
new=nikkei_futures['PCTCHNG']+10
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 687 Datastream
- 1.4K DSS
- 621 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 4 Trading API
- 2.9K Elektron
- 1.4K EMA
- 254 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 669 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 229 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛