How do I create a transaction portfolio?

Providing you have suitable access control permissions, you can create a transaction portfolio to build holdings (positions) in an underlying set of instruments.

Note: Once created, you can only change certain characteristics of a transaction portfolio in some circumstances. More information.

To create a transaction portfolio, you must specify a unique identifier, friendly name and base (or reporting) currency. You can optionally:

  • Specify a creation date prior to today (the default). This is important if you intend to load historical activity.

  • Register an instrument scope in order to resolve transactions to instruments mastered in that scope, before falling back to the default instrument scope.

  • Register a transaction type scope in order to restrict transactions to referencing only transaction types domiciled in that scope. If omitted, transactions reference transaction types in the default scope.

  • Register one or more sub-holding keys (SHKs) in order to split holdings into categories. By default, LUSID generates one holding per instrument.

  • Subscribe to a corporate action source containing corporate actions impacting underlying instruments held in the portfolio.

  • Change the default accounting method (Average Cost) and amortisation method (None).

  • Add custom properties to store additional information about the portfolio not recorded by the standard set of data fields. These properties must be from the Portfolio domain.

To examine the complete set of data fields for a transaction portfolio, examine the API documentation. Note that to subsequently interact you can use the APIs in the Portfolios collection as well as the Transaction Portfolios collection.

There are several ways to create a transaction portfolio:

Using the LUSID REST API

  1. Obtain an API access token.

  2. Call the LUSID CreatePortfolio API for your LUSID domain, passing in your API access token, nominating a scope in the URL, and specifying in the request body:

    • A displayName.

    • A code unique within the scope.

    • A baseCurrency to which foreign currency transactions can be normalised upon provision of a trade to portfolio rate. This must be an ISO 4217 currency code, for example GBP or JPY.

    • Optionally, an instrument scope, transaction type scope, corporate action source, sub-holding keys and/or custom properties.

    For example, to create a GBP-denominated portfolio with a code of Income and a creation date at the start of 2023 in myexamplescope (in the URL; this is created if it does not exist):

    curl -X POST "https://<your-domain>.lusid.com/api/api/transactionportfolios/myexamplescope"
    -H "Authorization: Bearer <your-API-access-token>"
    -H "Content-Type: application/json-patch+json"
    -d '{
      "displayName": "Example transaction portfolio",
      "code": "Income",
      "created": "2023-01-01T00:00:00Z",
      "baseCurrency": "GBP",
      "instrumentScopes": ["my-secret-instr-scope"],
      "transactionTypeScope": "my-secret-TT-scope",
      "subHoldingKeys": ["Transaction/Strategy/Signal"],
      "corporateActionSourceId": {
        "scope": "Sources",
        "code": "VendorA"
      },
      "properties": {
        "Portfolio/Manager/Name": {
          "key": "Portfolio/Manager/Name",
          "value": {
            "labelValue": "John Doe"
          },
          "effectiveFrom": "2023-02-05T12:00:00.0000000+00:00"
        }
      }
    }'

    Note the response does not contain all the fields, so to confirm the transaction portfolio has been created as specified, call the GetDetails API:

    {
      "originPortfolioId": {
        "scope": "myexamplescope",
        "code": "Income"
      },
      "version": {
        "effectiveFrom": "2023-01-01T00:00:00.0000000+00:00",
        "asAtDate": "2023-03-02T11:17:20.6381780+00:00"
      },
      "baseCurrency": "GBP",
      "corporateActionSourceId": {
        "scope": "Sources",
        "code": "VendorA"
      },
      "subHoldingKeys": [
        "Transaction/Strategy/Signal"
      ],
      "instrumentScopes": ["my-secret-instr-scope"],
      "accountingMethod": "Default",
      "amortisationMethod": "NoAmortisation",
      "transactionTypeScope": "my-secret-TT-scope",
    }
    

Using the LUSID web app

  1. Sign in to the LUSID web app using the credentials of a LUSID administrator.

  2. From the top left menu, select Data Management > Portfolios.

  3. Click the Create Portfolio button (top right).

  4. On the Basic data screen of the Create Portfolio dialog, choose Transaction from the Type dropdown menu, and specify a Scope, Code and Effective date:
     

  5. On the Details screen, specify a Base currency using an ISO 4217 currency code, for example GBP or JPY.

  6. Complete the other optional fields if desired and click the Create button.