TQBTHEQUANTBATEMAN
TQB/ learn/ rates/ day count conventionsEN · DARK
Rates & curves · foundation

Rate conventions, calendars and schedules

Treating dates, accruals and quote syntax as executable valuation inputs

BY THE END, YOU CAN

01Compute ACT/360, ACT/365F and 30/360 accrual factors.

02Separate business-day adjustment from the accrual-period definition.

03Translate simple, periodic and continuous compounding without changing economic value.

04Build a schedule whose stubs, lags and payment dates are auditable.

01
INTUITION

Read the cash-flow timeline first.

Rates products are contracts on dates. A day-count basis, holiday calendar, roll rule, fixing lag and stub convention change cash flows before any pricing model is called.

01

The same two dates can produce different accrual factors under different bases.

02

Adjusted payment dates and unadjusted accrual boundaries serve different contractual roles.

03

Rate conversion is valid only when the horizon and accrual factor are held fixed.

02
WHY MARKETS CARE

Start from cash flows and quotation.

Schedule errors create deterministic P&L breaks, failed confirmations and unexplained basis risk across bonds, swaps, FRAs and floating coupons.

INSTRUMENTS

deposits

bonds

FRAs

OIS and term swaps

QUOTE CONVENTION

Every quote must carry currency, index, tenor, spot lag, day count, compounding, business-day convention and calendar set.

03
MATHEMATICS

Value each dated cash flow under explicit conventions.

Formula · Definition

Simple accumulation

A(d1,d2)=1+rs δB(d1,d2)A(d_1,d_2)=1+r_s\,\delta_B(d_1,d_2)

Money-market coupons scale by the contract’s basis-specific accrual factor.

Open in Analytics
Formula · Short derivation

Periodic-to-continuous conversion

rc=Nln⁡(1+rNN)r_c=N\ln\left(1+\frac{r_N}{N}\right)

Equivalent rates preserve the accumulation factor over one year.

Open in Analytics
Short derivation
Short derivation

Preserving one economic payoff across quote conventions

Equate accumulation factors rather than equating the displayed rate numbers.

  1. 01

    Freeze the contractual dates

    Identify unadjusted accrual boundaries, adjusted payment date, fixing date and settlement date before computing time.

  2. 02

    Apply the contractual basis

    Compute δ_B on the accrual boundaries. Do not substitute an ACT/365-like model clock for a coupon’s contractual ACT/360 basis.

  3. 03

    Equate accumulation factors

    Set simple, periodic or continuous accumulation equal over the same horizon.

    1+rsδ=(1+rN/N)Nδ=ercδ1+r_s\delta=\left(1+r_N/N\right)^{N\delta}=e^{r_c\delta}
  4. 04

    Validate the schedule

    Check monotonic dates, expected period count, stub location and that every fixing precedes its payment under the index convention.

Conventions are not labels around a model; they determine the model inputs and contractual cash flows.

Inputs
  • δ_B(d_1,d_2): basis-specific year fraction
  • N: periodic compounding frequency
  • r_c: continuous rate
  • r_s: simple rate
Assumptions and limits
  • Holiday calendars change over time and require version control.
  • Cross-currency products can combine calendars and settlement lags.
  • Educational year fractions omit many market-specific edge cases.
Formula · Definition

Stub coupon

C=Nnotional r δB(dstart,dend)C=N_{notional}\,r\,\delta_B(d_{start},d_{end})

Irregular periods change cash amount through the actual contractual accrual.

Open in Analytics
05
MODEL / PRICING

Build, calibrate, and reprice the contract.

METHOD

Represent dates and conventions as typed inputs, generate schedules once, then price from the resulting dated cash flows.

CALIBRATION

Normalize market quotes to internal discount or forward representations only after instrument-specific helpers have reproduced every convention.

Implementation with current QuantLib

Compose Calendar, DayCounter, BusinessDayConvention, DateGeneration rule and Schedule explicitly. Use index objects for fixing conventions; avoid hand-built date arithmetic once production calendars matter.

API authority: upstream QuantLib reference pinned in the source registry.
06PYTHON IMPLEMENTATIONOpen the implementation and checks.
ARCHITECTURE
  • Parse dated market inputs and conventions at the boundary.
  • Build deterministic curve objects in the framework-free quant layer.
  • Return PV, repricing residuals and sensitivities together.
  • Test inversion, par conditions, monotonic dates and invalid domains.
PYTHON 3 · NUMPY / SCIPY

Equivalent compounding conventions

Convert one simple rate to an economically equivalent continuous rate.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03import math
04
05def simple_to_continuous(rate: float, accrual: float) -> float:
06 if accrual <= 0 or 1.0 + rate * accrual <= 0:
07 raise ValueError("invalid simple accumulation")
08 return math.log1p(rate * accrual) / accrual
09
10r_simple, accrual = 0.0425, 91.0 / 360.0
11r_cont = simple_to_continuous(r_simple, accrual)
12assert abs(math.exp(r_cont * accrual) - (1 + r_simple * accrual)) < 1e-12
13print(f"simple={r_simple:.4%} | continuous={r_cont:.4%}")
EXPECTED OUTPUTTwo different rate numbers with identical period accumulation.
SANITY CHECKS

✓ Accrual factor is positive.

✓ Accumulation remains positive.

✓ Economic value is preserved after conversion.

07
INTERACTIVE LAB

Move the state. Challenge the equation.

ONE PAYOFF · MULTIPLE QUOTE CONVENTIONS

Convention translation laboratory

Hold the payoff fixed while changing basis, accrual length and compounding; inspect rate and cash-flow differences.

SYNTHETIC · CONTROLLED SCENARIOS
Days80
ACT/360 accrual0.222222
Basis cash difference1.29 bp
Accumulated interest (bp) by Accrual days

3M period: Standard money-market accrual.

  • ACT/360 simple
  • ACT/365F simple
  • continuous
Accrual days: 0. ACT/360 simple: 0.00 bp. ACT/365F simple: 0.00 bp. continuous: 0.00 bp.

Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.

ACTIVE STATE

3M period — Standard money-market accrual. Move the control and inspect every series with pointer or touch.

08
FRONT OFFICE

Follow the trade through risk and lifecycle events.

ON THE DESK
“A one-day schedule break is not a rounding error; it is a different contract.”
VISIBLE INPUTS

effective and maturity dates

calendar set

business-day rule

day count

stub and payment lag

CALIBRATION

Normalize market quotes to internal discount or forward representations only after instrument-specific helpers have reproduced every convention.

RISK

schedule mismatch

fixing risk

settlement fail

accrual-basis P&L

DAILY WORKFLOW
  1. parse term sheet
  2. generate schedule
  3. compare confirmation
  4. calculate accruals
  5. freeze dated cash flows
Production failure modes
  • calendar version drift
  • adjusted boundary reused for accrual
  • wrong end-of-month flag
  • stub placed on wrong end
09MACRO CONNECTIONOpen the transmission channel.
MACRO CONNECTION

Operational plumbing around policy transmission

Policy changes reach contracts through index fixings and payment schedules; lags determine when the economic shock enters realised cash flow.

01Policy decisiontransmits

changes overnight and term fixings

02Index conventiontransmits

sets observation timing

03Scheduletransmits

maps fixing into cash flow

04Realised P&Loutput

arrives on contract dates

10COMMON PITFALLSOpen the failure checklist.
01

Using adjusted dates for every contractual purpose.

02

Converting rates without preserving accumulation.

03

Treating ACT/360 and ACT/365F as display formats.

04

Ignoring fixing and payment lags.

11SOURCES / FURTHER READINGOpen sources and continue the track.
research

Interest-rate products, term structures and short-rate lectures

Research map for the rates progression and numerical experiments; all platform prose and code are original.

Source
Financial Engineering: Interest Rates & xVA
Author
L. A. Grzelak
Ref
main
OPEN ORIGINAL SOURCE ↗
research

Stochastic processes, Monte Carlo and model-calibration lectures

Mathematical cross-reference for stochastic dynamics and implementation checks.

Source
Computational Finance Course
Author
L. A. Grzelak
Ref
main
OPEN ORIGINAL SOURCE ↗
implementation reference

Current term structures, indexes, rate helpers, instruments, engines and tests

Implementation authority for production abstractions; Academy derives the mathematics before introducing library objects.

Source
QuantLib upstream
Author
QuantLib contributors
Ref
v1.42.1
OPEN ORIGINAL SOURCE ↗