LUSID automatically categorises the features of certain types of OTC instrument. You can optionally use these categories to select different pricing models in a recipe, to value instruments of the same type in different ways.
For example, you may have many FX option contracts mastered as instruments in LUSID, each with different features. To help you discover all the possible categories, call the GetAllPossibleFeatures API for the FxOption
instrument type, for example:
curl -X GET "https://<your-domain.lusid.com/api/api/instruments/FxOption/allfeatures"
-H "Authorization: <your-API-access-token>"
The response contains a list of feature keys and possible values, so for example the Instrument/Features/ExerciseType
feature key determines that FX option contracts are categorised either as American
and can be exercised at any time, or European
and can only be exercised at the maturity date. By omission, Bermudan-style option contracts are not supported:
{
"Instrument/Features/ExerciseType": [
"American",
"European"
],
"Instrument/Features/OptionType": [
"Call",
"Put"
],
"Instrument/Features/DeliveryType": [
"Physical",
"Cash"
],
"Instrument/Features/Barrier": [
"Double",
"Single"
],
"Instrument/Features/Touch": [
"Two",
"One",
"No"
],
"Instrument/Features/PayoffType": [
"Digital",
"Vanilla"
]
}
If you want to examine the categories for an individual instrument, call the GetExistingInstrumentCapabilities API with the LUID of that instrument, for example:
curl -X GET "https://<your-domain>.lusid.com/api/api/instruments/LUID_00003D64/capabilities?instrumentScope=default&recipeScope=default"
-H "Authorization: Bearer <your-API-access-token>"
The response reflects the choices you made when you mastered that instrument:
{ "instrumentId": "LUID_00003D64", "model": "Unknown", "features": { "Instrument/Features/OptionType": "Call", "Instrument/Features/DeliveryType": "Physical", "Instrument/Features/ExerciseType": "European", "Instrument/Features/PayoffType": "Vanilla" }, ... }
Note: If you find you need an additional license to use these APIs, contact Technical Support.
You can use feature keys to select different pricing models when you specify vendor model rules in the modelRules
section of a recipe. Consider the following example section for a set of FX option contracts you want to value, where:
- The first vendor model rule (in red) specifies that American FX option contracts are valued using the
BjerksundStensland1993
pricing model. - The second vendor model rule (in blue) specifies that European Call FX option contracts are valued using the
BlackScholes
pricing model. - The third vendor model rule (in green) specifies that European Put FX option contracts are valued using the
Discounting
pricing model.
"pricing": { "modelRules": [{ "supplier": "Lusid", "instrumentType": "FxOption", "addressKeyFilters": [{ "left": "Instrument/Features/ExerciseType", "operator": "eq", "right": { "value": "American", "resultValueType": "ResultValueString" } }], "modelName": "BjerksundStensland1993" }, { "supplier": "Lusid", "instrumentType": "FxOption", "addressKeyFilters": [{ "left": "Instrument/Features/ExerciseType", "operator": "eq", "right": { "value": "European", "resultValueType": "ResultValueString" } }, { "left": "Instrument/Features/OptionType", "operator": "eq", "right": { "value": "Call", "resultValueType": "ResultValueString" } }], "modelName": "BlackScholes" }, { "supplier": "Lusid", "instrumentType": "FxOption", "addressKeyFilters": [{ "left": "Instrument/Features/ExerciseType", "operator": "eq", "right": { "value": "European", "resultValueType": "ResultValueString" } }, { "left": "Instrument/Features/OptionType", "operator": "eq", "right": { "value": "Put", "resultValueType": "ResultValueString" } }], "modelName": "Discounting" }], ... }, ...
Note that vendor model rules are processed in the order they are specified in a recipe. The first matching rule found is used. Instruments that do not match any rules fall back to using the default pricing model for the instrument type, which is SimpleStatic
for FX option contracts.