Open interest despite the closing price
Hi all,
I want to make chart of an open interest of eua call options at level 40. In Eikon Refinitiv this option has ric EFOM4000C1, and in eikon it is possible to chart open interest of that ric
With the python code below, i get the price of this option. How to setup the code for an open interest?
ric_eua_calls_40='EFOM4000C1'
eua_calls_40=ek.get_timeseries(ric_eua_calls, start_date='2020-01-01T07:00:00',
interval='daily')
eua_calls_40.tail()
Best Answer
-
Rather than using get_timeseries method of Eikon Data APIs, which only provides timeseries for default view (or data item) for an instrument (typically this is instrument's trade price), you need to use RDP Libraries, e.g.
rdp.get_historical_price_summaries(
universe = 'EFOM4000C1',
fields = ['TRDPRC_1','SETTLE','OPINT_1'],
start = '2020-01-01',
end = '2021-02-26')1
Answers
-
Thank you, i tried that rdp library and it works well and showed all the data that i need.
The only problem with that library (in the previous ek.get_timeseries it worked normaly) is that it gives me those numbers as strings, so i cant do any operations that i want
So the code below will not create a graph in matplotlib, because the numbers are not integers.
How to chart that time series with the matplotlib package? Thank you
option=rdp.get_historical_price_summaries(
universe ='EFOM5000L1',
fields = ['OPINT_1'],
start = '2020-01-01' )
option.plot()
pyplot.show()
0 -
It's very easy to convert strings returned by get_historical_price_summaries method to numeric values. Just add the following line before creating a plot for the dataframe
option = option.apply(pd.to_numeric)
1
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 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 中文论坛