Your recipe must be able to locate market data suitable for each type of instrument you wish to value in an appropriate LUSID store.
The quality and quantity of market data required depends upon:
- The instrument types being valued, for example
Equity
,Bond
,FxForward
,InterestRateSwap
and so on. - The pricing models chosen, for example
SimpleStatic
,Discounting
,BlackScholes
and so on. Note not all pricing models are valid for each instrument type. - The number of days in the valuation schedule.
To help you discover what market data your recipe must locate for a particular combination of an instrument type and a pricing model valid for that type, call either:
- The QueryInstrumentCapabilities API with an example economic definition of an instrument type and a valid pricing model.
- The GetExistingInstrumentCapabilities API with the LUID of an actual instrument and a valid pricing model.
Note: If you find you need an additional license to use these APIs, contact Technical Support.
Consider the following example of a call to the QueryInstrumentCapabilities
API with the economic definition of a FxForward
in the body of the request and the ForwardFromCurve
pricing model specified in the URL (highlighted in red):
curl -X POST "https://<your-domain>.lusid.com/api/api/instruments/capabilities?model=ForwardFromCurve"
-H "Authorization: Bearer <your-API-access-token>"
-H "Content-Type: application/json-patch+json"
-d '{
"instrumentType": "FxForward",
"startDate": "2021-11-15T10:00:00.0000000+00:00",
"maturityDate": "2022-05-15T10:00:00.0000000+00:00",
"domAmount": 1000000,
"domCcy": "EUR",
"fgnAmount": -1200000,
"fgnCcy": "USD"
}'
The response contains:
- A list of features, if available for this instrument type.
- The metrics you can include in your valuation report.
- The market data your recipe must be able to locate (the
economicDependencies
array, highlighted in red below):
{
"instrumentId": "",
"model": "ForwardFromCurve",
"features": [],
"supportedAddresses": [
"Valuation/InstrumentPV",
"Valuation/PV",
"Valuation/DirtyPriceKey",
"Valuation/CleanPriceKey",
"Valuation/InstrumentAccrued",
"Valuation/Accrued",
"Valuation/EffectiveAt",
"Valuation/InstrumentExposure",
"Valuation/Model/Name",
"Valuation/Model/Approach",
"Valuation/PV/Ccy",
"Valuation/PV/Amount",
"Valuation/CleanPV",
"Valuation/Exposure/Ccy",
"Valuation/Exposure/Amount",
"Valuation/Exposure"
],
"economicDependencies": [
{
"domesticCurrency": "EUR",
"foreignCurrency": "USD",
"date": "0001-01-01T00:00:00.0000000+00:00",
"dependencyType": "Fx"
},
{
"currency": "EUR",
"date": "0001-01-01T00:00:00.0000000+00:00",
"dependencyType": "Discounting"
},
{
"domesticCurrency": "EUR",
"foreignCurrency": "USD",
"curveType": "FxFwdCurve",
"date": "0001-01-01T00:00:00.0000000+00:00",
"dependencyType": "FxForwards"
},
{
"currency": "EUR",
"date": "0001-01-01T00:00:00.0000000+00:00",
"dependencyType": "Cash"
},
{
"currency": "USD",
"date": "0001-01-01T00:00:00.0000000+00:00",
"dependencyType": "Cash"
},
],
...
}
We can see that, for this instrument type and pricing model combination, and for each day in the valuation schedule, your recipe must be able to locate:
Economic dependency type | Market data | LUSID market data store |
Fx | A FX spot rate for EUR/USD | Quote Store |
Discounting | A discount factor curve for EUR | Complex Market Data Store |
FxForwards | A FX forward curve for EUR/USD |
Note: The two Cash
economic dependency types refer to currency instruments mastered in the LUSID Security Master. Since your LUSID domain is automatically provisioned with all likely currencies, you can typically ignore these dependencies.
Your recipe must contain one market data rule per economic dependency type that sets out criteria for locating suitable data in the appropriate store. See how to do this.