You must specify rules to post the journal entry lines automatically generated by LUSID in reponse to portfolio activity to general ledger accounts. To do this:
Add a posting module to your chart of accounts (CoA) with posting rules that assign journal entry lines matching particular criteria to specific accounts.
Apply the code of the posting module to each NAV type in your fund.
A posting module contains posting rules in a specific order. For each journal entry line, LUSID applies the first matching posting rule found. Unmatched journal entry lines remain unassigned. The goal of a posting module is to create a waterfall of logic that ensures all economic activity is assigned. Syntax of a posting rule.
Consider the following example, of a posting module with five posting rules:
{
"values": [
{
"ruleId": "rule_01",
"account": "3-Capital",
"ruleFilter": "EconomicBucket startswith 'CA'"
},
{
"ruleId": "rule_02",
"account": "1-Investments",
"ruleFilter": "HoldType eq 'P' and EconomicBucket startswith 'NA'"
},
{
"ruleId": "rule_03",
"account": "4-PnL",
"ruleFilter": "EconomicBucket startswith 'PL'"
},
{
"ruleId": "rule_04",
"account": "2-Cash",
"ruleFilter": "HoldType neq 'P' and EconomicBucket startswith 'NA'"
},
{
"ruleId": "rule_05",
"account": "Error",
"ruleFilter": "True"
}
]
}
For each generated journal entry line, LUSID automatically:
Assigns the amount to the
3-Capital
account if the economic bucket starts withCA
.If not, assigns the amount to the
1-Investments
account if the economic bucket starts withNA
and the holding type code isP
(position, signifying a non-currency holding).If not, assigns the amount to the
4-PnL
account if the economic bucket starts withPL
.If not, assigns the amount to the
2-Cash
account if the economic bucket starts withNA
and the holding type code is not equal toP
(that is, is a currency holding).If not, assigns the amount to an
Error
account for manual remediation.
In this example, rule 5 is a 'catch all' rule that assigns unmatched journal entry lines to a general-purpose account. You could omit rule 5, in which case any journal entry lines failing to match rules 1, 2, 3 and 4 would remain unassigned.