CDS Index Time Series via Matlab & Phyton API

I am using Matlab and the Python API in order to retrieve time series of spreads for CDS indices. The corresponding line of code is:
[pylog,datarefinitiv]= evalc('py.eikon.get_timeseries(ric{iric},field,datestr(startdate,''yyyy-mm-dd''),datestr(enddate,''yyyy-mm-dd''))');
with:
ric = cell array with the relecant RICs; iric = counting integer
field = 'VALUE'
startdate and enddate (type datenum) to specify the period of interest
This works absolutely fine for several CDS indices (e.g. ITEEU5Y=MP, ITEXO5Y=MP, and CDXIG5Y=MP) and gives the daily Mid Spread Close values (as verified using the Excel API). However, for one of the indices, CDXHY5Y=MP, this retrieves the Mid Price Close values instead of spread data.
Could you please help how to specify the parameter field in order to obtain the Mid Spread Close values for the latter RIC?
Best Answer
-
Hi @Jirapongse,
thanks for your support!
For the sake of completeness of clarifying the issue, the following adaption to the mentioned code line solved the problem:
[pylog, datarefinitiv] = evalc("py.eikon.get_data('CDXHY5Y=MP', 'TR.MIDSPREAD.Date,TR.MIDSPREAD', struct('SDate', '2023-06-01', 'EDate', '2023-07-24', 'Frq', 'D'))");
0
Answers
-
Thank you for reaching out to us.
The ek.get_timeseries method can only retrieve the default timeseries view of each RIC. The default view of ITEEU5Y=MP is MID_SPREAD while the default view of CDXHY5Y=MP is MID_PRICE.
You can use the get_data method instead.
df, err = ek.get_data(["CDXHY5Y=MP"],
["TR.MIDPRICE","TR.MIDPRICE.Date"],
{"SDate":"2023-06-01","EDate":"2023-07-24","Frq":"D"})
dfOtherwise, you can use the Refinitiv Data Library for Python instead.
The examples are on GitHub.
0 -
Many thanks for your support and the clarification!
I haven't been aware of that property of the get_timeseries function.
I am now using the get_data function and succeeded in retrieving data from the desired field:
[pylog,datarefinitiv]= evalc('py.eikon.get_data(''CDXHY5Y=MP'',''TR.MIDSPREAD.Date,TR.MIDSPREAD'')');
Unfortunately, I cannot completely replicate your example (i.e. the specification of start and end time as well as daily frequency) when calling the Phython API from the Matlab environment.
- df, err = ek.get_data(["CDXHY5Y=MP"],
- ["TR.MIDPRICE","TR.MIDPRICE.Date"],
- {"SDate":"2023-06-01","EDate":"2023-07-24","Frq":"D"})
- df
Could you maybe also help how to adapt my code line in order to add these additional parameters?
0 -
We need to check how py.eikon.get_data works.
It should be a wrapper of Eikon Data API. You need to contact your developers regarding how to set the parameters in py.eikon.get_data.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 48 Data Fusion
- 34 Data Model Discovery
- 689 Datastream
- 1.4K DSS
- 627 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 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
- 277 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 706 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛