Views:

The following table explains how LUSID calculates accrued interest for supported instruments.

InstrumentLUSID's accrued interest calculation
BasketSum of basket accrued. Currency mixes not supported.
BondVarious. See Diagnostics.
ComplexBond
InflationLinkedBondAccrual using flow convention day count, adjusted for inflation.
CreditDefaultSwapAccrual on premium leg only using flow convention day count, assuming no default.
CdsIndexAccrual on premium leg only using flow convention day count, assuming no default.
EquitySwapAccrual on funding leg only, no equity.
FixedLegAccrual using flow convention day count.
FloatingLegAccrual using flow convention day count. For SOFR/OIS, known daily resets are compounded. For in arrears, 0 is returned.
FundingLegAccrual on daily notional amounts (same as FloatingLeg).
InflationSwapCPI swap is zero coupon so 0 is always returned. YoY/LPI swap returns sum of two accruals, using same day count form interest leg on both.
InterestRateSwapSum of leg accruals. No FX conversion considered.
RepoAccrual on interest using AccrualBasis day count.
SimpleCashFlowLoanDays accrued divided by days in period multipled by the period interest amount.
TermDepositAccrual using flow convention day count and a calendar where every week day is a good business day (no holidays).

Diagnosing accrued interest calculations in valuation reports

You can include any of the following diagnostics metrics (highlighed in red) in a valuation report for instruments in the table above to further understand LUSID's accrued interest calculation:

curl -X POST "https://<your-domain>.lusid.com/api/api/aggregation/$valuation"
  -H "Authorization: Bearer <your-API-access-token>"
  -H "Content-Type: application/json-patch+json"
  -d '{
    "portfolioEntityIds": [ {"scope": "FBNUniversity", "code": "Module-4-1", "portfolioEntityType": "SinglePortfolio"} ],
    "valuationSchedule": {"effectiveFrom": "2022-03-07T00:00:00.0000000+00:00", "effectiveAt": "2022-03-11T00:00:00.0000000+00:00" },
    "recipeId": {"scope": "FBNUniversity", "code": "Module-4-1Recipe"},
    "metrics": [
      {"key": "Valuation/EffectiveAt", "op": "Value"},
      {"key": "Instrument/default/Name", "op": "Value"},
      {"key": "Valuation/PvInPortfolioCcy", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/DaysAccrued", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/DaysInPeriod", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/AccrualDescription", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/AccrualFactor", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/PaymentFrequency", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/AccrualStartDate", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/AccrualEndDate", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/AccrualCalculationDate", "op": "Value"},
      {"key": "Valuation/Diagnostics/Accrual/AccrualDayCountType", "op": "Value"}
    ]
  }'

For a UK government bond, the response might be as follows:

{
  "aggregationEffectiveAt": "2022-03-07T00:00:00.0000000+00:00",
  "aggregationAsAt": "2023-09-05T08:49:20.1445980+00:00",
  "data": [
    {
      "Valuation/EffectiveAt": "2022-03-07T00:00:00.0000000+00:00",
      "Instrument/default/Name": "UKT 0 ⅜ 10/22/26",
      "Valuation/PV": 10134.010989010989,
      "Valuation/Diagnostics/Accrual/DaysAccrued": 136,
      "Valuation/Diagnostics/Accrual/DaysInPeriod": 182,
      "Valuation/Diagnostics/Accrual/AccrualDescription": "Notional * (CouponRate / Frequency) * AccrualFactor",
      "Valuation/Diagnostics/Accrual/AccrualFactor": 0.7472527472527473,
      "Valuation/Diagnostics/Accrual/PaymentFrequency": "6M",
      "Valuation/Diagnostics/Accrual/AccrualStartDate": "2021-10-22T00:00:00.0000000+00:00",
      "Valuation/Diagnostics/Accrual/AccrualEndDate": "2022-04-22T00:00:00.0000000+00:00",
      "Valuation/Diagnostics/Accrual/AccrualCalculationDate": "2022-03-07T00:00:00.0000000+00:00",
      "Valuation/Diagnostics/Accrual/AccrualDayCountType": "ActualActual"
    }
  ],
  "aggregationCurrency": "GBP",
  ...
}