Documentation Index

Fetch the complete documentation index at: https://support.lusid.com/llms.txt

Use this file to discover all available pages before exploring further.

How do I create a pricing template?

Prev Next

You can create a pricing template (also known as a fund configuration module) that classifies particular journal entry (JE) lines into multiple, independent ‘buckets’ per valuation point, supporting parallel views such as income/capital splits, taxable income breakdowns and fee reporting.

You must specify at least one bucket set that:

  1. Classifies JE lines representing non-class-specific dealing, P&L and fees generated from economic activity during the current valuation point.

  2. Apportions amounts between the share classes in a unitised fund according to a formula when the valuation point is finalised.

You can specify additional bucket sets for observational reporting if you want.

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": "MyPricingTemplate",
  "displayName": "Primary pricing template",
  "apportionmentBucketSet": "apportionment",
  "apportionmentMethodProperty": "default"
  "bucketSets": [
    {
      "code": "apportionment",
      "displayName": "Apportionment bucket set",
      "navTypes": null,
      "unitised": true,
      "buckets": [
        {
          "bucketId": "dealing",
          "displayName": "Dealing",
          "filterExpression": "economicBucket eq 'CA_Capital'",
          "bucketType": "dealing",
          "unitised": null
        },
        {
          "bucketId": "fees",
          "displayName": "Fees",
          "filterExpression": "economicBucket eq 'PL_Fees'",
          "bucketType": "fees",
          "unitised": null
        },
        {
          "bucketId": "pnl",
          "displayName": "P&L",
          "filterExpression": "economicBucket startswith 'PL'",
          "bucketType": "pnl",
          "unitised": null
        }
      ]
    }
  ]
}'

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: Do not specify the legacy dealingFilters, pnlFilters, backOutFilters or externalFeeFilters fields.

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

You must specify an apportionmentBucketSet referencing the code of a particular bucket set (see below). The non-class-specifc dealing, P&L and fee-related JE lines classified in this bucket set are apportioned between share classes according to the chosen apportionment method.

By default, the apportionmentMethodProperty references the scope and code of the PriorAdjustedNAV built-in apportionment method. You can switch to a different built-in apportionment method, or create your own.

You must specify at least one bucket set in the bucketSets array, uniquely identified by code and with a meaningful displayName. In addition:

  • You can optionally specify one or more navTypes to which the bucket set applies. If omitted, the bucket set applies to all NAV types.

  • Set unitised to False for now.

You must specify at least one bucket in the buckets array, uniquely identified by bucketId and with a meaningul displayName. In addition:

  • You must specify a filterExpression to classify JE Lines appropriately. Syntax and allowed values.

  • Set unitised to False for now.

  • You must specify a bucketType. Note the following:

    • Flow buckets are populated with JE lines when a valuation point is finalised. They support cumulative running totals, can be unitised, and may be cleared down.

    • Snapshot buckets are populated from general ledger (GL) account closing balances. They do not support cumulative running totals, nor participate in NAV apportionment nor unitisation.

    bucketType

    Category

    Intended to classify…

    Dealing

    Flow

    Subscription and redemption JE lines. Note this bucket type:

    • Can carry forward cumulatively through clear down.

    • Is eligible to received cleared-down balances from other flow bucket types.

    Fees

    P&L JE lines specific to fund fees.

    PnL

    All non-fee P&L JE lines.

    Breakdown

    Snapshot

    JE Lines assigned to balance sheet GL accounts (assets, liabilities and capital).

    Misc

    JE lines assigned to any GL account, for flexible reporting across balance sheet and P&L.

Note if you specify more than one bucket, the order is important; LUSID classifies each JE line using the first matching filter found. Consider the following example of three ordered buckets:

  1. JE lines with a CA_Capital economic bucket are classified in the Dealing bucket.

  2. JE lines with a PL_Fees economic bucket are classified in the Fees bucket.

  3. All other P&L JE lines are classified in the PnL bucket.

If buckets two and three were reversed, fees would be classified in the PnL bucket and Fees would be empty.

"bucketSets": [
  {
    "code": "apportionment",
    "displayName": "Apportionment bucket set",
    "unitised": true,
    "buckets": [
      {
        "bucketId": "dealing",
        "displayName": "Dealing bucket",
        "filterExpression": "economicBucket eq 'CA_Capital'",
        "bucketType": "dealing"
      },
      {
        "bucketId": "fees",
        "displayName": "Fees bucket",
        "filterExpression": "economicBucket eq 'PL_Fees'",
        "bucketType": "Fees"
      },
      {
        "bucketId": "pnl",
        "displayName": "P&L bucket",
        "filterExpression": "economicBucket startswith 'PL'",
        "bucketType": "PnL"
      }
    ]
  }
],

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 re-order buckets in a bucket set is to use the grab handles in the LUSID web app:

Syntax of a filter

The syntax of a filterExpression 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>

A JE line field

System-defined

economicBucket startswith ‘PL’

This can be any of the stored fields for a JE line.

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.

Apportionment methods

LUSID provides the following built-in apportionment methods, defined as system properties in the AllocationMethod domain.

A method calculates an apportionment factor for each share class according to a formula, which is a percentage of the total to allocate to that share class.

Method

Property key

How the apportionment factor is calculated

Prior NAV +/- Subs & Reds

AllocationMethod/default/PriorAdjustedNav

The share class NAV at the previous valuation point plus the sum of share class dealing, P&L and fees during the current valuation point.

Prior NAV +/- Subs & Reds (pre-Hedging)

AllocationMethod/default/PriorAdjustedNavPreHedging

As above, but excluding certain GL accounts classed as hedging P&L.

Prior GAV +/- Subs & Reds

AllocationMethod/default/PriorAdjustedGav

The share class GAV at the previous valuation point plus the sum of share class-specific dealing and P&L during the current valuation point (excludes fees)

Prior GAV +/- Subs & Reds (pre-Mgmt Fee)

AllocationMethod/default/PriorAdjustedGavPreMgmtFee

As above, but excluding certain GL accounts classed as management fees.

Committed Capital

AllocationMethod/default/CommittedCapital

The capital committed to the share class (not drawn down).

Funded Capital

AllocationMethod/default/FundedCapital

The capital commited to the share class and drawn down.