ores.refdata.tenor_schedule
Table of Contents
A named schedule axis a tenor
resolves along (story Decision D2: anchor + calendar offset + n
steps). Two kinds today, distinguished by schedule_source:
CLOSED_FORM: the dates come from a closed-form rule evaluated code-side.ROLL_QUARTERis the only instance: the first business day after the 20th of March/June/September/December (the IMM quarterly rule).EVENT_LOOKUP: the dates come from calendar_event rows on a named calendar, filtered by diary entry type.FOMC_MEETINGis the only instance:central_bank_meetingevents onUS.FOMC.
calendar_code and diary_entry_type are null for closed-form
schedules (no event store involved) and required for event-lookup
ones – but the binding is documented, not enforced in the schema.
Flags
Columns
code
Unique schedule code.
Examples: 'ROLL_QUARTER', 'FOMC_MEETING'.
std::string("TenorSchedule")
name
Human-readable name for the schedule.
std::string(faker::word::adjective()) + " Schedule"
description
Detailed description of the schedule.
std::string(faker::lorem::sentence())
display_order
Order for UI display purposes.
faker::number::integer(1, 100)
schedule_source
How the schedule's dates are produced: CLOSED_FORM (a closed-form
rule evaluated code-side) or EVENT_LOOKUP (calendar_event rows on a
named calendar).
std::string("CLOSED_FORM")
if NEW.schedule_source not in ('CLOSED_FORM', 'EVENT_LOOKUP') then raise exception 'Invalid schedule_source: %. Must be CLOSED_FORM or EVENT_LOOKUP.', NEW.schedule_source; end if;
calendar_code
The calendar whose diary events drive this schedule (event-lookup schedules only).
References ores_refdata_calendars_tbl.code (soft FK).
std::nullopt
diary_entry_type
The diary entry type whose events drive this schedule (event-lookup schedules only).
References ores_refdata_diary_entry_types_tbl.code (soft FK).
std::nullopt
SQL
Flags
Extra drops
drop function if exists ores_refdata_validate_tenor_schedule_fn;
Foreign keys
calendar_code
diary_entry_type
Validation function
Insert trigger
Validations
| column | validation_function |
|---|---|
| change_reason_code | ores_dq_validate_change_reason_fn |
C++
Flags
Repository
Domain includes
#include <chrono> #include <optional> #include <string>
Entity includes
#include <string> #include "sqlgen/Timestamp.hpp"
Conventions
Table display
| column | header |
|---|---|
| code | Code |
| name | Name |
| description | Description |
| schedule_source | Schedule Source |
| calendar_code | Calendar |
| diary_entry_type | Diary Entry |
| display_order | Order |
| modified_by | Modified By |
| version | Version |
Qt
Detail fields
| field | label | widget | type | is_key | is_required | placeholder |
|---|---|---|---|---|---|---|
| code | Code | codeEdit | line_edit | true | true | Enter tenor schedule code |
| name | Name | nameEdit | line_edit | true | Enter name | |
| description | Description | descriptionEdit | text_edit | true | Enter a description | |
| schedule_source | Schedule Source | scheduleSourceEdit | line_edit | true | CLOSED_FORM or EVENT_LOOKUP | |
| calendar_code | Calendar | calendarCodeEdit | line_edit | Event-lookup calendar | ||
| diary_entry_type | Diary Entry Type | diaryEntryTypeEdit | line_edit | Event-lookup diary entry type | ||
| display_order | Display Order | displayOrderEdit | spin_box | true |
Columns (Qt model)
| enum_name | field | header | type | width |
|---|---|---|---|---|
| Code | code | Code | string | auto |
| Name | name | Name | string | auto |
| Description | description | Description | string | auto |
| ScheduleSource | schedule_source | Schedule Source | string | auto |
| CalendarCode | calendar_code | Calendar | string | 100 |
| DiaryEntryType | diary_entry_type | Diary Entry Type | string | 100 |
| DisplayOrder | display_order | Display Order | int | 70 |
| Version | version | Version | int | 70 |
| ModifiedBy | modified_by | Modified By | string | auto |
| RecordedAt | recorded_at | Recorded At | timestamp | auto |
Custom repository methods
See also
- ores.refdata.tenor — the entity this schedule classifies.
- ores.refdata.calendar_event — the event store event-lookup schedules read from.
- ores.refdata.diary_entry_type — the vocabulary filtering event-lookup schedules.
- ores.refdata — component group overview.