Functions to find Option RICs traded on different exchanges

Haykaz Aramyan
LSEG Developer Community
3 min readApr 5, 2023

Overview

The full article can be found on LSEG’s Developer Portal, which introduces functions to construct option RICs on equities and indices traded in exchanges such as OPRA, EUREX, Intercontinental Exchange, Osaka Exchange, Stock Exchange of Hong Kong and Hong Kong Future Exchange. The final output of the article is a function, which accepts ISIN, maturity, strike, and option type as an input finds all exchanges where the options on the given asset are traded, constructs RICs for them, validates, and returns the constructed RICs along with the prices.

The Article is utilizing the depth and width of Refinitiv data and APIs, particularly RDP API to access option pricing data, search capabilities and symbol conversion.

Article in brief

Install and import dependency packages

The article is started by importing required libraries and setting our credentials. Particularly we install refinitiv.dataplatform, plotly and pandas_market_calendars and import these and other pre-installed dependencies. The code are built using Python 3.9.

Section 1: Define helper functions

This introduces functions that are supplementary and are further called from the the main functions from Section 2 and Section 3.

1.1 Function to get exchange codes where the option is traded

This function allows getting the list of exchange codes where an option on the given asset is traded. The function takes asset RIC as an input and returns the list of exchanges. The core of the function is the RDP Search capabilities.

1.2 Function to check if found RIC is valid

This function allows validation of the constructed option RICs by requesting price summaries. If prices are returned, we can confirm that the RIC(s) is (are) valid. This function takes the option RIC, maturity, and dictionary of identifiers as input and returns the RIC along with the prices.

1.3 Function to get option Expiration month code

This function takes the expiration date and option type as an input and returns the expiration month code for the option, which is further used to construct RICs.

Section 2: Define functions to get option RICs for each exchange

In this section, we define functions for option RIC construction for different exchanges, including OPRA, EUREX, Intercontinental Exchange, Osaka Exchange, Stock Exchange of Hong Kong and Hong Kong Future Exchange. Those functions take asset RIC, maturity, strike, and option type as input and return validated rics and the prices. If no price is found for constructed RICs, the functions print out possible RICs.

Section 3: Universal function for all above exchanges

Finally, we built a universal function that takes ISIN, maturity, strike, and option type as an input finds all exchanges where the options on the given asset are traded, constructs RICs for them, validates and returns the constructed RICs along with the prices.

Furthermore, I have conducted the class implementation of the solution, which offers more scaleable usability of the functions. Please check it in the associated GitHub folder.

The current version of this article is limited to certain exchanges and options on certain asset types, including indices and stocks. Please let me know which other exchanges and/or options on other asset categories you want me to build functions for. You can contact me directly via h.aramyan@lseg.com or raise your questions/suggestion via the Q&A portal of the Developer community.

References

Downloads

Related Articles

--

--