Streamlining historical options data retrieval and storage with RD libraries and MongoDB

Jonathan Legrand
LSEG Developer Community
3 min readAug 7, 2024

The original article on the LSEG Developer Community is available here. Don’t hesitate to read more of the authors (Gurpreet Bal and Dr. Haykaz Aramyan)’s great work on the LSEG Developer Portal.

In the world of finance, data is king. The ability to access, process, and analyze data quickly and efficiently is crucial for making informed decisions. This article explores how Refinitiv Data Libraries for Typescript can be used to streamline the process of retrieving and storing historical options data.

Introducing the Refinitiv Data Libraries for Typescript

The Refinitiv Data Libraries for Typescript is powerful tool for ingesting and processing data. It explains how to establish a session with the RD Library to access data, a crucial first step in any data-driven application.

Symbol Conversion

In the financial world, different symbols are used to represent different assets. For example, International Securities Identification Numbers (ISINs) and Reuters Instrument Codes (RICs) are two common types of symbols. The article explains how to use the SymbolConversion content object from the RD Library to convert ISINs to RICs, a necessary step for working with options data.

Search

The article explores the search capabilities of the RD Library. It demonstrates how to identify the exchanges where options on a given asset are traded using the Search content object. This is important because options on a specific asset can be traded on multiple exchanges.

Historical Pricing

The next section explains how to retrieve historical prices for constructed options using the HistoricalPricing content object. This data is crucial for analyzing trends and making predictions about future price movements.

The article also provides functions for reconstructing and validating options RICs that trade on supported exchanges. This is done using the capabilities of the Data Libraries. The article provides a detailed explanation of how to build and validate Options RICs for different exchanges.

How to define a MongoDB schema and store the ingested data

In this artilce, we provide a step-by-step guide on how to create a Mongoose Schema, which defines the structure and properties of the document in the MongoDB collection. It then shows how to save the constructed RICs and associated metadata in MongoDB using this schema.

Conclusion

In conclusion, the article provides a comprehensive guide on how to use Refinitiv Data Libraries for Typescript to streamline the process of retrieving and storing historical options data. It covers everything from connecting to the API and ingesting data using symbology conversion, search, and historical pricing capabilities, to storing the data in MongoDB. This makes it a valuable resource for anyone looking to build a proprietary web application with Refinitiv Workspace SDK and the Refinitiv Data Platform.

For further details, the article recommends checking out the TypeScript programming language documentation and using the Developer Community Q&A Forum for any questions related to the article or the APIs used.

--

--