A movement is a component of a transaction type. It defines the economic impact of all transactions belonging to that type on holdings.
A transaction type must have at least one movement, and can have two or more. For example, the built-in Buy
transaction type provided with LUSID—intended to signal a purchase of an instrument such as an equity or bond—has two movements. For each transaction upserted to a portfolio with a transaction type of Buy
, LUSID automatically:
- Increases the quantity of your holding in the underlying instrument (ie. BP or MSFT) by the number of units purchased.
- Decreases the core cash balance in the transaction currency (ie. GBP or USD) by the total consideration.
Understand how LUSID uses transaction types to generate holdings.
A movement has the following data fields:
Data field | Status | Explanation | ||||||||||||
name | Optional | Specifies a name for the movement. | ||||||||||||
movementTypes | Mandatory | One of the built-in movement types controlling how and when holdings are updated. | ||||||||||||
direction | Mandatory | Controls whether the change is an increase or decrease. Allowed values are If transactions have unsigned units and amounts then | ||||||||||||
side | Mandatory | A side is a plug-and-play component that determines which holdings are impacted and what attributes of transactions contribute to the change. Allowed values are either the built-in sides provided with LUSID (currently | ||||||||||||
condition | Optional | By default, a movement always occurs for every transaction belonging to a transaction type. You can make a movement conditional so that it only occurs for particular transactions, or for transactions in particular portfolios. You can use LUSID's filter syntax to include any field or property of a transaction or a portfolio in the condition, chaining expressions using the
| ||||||||||||
properties | Optional | This can be any number of:
| ||||||||||||
mappings | Optional | Allocates one or more sub-holding keys (SHKs) to override or supplement strategy tags applied directly to transactions.
Specify a 3-stage
For an example, see this tutorial on breaking out broker commission as a separate cash holding. | ||||||||||||
settlementDayOverride | Optional | For any movement type that impacts holdings on settlement date, overrides settlement dates specified in transactions and uses dates in the specified custom property added to those transactions instead. This field must be set to the 3-stage key of a custom property in the Note if a particular transaction does not have a property of this type, or the property value does not resolve to a valid date and time, then the original settlement date for the transaction is used. | ||||||||||||
movementOptions | Optional | A comma-separated list of options to configure the movement. The following are available:
|