You can configure LUSID to round accrued interest and/or cashflows to a specific number of decimal places for the following instruments:
By default, no rounding is applied at the instrument level. You have the option to apply the standard ISO 4217 currency rounding convention in a recipe.
Consider the following example of a fixed-rate vanilla bond mastered as an instrument of type Bond:
curl -X POST 'https://mydomain.lusid.com/api/api/instruments'
-H 'Content-Type: application/json-patch+json'
-H 'Authorization: Bearer myAPIAccessToken'
-d '{"upsert-request-1": {
"name": "UKT 0 ⅜ 10/22/26",
"identifiers": {"Figi": {"value": "BBG00ZF1T9P5"}},
"definition": {
"instrumentType": "Bond",
"startDate": "2016-10-22T10:00:00.0000000+00:00",
"maturityDate": "2026-10-22T10:00:00.0000000+00:00",
"domCcy": "GBP",
"couponRate": 0.00375,
"principal": 1
"flowConventions": {
"currency": "GBP",
"paymentFrequency": "12M",
"dayCountConvention": "Actual365",
"rollConvention": "22",
"businessDayConvention": "Following"
},
"roundingConventions": [
{
"roundingTarget": "AccruedInterest",
"faceValue": 100,
"precision": 10,
"roundingType": "Up"
},
{
"roundingTarget": "Cashflows",
"faceValue": 100,
"precision": 6,
"roundingType": "Down"
},
]
}
}
}'Note the following:
The instrument definition has a
roundingConventionsarray with two RoundingConvention objects.The first has a
roundingTargetofAccruedInterest, which impacts theInstrument/Accruedmetric available when calling the GetValuation API, and rounds up to 10 decimal places.The second has a
roundingTargetofCashflows, which impacts the GetCashLadder API, and rounds down to 6 decimal places.Both have a
faceValueof the par value specified in the bond prospectus.
Note: To define a universal rounding convention, specify a single
RoundingConventionobject with aroundingTargetofAll.
LUSID applies a rounding convention as follows:
Calculates the unitised accrued interest or cashflow amount.
Multipies by the face value.
Applies the rounding convention.
Inverts the rounded scaled accrued interest or cashflow amount.
Multiplies by the number of units in the holding.
Applies the ISO 4217 currency rounding convention in a recipe, if applicable.