Views:

You can include properties in a valuation report to supplement the many hundreds of LUSID metrics. These can be:

Including properties directly accessible by instruments being valued

You can include properties from the Instrument, Transaction, Holding, Portfolio and PortfolioGroup domains in exactly the same way as metrics. For example, the following call to the GetValuation API includes three metrics and one property, in this case the Instrument/default/Name system property to report the display name of instruments (highlighted in red):

curl -X POST "https://<your-domain>.lusid.com/api/api/aggregation/$valuation"
  -H "Authorization: Bearer <your-API-access-token>"
  -H "Content-Type: application/json-patch+json"
  -d '{
    "portfolioEntityIds": [ {"scope": "FBNUniversity", "code": "Module-4-1", "portfolioEntityType": "SinglePortfolio"} ],
    "valuationSchedule": {"effectiveFrom": "2022-03-07T00:00:00.0000000+00:00", "effectiveAt": "2022-03-11T00:00:00.0000000+00:00" },
    "recipeId": {"scope": "FBNUniversity", "code": "Module-4-1Recipe"},
    "metrics": [
      {"key": "Valuation/EffectiveAt", "op": "Value"},             # Metric
      {"key": "Holding/Cost/Pfolio", "op": "Value"},               # Metric
      {"key": "Valuation/PvInPortfolioCcy", "op": "Value"},        # Metric
      {"key": "Instrument/default/Name", "op": "Value"}            # Property
    ],
  }'

Including properties from entities related to instruments being valued

You can include custom properties from entities related to instruments, such as legal entities or persons. Find out more about relationships.

Note: You cannot yet include system properties from these domains.

For example, imagine instruments are related to legal entities representing issuing organisations, each of which has a LegalEntity/Scores/DEIScore custom property. To include the DEI scores of related legal entities in the valuation report, specify the 3-stage key in the normal way and additionally use the options field to specify the scope and code of the relationship type between instruments and legal entities as key/value pairs (highlighted in red):

curl -X POST "https://<your-domain>.lusid.com/api/api/aggregation/$valuation"
  -H "Authorization: Bearer <your-API-access-token>"
  -H "Content-Type: application/json-patch+json"
  -d '{
    "portfolioEntityIds": [ {"scope": "FBNUniversity", "code": "Module-4-1", "portfolioEntityType": "SinglePortfolio"} ],
    "valuationSchedule": {"effectiveFrom": "2022-03-07T00:00:00.0000000+00:00", "effectiveAt": "2022-03-11T00:00:00.0000000+00:00" },
    "recipeId": {"scope": "FBNUniversity", "code": "Module-4-1Recipe"},
    "metrics": [
      {"key": "Valuation/EffectiveAt", "op": "Value"},                       # Metric
      {"key": "Holding/Cost/Pfolio", "op": "Value"},                         # Metric
      {"key": "Valuation/PvInPortfolioCcy", "op": "Value"},                  # Metric
      {"key": "LegalEntity/Scores/DEIScore", "op": "Value", "options": {     # Property from related legal entities
        "RelationshipDefinitionIdScope": "InstrumentIssuer",
        "RelationshipDefinitionIdCode": "IssuerId",
      } },
    ]
  }'

For each instrument, the response includes a list of DEI score property values, one per related legal entity:

"data": [
  {
    "Valuation/EffectiveAt": "2023-07-10T00:00:00.0000000+00:00",
    "Holding/Cost/Pfolio": 500,
    "Valuation/PvInPortfolioCcy": 1000,
    "LegalEntity/Scores/DEIScore(RelationshipDefinitionIdScope=\"InstrumentIssuer\", RelationshipDefinitionIdCode=\"IssuerId\")": [
      87, 79, 65
    ]
  },
...
]