Views:

There are two kinds of transaction in LUSID:

  • An input transaction (often just called transaction) is one you explicitly create yourself in a transaction portfolio, for example to record the purchase or sale of an asset. See how to do this.
  • An output transaction is either:
    • A transaction automatically generated by LUSID in response to a system event that impacts holdings in a portfolio, such as a corporate action or manual holdings adjustment.
    • An enriched input transaction. LUSID automatically processes every input transaction into an output transaction, retaining all the user input and adding extra information such as realised gain loss.

It follows that input transactions are a subset of all the transactions in a portfolio, and output transactions the superset.

LUSID is a transaction-based system. It does not maintain a static record of your holdings in a portfolio but rather generates them on demand from the stored history of output transactions, replayed in date order. For example, consider the following economic activity impacting a particular portfolio:

DateActivity
20 May 2023Holdings adjustment of 100 BP shares
21 May 2023Purchase of 50 BP shares
22 May 2023Sale of 80 BP shares
23 May 2023BP stock split: 2 for 1

This economic activity is implemented in LUSID by the following transactions:

DateTransaction TypeOriginally input or outputNotes
20 May 2023AdjustmentIncreaseOutputGenerated by LUSID in response to an AdjustHoldings API call.
21 May 2023BuyInputCreated by the user, and automatically processed by LUSID into an output transaction with extra information.
22 May 2023SellInputCreated by the user, and automatically processed by LUSID into an output transaction with extra information.
23 May 2023CorpActIncreaseOutputGenerated by LUSID in response to a corporate action transition event.

When you generate a holdings report on 24 May 2023, LUSID replays these transactions in date order to calculate that you have 140 BP shares.

Note the following:

  • If these transactions were to occur at exactly the same date and time, LUSID replays the sequence in the following order:
    1. Corporate action
    2. Input transactions in alphabetical order of transaction ID
    3. Set or adjustment to holdings
    This may impact the holdings report, depending on the nature of the corporate action.
  • LUSID automatically assigns opaque transaction types to automatically-generated output transactions, for example AdjustmentIncrease and CorpActIncrease. You cannot retrieve the details of these transaction types, nor modify them.

For a particular transaction portfolio, you can see the history of:

  • Input transactions by calling the GetTransactions API. In the LUSID web app, this API generates Dashboard > Transactions in input transaction mode:

     
  • Output transactions by calling the BuildTransactions API with a particular window. In the LUSID web app, this API generates Dashboard > Transactions in output transaction mode, where you can see all the automatically-generated output transactions and all the output transactions that are enriched input transactions:

     
  • A particular transaction by calling the GetTransactionHistory API. This might be useful if that transaction has been updated during its lifetime.