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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
38 4 1 3

How to properly download expired commodity futures data

Being unable to get open interest data with the get_timeseries method, I tried to get all data with the get_data method. I am unable to get identical close prices with the two methods, here's an example. The way I get time series data which gives me the correct results excluding open interest:

ek.get_timeseries('BOH8^1','CLOSE',start_date='2018-02-28') I get the data up to 14-03-2018.

If I use the get_data method: ek.get_data('BOH8^1', ['TR.CLOSEPRICE.Date', 'TR.CLOSEPRICE'], {'SDate':'2018-02-28','EDate':'2018-03-18'})

I get data up to 12-03-2018. The Close price on that day according to the get_data output equals 31.43, but according to the get_timeseries output it is 31.56. What is going wrong here? There are many differences between the two timeseries.

The open interest does get me data up to 14-03-2018 as expected. ek.get_data('BOH8^1', ['TR.OPENINTEREST.Date', 'TR.OPENINTEREST'], {'SDate':'2018-02-28','EDate':'2018-03-18'})

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythoncommodities
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.

1 Answer

Upvotes
Accepted
39.2k 75 11 27

For these futures TR.CLOSEPRICE represents the last trade price, whereas what you're looking for is the settlement price. The latter can be obtained using TR.SETTLEMENTPRICE field.
See this thread for prior discussion on similar topic.

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.

Click below to post an Idea Post Idea