A derived property has a derivation formula that instructs LUSID how to automatically calculate (ie. derive) property values.
Required reading: Derivation formulas part 1: Operations and allowed values
Depending on the operation, allowed values can be strings or numbers, but they can also be components of entities such as data fields, identifiers, custom properties, system properties, and even other derived properties. Note the exact components you can reference differ depending on the type of entity the derived property belongs to:
- Holding derived properties
- Transaction derived properties
- Instrument derived properties
- Portfolio derived properties
- Legal entity derived properties
- Person derived properties
- Custom valuation metric derived properties
Holding derived properties
You can reference certain components belonging to transactions, instruments and portfolios in a formula for a holding derived property, for example:
if(HoldingType eq 'P' and Transaction.TotalConsideration.Currency eq 'USD' and Properties[Portfolio/Ibor/Region] eq 'USA') then 'United States' else 'Rest of world'
Entity components | Belonging to holdings | Belonging to other types of entity | ||
Transactions | Instruments | Portfolios | ||
Stored data fields | Any for holdings. Nested fields can be referenced using dot notation. For example:InstrumentUid HoldingType Cost.Currency | Any for transactions, prefixed by Transaction. Nested fields can be referenced using dot notation. For example:Transaction.TransactionId Transaction.TransactionPrice.Price Transaction.TotalConsideration.Currency | N/A | N/A |
Identifiers | N/A | Transaction instrument identifiers, for example:Transaction.InstrumentIdentifiers[Instrument/default/Figi] | N/A | N/A |
Sub-holding keys (SHKs) | For example:SubHoldingKeys[Transaction/X/Y] SubHoldingKeys[Transaction/Y/X] | N/A. SHKs are properties in the Transaction domain but they 'belong' to holdings. | N/A | N/A |
Properties | Custom properties, including other derived properties. For example: System properties, for example: | Transaction custom properties, including derived properties, prefixed by | Instrument custom properties, including derived properties. For example:
| Portfolio custom properties but NOT portfolio derived properties. For example: Note: You must also retrieve the portfolio property when retrieving the holding derived property in order for the value to be calculated correctly. |
Transaction derived properties
You can reference certain components belonging to instruments in a formula for a transaction derived property, for example:
if(TotalConsideration.Currency eq 'USD' and Properties[Instrument/Ibor/Region] eq 'USA') then 'United States' else 'Rest of world'
Entity components | Belonging to transactions | Belonging to other types of entity |
Instruments | ||
Stored data fields | Any for transactions. Nested fields can be referenced using dot notation. For example:TransactionId TransactionPrice.Price TotalConsideration.Currency | N/A |
Identifiers | For example:InstrumentIdentifiers[Instrument/default/ClientInternal] InstrumentIdentifiers[Instrument/default/Figi] InstrumentIdentifiers[Instrument/default/LusidInstrumentId] | N/A |
Properties | Custom properties, including other derived properties. For example: | Instrument custom properties, including derived properties. For example: Note: You must also retrieve the instrument property when retrieving the transaction derived property in order for the value to be calculated correctly. |
Instrument derived properties
You can only reference components belonging to instruments in a formula for an instrument derived property.
Entity components | Belonging to instruments | Belonging to other types of entity |
Stored data fields | Any for instruments except | N/A |
Identifiers | For example:Identifiers[ClientInternal] Identifiers[Figi] Identifiers[LusidInstrumentId] | N/A |
Properties | Custom properties, including other derived properties. For example: System properties, for example: | N/A |
Portfolio derived properties
You can only reference components belonging to portfolios in a formula for a portfolio derived property.
Entity components | Belonging to portfolios | Belonging to other types of entity |
Stored data fields | Any for portfolios except | N/A |
Identifiers | N/A | N/A |
Properties | Custom properties, including other derived properties. For example: System properties, for example: | N/A |
Legal entity derived properties
You can only reference components belonging to legal entities in a formula for a legal entity derived property.
Entity components | Belonging to legal entities | Belonging to other types of entity |
Stored data fields | Any for legal entities except | N/A |
Identifiers | For example:Identifiers[LegalEntity/InternationalBanks/BankId] | N/A |
Properties | Custom properties, including other derived properties. For example: System properties, for example: | N/A |
Person derived properties
You can only reference components belonging to person entities in a formula for a person derived property.
Entity components | Belonging to person entities | Belonging to other types of entity |
Stored data fields | Any for person entities except | N/A |
Identifiers | Identifiers[Person/PortfolioManagers/ManagerId] | N/A |
Properties | Custom properties, including other derived properties. For example: | N/A |
Custom valuation metric derived properties
You can create a custom metric to extend the set of LUSID metrics available to include in a valuation report.
To do this, create a derived property type in the special DerivedValuation
domain. It does not belong to a type of entity as such, but rather can be reported in the same way as a LUSID metric. See an example.
You can reference components belonging to certain entities, and also certain LUSID and other custom metrics, in a formula for a custom metric.
Components | Belonging to instruments | Belonging to holdings | Belonging to transactions, portfolios or portfolio groups | LUSID metrics |
Stored data fields | Any for instruments except | Any for holdings, prefixed by PortfolioHolding. Nested fields can be referenced using dot notation. For example:PortfolioHolding.InstrumentUid PortfolioHolding.HoldingType PortfolioHolding.Cost.Currency | N/A | N/A |
Identifiers | Any prefixed by Instrument. For example:Instrument.Identifiers[ClientInternal] Instrument.Identifiers[Figi] Instrument.Identifiers[LusidInstrumentId] | N/A | N/A | N/A |
SHKs | N/A | Any prefixed by PortfolioHolding. For example:PortfolioHolding.SubHoldingKeys[Transaction/X/Y] PortfolioHolding.SubHoldingKeys[Transaction/Y/X] | N/A | N/A |
Properties | Custom properties, including other derived properties. For example: System properties, for example: | Custom properties, including other derived properties. For example: System properties, for example: | Custom properties, including other derived properties. For example: System properties, for example: | N/A |
Metrics | N/A | N/A | N/A | Any with an underlying (flattened) data type of string , decimal , int , bool or datetime , including other custom metrics. For example:AddressKeys[Valuation/PV] |