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
3 1 0 0

Trying to retrieve S&P500 Index options,

Hello,

I am currently using a MacOS System, PyCharm, and the Thomson Reuters API Proxy.

I am having some issues retrieving the following data for options on the S&P500 Index over different maturities and moneynesses.

  • Price Call
  • Price Put
  • Implied Volality (or better, Implied Variance)
  • Time To Maturity
  • Strike
  • Current Stock Price

Before posting here, I tried to solve the issue on my own, attempting to e.g. this video:

https://developers.refinitiv.com/content/eikon-data-api-python-quants-tutorial-9-derivative-analytics-i-data-chains-options


As, mentioned I am interested in the S&P500 Index options, I further would like to know how one can retrieve the above listed data. I looked into the Data Item Browser and did not find exact matches to the DAX example.

Question 1: How can I find this information?



The below command gives me the result of my screenshot of replicating the DAX example from the video.

dax = ek.get_data('0#GDAX*.EX', fields = ['PUTCALLIND', 'STRIKE_PRC', 'CF_CLOSE', 'IMP_VOLT'])[0]

For Example in row 2611: What I can see is that the string is:

  • unknown, starting with a "/"
  • the instrument "GDAX",
  • then the strike price 15200 with one additional decimal "152000"
  • unknown, possibly referring to maturity (?) "L4"
  • unknown, ".EX"

Question 2: What exactly is the meaning of the values inside of the 'Instrument' column? Especially, what is the meaning of the for me unknown parts of the string? How can I map this?




Thanks a lot and best regards!

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apidatadatastream-apiderivatives
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
18.2k 21 13 21

Hi @s_suha01

You can try this sample code:


You can use "Data Item Browser" to file more fields you are interested in on the instrument such as SPXx16224900.U


ahs.png (46.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.

Upvote
18.2k 21 13 21

Hi @s_suha01


For Q2.

The instrument is actually a RIC (an identifier uses in Refinitiv)

For example, IBM.N is a RIC code for IBM equity

.SPX is a RIC code for S&P 500 INDEX

.GDAX is a RIC code for XETRA DAX PF


Sometime your account may not entitle to "realtime" data so the "/" in front of RIC code indicates that it is a delayed data

For example, VOD.L vs /VOD.L


If you want to know more detail about RIC rule.

You can open Eikon Desktop and type in "RIC RULES" to open a help page.

Or you can try "Options RICs and Expiry Codes" (I cannot attach more pictures)


Lastly, this is the question on the content, if you still need further content clarification, you can contact Refinitiv Content Helpdesk at https://my.refinitiv.com/

They will be able to explain the content or RIC guideline to you in much more detail.


ahs1.png (87.9 KiB)
ahs2.png (152.1 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.

Upvotes
3 1 0 0

Hello @chavalit.jintamalit, thanks for your reply. Your sample code helped a lot.

However, two issues remain unsolved:
- The sample code you supplied yields 4348 rows, corresponding to 4348 unique instruments (options) w.r.t. the underlying. However, there are only 12 unique values for "Expiry Date". How can I verify if the sample code has fetched *all* instruments for any possible expiration date?
- Referring to the instrument "SPXx16224900.U": On the Thomson Reuters Desktop App (via Browser), I could verify that the Exercise Style is "P-EU", which is most likely for "European Put". How can I verify the Exercise Style via a request using the API?

Thanks,
s_suha01

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.

How can I verify if the sample code has fetched *all* instruments for any possible expiration date?

The 0#SPX*.U is the chain RIC for all the options so it supposes to return all the available options.


How can I verify the Exercise Style via a request using the API?

You can add "PUT_CALL" field to your API call.

ahs.png (49.7 KiB)

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.