Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How Floating-Rate Loan Algorithms Calculate SOFR Interest: Daily Compounding, Lookbacks, Floors, Day Counts and Benchmark Fallbacks

Quick answer: a SOFR-linked floating-rate loan is not calculated by taking one monthly number and multiplying it by principal. SOFR is an overnight secured financing rate. A loan contract must specify how daily observations are converted into an interest rate for the accrual period, how weekends and holidays are handled, whether rates are compounded or applied using daily simple interest, whether the observation dates are shifted backward through a lookback, which day-count convention applies, how the contractual credit spread and any floor are added, when the amount becomes known before payment, and what happens if the benchmark is unavailable or replaced. The algorithm is therefore a date-indexed recurrence with legal conventions attached.

With an overnight benchmark, the interest rate for a three-month loan period can be an output of ninety daily observations rather than one input known on Day 1.

Page role: How Yield-Curve Algorithms Build the Term Structure owns discount curves and forward rates. How Banks Calculate Loan Repayments owns fixed repayment schedules. This page owns the narrower operational mathematics of turning daily SOFR observations into a floating-rate loan interest amount.

1. SOFR is an overnight rate, not a three-month quotation

The Federal Reserve Bank of New York administers SOFR as a broad measure of the cost of borrowing cash overnight against US Treasury securities. The rate is transaction-based and incorporates several Treasury repo market segments. Under the current methodology, 20% of the lowest-rate volume in the centrally cleared DVP segment is removed to reduce the influence of “specials” transactions. See the New York Fed’s current reference-rate methodology.

That creates the first design choice for a loan: if interest is payable every one or three months, how do many overnight rates become one amount?

2. Daily simple interest: add each day’s accrual

One approach applies each day’s rate directly to the principal for the number of calendar days that rate is effective. If P is principal, ri the applicable annualised daily rate, ni the calendar days for which it applies and D the day-count denominator, then:

Interest ≈ P × Σ[(ri + spread) × ni/D].

This is “daily simple” in the sense that each daily interest amount is summed rather than itself compounded into the next day’s base. It can be operationally easier for some loan systems.

3. Compounded in arrears: multiply daily growth factors

A compounded approach instead constructs a cumulative growth factor:

G = Π[1 + ri × ni/D].

The compounded benchmark return over the period is G−1. If the loan adds a contractual margin m, the exact contract may apply the margin outside the SOFR compounding, compound it with SOFR, or use another documented convention. The implementation must follow the contract, not a generic formula copied from another product.

The New York Fed’s SOFR Averages and SOFR Index use daily compounding on business days, while simple interest applies over intervening non-business days using the preceding business day’s SOFR. US money-market convention uses actual calendar days over a 360-day year. See Additional Information about Reference Rates.

4. A weekend is three calendar days, not one missing observation

Suppose Friday SOFR is 5.20% and the next publication is Monday’s rate for Monday value. The Friday observation usually applies through Saturday and Sunday as well. In a typical weekend the Friday term therefore uses n=3 calendar days:

1 + 0.0520 × 3/360.

A system that simply counts one row per published rate without carrying the rate across weekends will under-accrue interest. Calendar logic is part of the mathematics.

5. The SOFR Index can collapse hundreds of daily multiplications

The New York Fed publishes a SOFR Index representing the cumulative effect of compounding SOFR since 2 April 2018. For suitable start and end dates, a compounded average can be derived from the ratio of index values rather than independently multiplying every daily observation.

If Is and Ie are index values at the start and end of the observation period, a teaching form is:

compounded return = Ie/Is − 1.

Annualisation then depends on the period day count. This is an excellent independent check against a loan engine’s daily recurrence, provided both calculations use the same observation dates and conventions.

6. Why “in arrears” creates a payment-timing problem

If the interest period runs from 1 January to 31 March and the benchmark uses daily SOFR throughout that period, the final rate is not fully known until near the end. Operations still need time to calculate, invoice and settle the payment.

Market conventions therefore use devices such as:

  • lookback: use SOFR observations from several business days earlier;
  • observation shift: shift both the rate observation and weighting calendar;
  • lockout: freeze the rate during the final days of the interest period;
  • payment delay: calculate through period-end but pay several days later.

The Alternative Reference Rates Committee (ARRC) published conventions for business loans that describe these approaches. The goal is operational time, not mathematical decoration.

7. Lookback without observation shift

With a five-business-day lookback, the accrual date might be 15 June but the rate used is the SOFR observation from five business days earlier. The accrual still belongs to 15 June’s calendar-day weight.

Algorithmically:

rate_date = business_day_shift(accrual_date, −k)

while:

day_weight = calendar_days_until_next_accrual_business_day.

The rate calendar and accrual calendar are therefore related but not identical.

8. Observation shift changes the weights too

An observation shift moves the observation window itself. The number of calendar days attached to a rate follows the shifted observation period. This can align more closely with derivatives conventions and hedge calculations, but it requires more precise date logic.

Two loans can both say “five-day lookback” in casual conversation yet produce different accrued interest if one uses observation shift and the other does not. The contract language and system configuration must agree.

9. A miniature compounding example

Take a simplified S$1,000,000 principal with three rate blocks:

RateCalendar days
5.00%1
5.10%1
5.20%3

The compounded SOFR growth factor is:

(1+0.05/360)(1+0.051/360)(1+0.052×3/360).

Subtract 1 to obtain the period benchmark return. If a contractual margin of 2.00% is applied using daily simple margin accrual, margin interest over five days is approximately:

1,000,000 × 0.02 × 5/360 = S$277.78.

The example deliberately separates the benchmark from the margin because contracts can differ in how they combine the two.

10. Rate floors need an exact point of application

A loan may specify that the reference rate cannot fall below zero or another floor. But a fallback contract may also contain a historical spread adjustment between LIBOR and SOFR. The question becomes: does the floor apply to SOFR alone, to SOFR plus the spread adjustment, or to the final all-in rate?

ARRC fallback conventions addressed this explicitly for legacy loans. Its published conventions explain that existing LIBOR floors migrating to certain Term SOFR or SOFR Average fallbacks are applied to the replacement benchmark plus the associated ARRC spread adjustment. See the ARRC’s SOFR conventions document.

This is a systems lesson: a “floor” field without a definition of which intermediate quantity it floors is incomplete data.

11. Term SOFR and compounded SOFR solve different operational problems

Backward-looking compounded SOFR is built from realised overnight observations. Term SOFR is a forward-looking term benchmark derived from derivatives-market information and is available for specified tenors through an administrator. Some business-loan conventions permit Term SOFR in defined use cases.

The distinction matters:

  • Term SOFR can make the rate known near the beginning of the period;
  • compounded-in-arrears SOFR reflects realised overnight funding conditions through the period;
  • hedging alignment may differ;
  • licensing and market-use conventions can differ.

A bank should not substitute one for another merely because both contain the word SOFR.

12. Benchmark fallback is a decision tree

LIBOR transition showed why a loan needs explicit fallback logic. In the United States, the Adjustable Interest Rate (LIBOR) Act and Federal Reserve Regulation ZZ created SOFR-based benchmark replacements for certain tough legacy contracts lacking practicable fallbacks after USD LIBOR cessation. See the Federal Reserve’s Regulation ZZ summary.

A generic fallback engine may contain:

  1. Is the current benchmark available and permitted?
  2. Has a contractual cessation or non-representativeness trigger occurred?
  3. Which replacement benchmark has contractual priority?
  4. Is a spread adjustment required?
  5. Which conforming changes to dates, conventions or calculations become effective?
  6. What effective date applies?
  7. Does the floor/cap apply before or after the adjustment?

The fallback is therefore not “replace the label LIBOR with SOFR.” It is a versioned transformation of the entire rate-calculation contract.

13. Rounding can create real reconciliation differences

If daily rates are rounded before compounding, the result can differ from compounding full-precision rates and rounding only the final rate. The same applies to daily interest amounts.

A robust engine specifies:

  • input rate precision;
  • intermediate calculation precision;
  • final rate precision;
  • currency amount rounding;
  • rounding mode;
  • where each rounding step occurs.

Without those controls, two systems can implement the same formula and still disagree by small but recurring amounts.

14. Business-day calendars are model inputs

The engine needs a calendar defining which days are SOFR publication/business days and how contractual payment dates adjust around weekends and holidays. Calendar updates are therefore reference-data changes with financial consequences.

A one-day calendar error can:

  • select the wrong SOFR observation;
  • assign the wrong weekend weight;
  • shift the interest-period end;
  • change the payment date;
  • misalign a hedge.

This is a good example of an apparently administrative table becoming part of the mathematical model.

15. Alternatives and independent checks

A loan-calculation engine can be challenged by several independent routes:

  • recalculate daily accruals from raw SOFR observations;
  • compare compounded results with SOFR Index ratios;
  • compare a simple-SOFR contract with its documented formula rather than a compounded benchmark;
  • recompute using a second business-day calendar library;
  • compare expected payment with borrower/lender agent notices;
  • validate hedge sensitivity against the actual reset convention.

The strongest check fails differently from the production method.

16. Failure modes

  • Monthly-rate shortcut. Overnight SOFR is treated as if one period rate existed automatically.
  • Weekend undercount. Friday’s rate receives one day instead of the relevant calendar-day span.
  • Simple/compound confusion. The wrong accumulation method is used.
  • Lookback/shift confusion. Rate dates shift but day weights do not, or vice versa, contrary to contract.
  • Floor-placement error. The floor is applied to the wrong intermediate rate.
  • Rounding drift. Intermediate rounding creates unexplained differences.
  • Fallback incompleteness. Benchmark replacement occurs without the required spread or conforming changes.
  • Calendar drift. Holidays/business days differ across systems.
  • Hedge mismatch. Loan accrues using one convention while derivative hedge references another.

17. Diagnostics and falsifiers

  • Can the system reproduce the published New York Fed SOFR Index over a test period?
  • Does a three-day weekend receive the correct calendar-day weight?
  • What changes if daily simple is substituted for compounded SOFR?
  • Does the lookback implementation match the contract’s observation-shift language?
  • At which exact step is the benchmark floor applied?
  • Can the fallback engine reproduce a known legacy LIBOR-to-SOFR example?
  • Do two independent systems agree before rounding?
  • Does the interest notice reconcile to principal, dates, rates and spread?

Suppose someone claims, “SOFR was 5%, so a three-month loan accrued exactly 5%/4.” A falsifier is a period in which overnight SOFR changes through the quarter. A compounded-in-arrears contract necessarily reflects the sequence and day weights of the actual daily observations.

18. Verification and update triggers

  • reconcile rate observations to the official administrator source;
  • unit-test weekends, holidays, leap years and short periods;
  • independently verify lookback and observation-shift date maps;
  • compare daily recurrence with SOFR Index calculations where applicable;
  • version contractual conventions at facility level;
  • re-test after benchmark-administrator methodology changes;
  • re-test after calendar-library or core-loan-system updates;
  • preserve historical benchmark data and rule versions so old interest periods remain reproducible.

Connections across the finance-and-banking algorithms lane

Research anchors

The deeper lesson

Floating-rate loan interest is time-indexed mathematics constrained by contracts. The benchmark is an observed sequence. The calendar supplies weights. Compounding specifies how the sequence accumulates. Lookbacks move information earlier. Floors and spreads transform the benchmark. Fallbacks replace the reference system when it fails or ceases. A strong implementation can explain every cent by reconstructing the dates, rates and rule version that produced it.

Educational note: Loan conventions differ by contract, jurisdiction and product. This article explains public benchmark mathematics and is not borrowing, lending, hedging or legal advice.

Discover more from Bukit Timah Tutor

Subscribe now to keep reading and get access to the full archive.

Continue reading