Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
55 5 8 8

Time series with get_data

Hello,


I am using the below formula that gives me a data frame with historic values of the attached parameters, between two dates, for a list of rics. What FIELDS should I use to obtain CLOSING PRICE and VOLUMES?


Where should I lookg for the appropriate fields for the get_data formula ? I tried TR.Volume, TR.PriceClose, but I get only "na"


df_1,e = ek.get_data(list_rics,['TR.OPENINTEREST.Date','TR.OPENINTEREST'], {'SDate':fst_dt,'EDate':lst_dt})

Thanks in advance.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

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

Upvote
Accepted
10.1k 18 6 9

@emmanuel.chaslin - unfortunately that rdp function is only single ric - a multi-ric endpoint is coming soon. I had another look at the instrument and have come up with the following:

df_1,e = ek.get_data('1SB1200P1',['TR.OPENINTEREST.Date','TR.AccumulatedVolume','TR.ClosePrice','TR.SettlementPrice',
                                  'TR.OPENINTEREST'],
                    {'SDate':'2020-12-01', 'EDate': '0', 'Frq':'D'})
df_1

This gets all your fields - so the volume field for derivatives is 'TR.AccumulatedVolume' and instead of using TR.PriceClose i used TR.ClosePrice and it worked fine. I hope this can help.

icon clock
10 |1500

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

Dear Jason, thanks a lot it works well as below:

df_1,e = ek.get_data(list_rics,['TR.SettlementPrice.date','TR.AccumulatedVolume','TR.SettlementPrice'], {'SDate':fst_dt,'EDate':lst_dt})


Can I push and add one more question ? do you think it would be possible to have the settlement of the main options greeks (Delta, Gamma, Vega, Theta would be nice)? Thanks in advance.

Upvotes
10.1k 18 6 9

@emmanuel.chaslin please can you give me an example of a RIC that you would use. ALso please be aware you can launch the Data Item Browser app (type DIB into eikon search bar) where you can type in any RIC and it will allow you to search for a term such as Volume and get back a list of field options and their accompanying values - which can quickly help you zero in on what you need. I hope this can help.

icon clock
10 |1500

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

Thanks Jason,


Can you please tell me what field I should use for obtaining historical volume with a get_data formula ? Using below ric example?


1SB1200P1
Upvotes
10.1k 18 6 9

@emmanuel.chaslin for this task I would use our RDP library - please see the following code:

import refinitiv.dataplatform as rdp
session = rdp.open_desktop_session('YOUR APP KEY HERE')

df1 = rdp.get_historical_price_summaries(universe = "1SB1200P1",
                                         interval = rdp.Intervals.DAILY,
                                         count=500)

df1

As this is an option you should use the official settlement price (SETTLE) as the closing price and volume is (ACVOL_UNS). You can find out more about the RDP libraries here. I hope this can help.


1614862465339.png (148.8 KiB)
icon clock
10 |1500

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

Thansk Jason,


Can I use this with a list of rics? I want to do that for more than one option.


Why isnt "get_data" appropriate in this case?

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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