Skip to main content

Module settlement_lag

Module settlement_lag 

Expand description

SettlementLag — the single “advance a lag, then settle” primitive.

A settlement lag advances a starting date by n units on one calendar and then rolls the result under an ordinary business-day convention: onto a business day of that calendar, or, when a settlement calendar is given, onto a day that is a business day of both. It is the one authority for value-date arithmetic: FX index value dates and single-currency swap spot dates both route through it. A calendar answers for one axis only; the second calendar is an argument of the lag, never part of a calendar.

Structs§

Both 🔒
The days good on both calendars, read as one for the settle roll only. A per-call view, so the roll builds no holiday grid; private, so no caller holds a calendar answering for two.
SettlementLag
“Advance n SettlementLagUnits on business, then settle.”

Enums§

SettlementLagUnit
The unit a SettlementLag counts its offset in.

Functions§

add_calendar_days 🔒
Adds n calendar days to date (negative subtracts).
apply_lag 🔒
SettlementLag::apply over borrowed calendars, for a caller that holds the lag’s parts and would otherwise clone them into one per call.