How do I create a pricing template?

Prev Next

You can create a pricing template (also known as a fund configuration module) that identifies general ledger accounts in an existing chart of accounts (CoA) responsible for recording activity such as dealing (subscriptions and redemptions) and P&L.

This is important because LUSID calculates fund GAV as dealing plus P&L.

Methods

Call the CreateFundConfiguration API:

curl -X POST 'https://<your-domain>.lusid.com/api/api/fundconfigurations/MyFunds'
  -H 'Content-Type: application/json-patch+json'
  -H 'Authorization: Bearer <your-API-access-token>'
  -d '{
  "code": "Standard",
  "displayName": "Standard pricing template",
  "dealingFilters": [
    {
      "filterId": "SUBS",
      "filter": "generalLedgerAccountCode eq '3-Subscriptions'"
    },
    {
      "filterId": "REDS",
      "filter": "generalLedgerAccountCode eq '4-Redemptions'"
    }
  ],
  "pnlFilters": [
    {
      "filterId": "PnL",
      "filter": "generalLedgerAccountCode eq '5-PnL'"
    }
  ]
}'

Navigate to Fund Accounting > Pricing templates and click the Create pricing template button:

Write a Luminesce SQL query using the Lusid.FundConfiguration.Writer provider and execute it from a tool such as the LUSID web app:

Data fields and properties

This section supplements the API documentation and on-screen help text in the LUSID web app.

Fields

Note: Please do not add backOutFilters or externalFeeFilters for now.

A pricing template is identified by a scope and a code that must be unique within that scope.

You should specify at least one filter for each of:

  • dealingFilters to identify account(s) associated with subscription and redemption activity.

  • pnlFilters to identify account(s) associated with profit and loss.

If you specify multiple filters for either, note the order is significant; LUSID uses the first matching filter found. Each filter must consist of:

  • A filterId that can be any meaningful string uniquely identifying it in the set.

  • A filter expression. Syntax and allowed values.

Properties

You can optionally extend the data model of a pricing template by adding custom properties from the FundConfiguration domain, either when you create it or subsequently using the UpsertFundConfigurationProperties API.

Subsequent updates

Once a pricing template is created, you can change most aspects using the PatchFundConfiguration API.

Note the easiest way to change the order of filters is to use the grab handles in the LUSID web app:

Syntax of a filter

The syntax of a filter expression is:

<attribute> <operator> <value>

...where:

Note the following:

  • A filter expression is case-insensitive.

  • A string <value> must be enclosed in single straight quote marks (the %27 UTF-8 encoding).

  • You can concatenate expressions using the and and or operators. If you use both, standard boolean operator precedence applies.

<attribute>

Data type

Example expression

Explanation/origin of <value>

An account field

System-defined

Account.type in 'Asset', 'Liabilities'

This can be any of the stored fields for an account, prefixed by Account. Nested fields can be accessed using dot notation.

An account property

User-defined

properties[Account/Type/AssetClass] eq 'Equity'

This can be any property with a 3-stage key in the Account domain.

A fund property

User-defined

properties[Fund/Managers/Name] eq 'Fred Bloggs'

This can be any property with a 3-stage key in the Fund domain.

An ABOR property (V1 funds only)

User-defined

properties[Abor/Client/Accountant] not in 'Fred Bloggs', 'Sarah Smart'

This can be any property with a 3-stage key in the Abor domain.