How does LUSID calculate accrued interest?

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

Instrument

LUSID's accrued interest calculation

Basket

Sum of basket accrued. Currency mixes not supported.

Bond

Various. See Diagnostics.

ComplexBond

InflationLinkedBond

Accrual using flow convention day count, adjusted for inflation.

CreditDefaultSwap

Accrual on premium leg only using flow convention day count, assuming no default.

CdsIndex

Accrual on premium leg only using flow convention day count, assuming no default.

EquitySwap

Accrual on funding leg only, no equity.

FixedLeg

Accrual using flow convention day count.

FloatingLeg

Accrual using flow convention day count. For SOFR/OIS, known daily resets are compounded. For in arrears, 0 is returned.

FundingLeg

Accrual on daily notional amounts (same as FloatingLeg).

InflationSwap

CPI 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.

InterestRateSwap

Sum of leg accruals. No FX conversion considered.

Repo

Accrual on interest using AccrualBasis day count.

SimpleCashFlowLoan

Days accrued divided by days in period multipled by the period interest amount.

TermDeposit

Accrual 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 metrics 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",
  ...
}