LSEG Data Library for Python

create_formula

Sends a request to the Delivery Platform (formerly Refinitiv Data Platform) to create a formula-based custom instrument.

Module

refinitiv.data.content.custom_instruments.manage

Syntax

create_formula(symbol, formula)

Parameters

Value Description Data type Optional Default value
symbol Instrument symbol in the format "S)someSymbol.YOURUUID". str No -
formula Formula consisting of RICs (fields can be specified by comma). str No -
currency 3-letter code of the currency of the instrument, e.g. GBP. str Yes -
instrument_name Human-readable name of the instrument. Maximum of 16 characters. str Yes -
exchange_name 4-letter code of the listing exchange. str Yes -
holidays List of custom calendar definitions. list[dict] Yes -
time_zone Time Series uses an odd custom 3-letter value for time zone IDs, e.g. "LON" for London. str Yes -
description Free text field from the user to put any notes or text. Up to 1000 characters. list[dict] Yes -
extended_params Specifies the parameters that will be merged with the request. dict Yes -
session Session object. If session parameters are not defined, the default session will be used. Session object Yes None
on_response User-defined callback function to process received response. Callable Yes None

Returned value

CustomInstrumentFormula

Usage

The following example demonstrates how to create a custom instrument based on formula "EUR=*3":

from refinitiv.data.content.custom_instruments.manage import create_formula

new_instrument = create_formula(
    symbol="MyNewInstrument",
    formula="EUR=*3",
)
193 words (1:01 mins)