Calendars, Holidays and Events

Table of Contents

Summary

A holiday calendar is, at bottom, nothing more than a named set of excluded dates against which a business-day test can be evaluated; but the moment a system needs to manage such a calendar as reference data — rather than merely consult a hard-coded one, as QuantLib does internally — three further design problems present themselves, and this cluster is organised around each in turn.

The first is what the calendar is for: whether it is a static holiday list, or whether it also needs to carry market events (a central bank decision, a public announcement) that are not holidays but that nonetheless attach to a specific point in time and a specific set of currencies. This cluster addresses it with a Diary/Effects split — see The Diary/Effects Model — in which the calendar itself stores only bare time points, and any downstream meaning those time points carry is modelled separately.

The second is how a recurring holiday (Christmas Day, the first Friday of the month) can be entered once and apply to every future occurrence without a fresh data-entry event every year. This cluster addresses it with a Template/Instance pairing, treated identically for both holidays and events, and detailed in Holiday Calendar Administration.

The third, given the Diary/Effects split, is what it actually means, concretely, to enter an event — as opposed to a holiday — into a calendar, and where real event data (central bank meeting dates, in particular) can be sourced to populate it. That is the subject of Calendar Events.

A fourth, narrower topic worth a spoke of its own: ORE's own AdvanceCalendar convention field looks like a calendar in the ordinary sense but is consumed as a date-advancing input rather than a business-day test, and is documented separately in ORE's AdvanceCalendar Convention Field.

Detail

Why a calendar is more than a holiday list

The naive model of a calendar — a currency or country code mapped to a set of excluded dates — is sufficient for the narrow purpose of computing a business day, and it is essentially what QuantLib's Calendar class provides: a name, an algorithmic rule for most holidays (fixed dates, nth-weekday-of-month rules, and pre-tabulated lunar-calendar holidays for markets such as China, Japan or the Gulf states where no closed-form rule exists), and an escape hatch — addHoliday=/=removeHoliday — for holidays that must be entered ad hoc, without recompiling the library, because they were only announced recently or apply to a single year. QuantLib further composes several such calendars into a JointCalendar, under either join-holidays (union: a day is a holiday if any constituent calendar says so) or join-business-days (intersection: a day is a holiday only if every constituent calendar agrees) semantics — the same union rule a comma-joined list of calendar names implicitly expresses wherever that free-text convention is used.

What distinguishes a reference-data model of calendars from QuantLib's purely computational one is that a calendar administration screen needs to do considerably more than enumerate excluded dates: holidays must be addable, removable and disable-able (as distinct from deleted, preserving the historical record); they can be historic, can span multiple days, and can fall on a weekend without being erroneous; they can be sourced from an external feed and require authorisation before taking effect, unless the source is marked trusted, in which case they activate automatically; and the calendar should also anchor events, while the actual effect of an event is modelled elsewhere. That last point is the entire content of the Diary/Effects split, stated in one line: the calendar is the anchor for both holidays and events, but it is not where either kind of entry's downstream consequences live.

How the three spokes relate to one another

  • The diary itself — a validated enumeration of calendar codes and the time points recorded against them — should stay semantics-free, carrying only codes and time points, and should not accrete typed fields for every possible downstream consumer; see The Diary/Effects Model for why.
  • A currency, or any other entity, can need more than one calendar at once (a national public-holiday calendar and a financial-centre calendar, say), and a recurring holiday needs to be entered once via a template rather than instance-by-instance every year — both covered in Holiday Calendar Administration.
  • An event — a time point with one or more associated currencies, and, deliberately, no modelled effect — is a first-class kind of diary entry distinct from a holiday, covered in Calendar Events, which also surveys where genuine event data (central bank policy-meeting dates) can be sourced. The event store has landed in code as a single calendar_event table with a diary_entry_types vocabulary (decided 2026-08-09, FOMC analysis) — one table for all event kinds, never a table per calendar or per type.

How a calendar is consumed downstream

A calendar feeds two distinct downstream layers. Fixing and coupon schedule generation — the machinery by which an IRS or similar structured product turns a compact parameter set (Pay Period, Fix Period, Yield Basis, Number of Coupons) into a concrete set of fixing and coupon dates, in the spirit of QuantLib's Schedule and MakeSchedule — consumes a calendar together with a business-day convention, of the kind catalogued in Date Rolling and Business-Day Calendars, to produce per-deal pricing-time dates. The broader lifecycle-event taxonomy of a trade — Confirmable Events, System Events, the deal state machine, automatic deal generation off a fixing or expiry — treats the calendar as one of several event sources: a life-cycle event can be triggered by the calendar (a fixing, an expiry), exactly as Calendar Events describes.

Glossary

Term Definition
Calendar The reference-data entity: a validated, named enumeration of excluded dates (and, in this cluster, event time points) for a currency, country, or market. The persisted thing; see The Diary/Effects Model.
Diary The architectural role a calendar plays: a bare, semantics-free timeline of time points, with no encoding of what those points mean downstream. Every calendar is a diary; "diary" names the design principle, "calendar" names the entity that implements it. See The Diary/Effects Model.
Effect A typed, pluggable, downstream impact of a diary entry (a volatility variance weighting, a deliverability restriction, a P&L attribution), modelled separately from the diary and attached by reference. See The Diary/Effects Model.
Holiday A diary entry marking a date excluded from business-day status for a currency, country, or market. Supports Template/Instance recurrence. See Holiday Calendar Administration.
Event A diary entry, distinct from a holiday, anchored to a time interval and one or more currencies or markets, carrying a diary_entry_type (holiday, central-bank meeting, data release, other) but deliberately no modelled effect. See Calendar Events.
Template The recurrence definition for a holiday or event (e.g. "Always first Friday"); editing it changes every future occurrence generated from it. See Holiday Calendar Administration.
Instance A single generated (or manually entered) occurrence of a template; editing an instance changes only that occurrence, leaving the template and all other occurrences untouched. See Holiday Calendar Administration.
Business Day A day that is not a holiday for the relevant currency, country, or market calendar(s). See Date Rolling and Business-Day Calendars.
Settlement Day A business day that additionally excludes USD holidays, since USD holidays are conventionally valid business days but still block settlement. See FX spot date and settlement.
Joint Calendar The union (join-holidays) or intersection (join-business-days) of several individual calendars, used wherever more than one calendar applies at once (e.g. a currency pair, or a currency needing more than one calendar).
AdvanceCalendar ORE's own FXConvention field used to advance (roll forward) spot and maturity dates directly via Calendar::advance(), distinct from a business-day/settlement calendar despite looking like one; comma-joined like other ORE calendar fields. See ORE's AdvanceCalendar Convention Field.

See also

Emacs 29.3 (Org mode 9.6.15)