For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
11 1 0 0

ek.get_data for USD1YOIS=

Hi,

I am trying to retrieve information for Overnight Index Swaps. I have RICs like USD1YOIS= or COP1YOIS= and I am using the following code to get the data:

ts2,e2 = ek.get_data('USD1YOIS=',

["TR.MIDYIELD.date","TR.MIDYIELD"],{'SDate':start_date,'EDate':end_date,'Frq':'D'})


I have tried using the fields TR.MIDYIELD or TR.MIDPRICE but I don't get any information.

I have looked in the Data Item Brower for fields that have time series data but couldn't find any.

Do you know what field should I use? Thanks!


PD: I am able to get the data from an excel spreadsheet using =@RHistory and the field Close. However using the python code I can't get it.




eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
6.7k 8 6 7

@andrgome Hi I would use the refinitiv data platform (RDP) library for this - which you can use with your app key:

import refinitiv.dataplatform as rdp
rdp.open_desktop_session('YOUR APP KEY HERE')
rdp.get_historical_price_summaries(
    universe = 'USD1YOIS=', 
    interval = rdp.Intervals.DAILY,
    count = 500)

Please also note that the refinitiv.dataplatform library also contains a full version of the eikon library which you can use by:

import refinitv.dataplatform.eikon as ek
ek.set_app_key('Your App Key Here')

So you can use both APIs from one package.

I hope this can help.


1616073637279.png (119.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hi @jason.ramchandani. Thanks for your help. This works! Quick question. I managed to get USD1YOIS using the following code.


OIS = rdp.get_historical_price_summaries(universe = 'USD1YOIS=',

start = "2005-12-31",

end = "2021-03-17",

interval = rdp.Intervals.DAILY,

fields = ['MID_PRICE'])


I tried to get more RICs like USD2YOIS or something else but I did get an error with the following code.

OIS = rdp.get_historical_price_summaries(universe = ['USD1YOIS=''USD2YOIS='],

start = "2005-12-31",

end = "2021-03-17",

interval = rdp.Intervals.DAILY,

fields = ['MID_PRICE'])


Do you know what is the right syntax to make it work?

Thanks!

@andrgome

I think that it supports one item for each call.

rdp.get_historical_price_summaries(
    universe = 'USD2YOIS=', 
    interval = rdp.Intervals.DAILY,
    count = 500)
Upvotes
13k 32 12 18

Hi @andrgome,

You can try to use the timeseries function in Eikon data API. The data provided is intervalized bar data.

>>> ek.get_timeseries('USD1YOIS=', start_date='2019-10-10T15:00:00', end_date='2021-01-10T15:00:00', interval='monthly')

USD1YOIS=   CLOSE   HIGH    LOW   OPEN
Date
2019-10-31  1.371  1.535  1.296  1.502
2019-11-30  1.422  1.496  1.388  1.367
2019-12-31  1.498  1.513  1.415  1.425
2020-01-31  1.332   1.51  1.346  1.489
2020-02-29  0.901   1.45  0.849  1.334
2020-03-31  0.044  0.888  0.065  0.888
2020-04-30  0.034  0.082   0.05  0.064
2020-05-31  0.015  0.038  0.001  0.031
2020-06-30  0.018  0.054  0.031  0.002
2020-07-31  0.018   0.03  0.027  0.015
2020-08-31  0.037  0.056  0.035  0.007
2020-09-30  0.046  0.051  0.054  0.039
2020-10-31  0.051  0.062  0.063  0.031
2020-11-30  0.048  0.073  0.067  0.037
2020-12-31  0.066  0.073  0.081  0.063

The TR.MIDYIELD field that you are trying to use is not applicable to Fixed Income Asset class.

For any more help regarding data, please raise a service ticket at my.refinitiv.com to speak to a content expert. We can only answer technical question on these forums.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thank you! This works! However this get_timeseries has some data limits, hence to get a long history is impossible.

Click below to post an Idea Post Idea