ores.refdata.currency_pair_convention_calendar
Table of Contents
Many-to-many junction between currency_pair_convention and calendar:
a convention's AdvanceCalendar
almost always names the union of both legs' calendars (e.g.
TARGET,UnitedKingdom), so a convention needs more than one calendar
row. Replaces currency_pair_convention.advance_calendar's
comma-joined free-text value with a proper FK relationship to
the calendar entity. The
advance_calendar name is kept (not renamed to calendar=/=holiday_calendar)
since it matches ORE's own AdvanceCalendar XML field verbatim and
denotes a distinct concept from currency.holiday_calendar — it drives
date-advancing (Calendar::advance()), not business/settlement-day
membership tests.
1. Flags
2. Left
Currency pair code (e.g. EURGBP).
References ores_refdata_currency_pair_conventions_tbl.pair_code (soft FK).
The composite key is (pair_code, calendar_code), and neither field carries any other per-call-unique data – an inline counter is the only way to guarantee repeated synthetic-generation calls don't collide on the same key (same convention as currency_country's own synthetic generator).
[] { static std::size_t counter = 0; return std::string("EURGBP") + std::to_string(++counter); }()
3. Right
QuantLib/ORE calendar token (e.g. TARGET, UnitedKingdom).
References ores_refdata_calendars_tbl.code (soft FK).
std::string("TARGET")
4. Columns
5. SQL
5.1. Flags
6. Repository
7. C++
7.1. Flags
7.2. Domain includes
#include <string>
7.3. Entity includes
#include <string>
7.4. Conventions
7.5. Table display
| column | header |
|---|---|
| pair_code | Pair |
| calendar_code | Calendar |
| modified_by | Modified By |
| version | Version |
8. See also
- ores.refdata — component group overview.
- Model calendars as proper ORE Studio reference data — parent story.
- ORE's AdvanceCalendar Convention Field — the domain concept this junction models.