Providing you have suitable access control permissions, you can create a wide range of compliance rules to use in pre- and post-trade compliance runs. See what compliance rules LUSID supports.
Compliance rules are built using compliance rule templates, and it’s important you are familiar with how compliance rules and templates in LUSID work before creating your own.
A compliance rule in LUSID starts by taking a set of holdings decorated with valuation metrics or other properties and, optionally, factoring in outstanding orders; these are known as contributions. A sequence of filtering and grouping operations are then applied to the contributions to check if a particular rule is being met.
You can learn more about each operation below:
Operation | Explanation | Example |
GroupBy | Groups compliance run contributions using a single field. Existing groups are subdivided. | Group by Group by |
Filter | Filters out contributions from groups based on a reference list of values or a LUSID filtering syntax statement. Each group’s contributions will stay the same or decrease. | Filter out instruments with an |
GroupFilter | Filters out groups rather than contributions within groups. The number of groups will stay the same or decrease. | Filter out portfolios with a |
Check | Filters contributions based on a check or compare statement and places them in Pass and Fail sets. Warning values can be defined to issue warnings when contributions are close to breaching limits. | Check if grouped and filtered contributions contribute less than 20% |
Recombine | Merges all groups/contributions back into a single group. | Recombine all groups together to perform a final check. |
For example, to create a rule that checks no portfolio has more than 20% exposure to any one country, you might imagine splitting the rule into the following sequence of operations:
Note the Steps on the left hand side label each operation applied to your holdings so you can track the lineage of a compliance run result.
A compliance rule template has a predefined set of operations which you can supply with values to create your own compliance rule.
Method 1: Using the LUSID web app
Method 2: Using the LUSID API
Using the LUSID web app
Sign in to the LUSID web app.
From the top left menu, navigate to Compliance > Rule Manager:
Select Create compliance rule.
Supply:
A Scope and RuleID that together uniquely identify the compliance rule. Note that the default Scope is
PMS
; rules created in this scope are automatically included in pre-trade compliance runs in the Order Blotter if you choose to enable the rule as soon as it’s created.A friendly Name and Description for the rule.
The Portfolio Group which the rule should apply to.
Whether the rule should be enabled as soon as it’s created.
Select a Template and Template variation. Each template allows you to customise values for a particular sequence of operations that together build a compliance rule. You can read a template’s Description to learn more about it.
Provide the required values for the operations in your rule. For example, to create a rule that no portfolio can exceed 20% exposure to any one country, you might select the PercentCheck template with its standard variation. You could then supply the following values to create your rule:
Click Save to create your rule.
See how to run pre-trade compliance and view the results.
Using the LUSID API
You could use the LUSID API to create a compliance rule.
The syntax of the JSON object you need to provide in the body of the request to the LUSID POST /api/compliance/rules API endpoint is complicated, however, and highly specific to the nature of the rule you are trying to create.
Currently, we recommend creating the compliance rule in the LUSID web app. Once created, you can manage the compliance rule entirely programmatically.