ores.refdata.currency_pair_convention
Table of Contents
Quoting and date-convention fields for a currency pair — pip factor,
tick size, calendars, business day convention, spot-relative/end-of-
month flags — folded in from the retired fx_convention entity (see
Currency pair support in reference data). Keyed 1:1 by
pair_code, the same value space as
ores.refdata.currency_pair's own primary key — every pair has at
most one convention record, so a separate identifier scheme would be
pure overhead. Like every other soft-FK relationship in this codebase,
pair_code is validated via trigger, not a hard DB foreign key.
1. Flags
2. Columns
2.1. pair_code
Same value as the owning currency_pair.pair_code (e.g. "EUR/USD") —
a 1:1 extension key, not an independent identifier.
std::string(faker::finance::currencyCode()) + "/" + std::string(faker::finance::currencyCode())
2.2. pip_factor
Converts pips to absolute rate moves (0.0001 for most pairs, 0.01 for JPY crosses).
0.0001
2.3. tick_size
Minimum rate increment, in pips.
0.1
2.4. decimal_places
Decimal places for rate display.
4
2.5. business_day_convention
Soft FK to ores_trading_business_day_convention_types_tbl.
std::string("Following")
2.6. spot_relative
Whether forward dates are generated relative to the spot date.
true
2.7. end_of_month
Whether end-of-month convention applies.
false
3. Artefact columns
The import carries advance_calendar, a comma-joined list of calendar codes. ores_refdata_publish_currency_pair_conventions_from_dq_fn explodes it into the convention-calendar child rows, so it is never stored on the convention itself.
3.1. pair_code
3.2. version
3.3. pip_factor
3.4. tick_size
3.5. decimal_places
3.6. advance_calendar
3.7. business_day_convention
3.8. spot_relative
3.9. end_of_month
4. SQL
4.1. Flags
4.2. Extra drops
drop function if exists ores_refdata_validate_currency_pair_convention_fn;
5. Validation function
6. Foreign keys
6.1. pair_code
The convention's pair_code doubles as its primary key, so this FK
entry exists for eventing-test seeding only: the test must create the
currency pair its convention references before writing (the shared
test tenant's pair validation turns strict as soon as any pair
exists). skip_check suppresses the redundant inline SQL check – the
trigger's DQ validation (see below) remains the production guard, and
seed_currency makes the seeded pair's own base_currency /
quote_currency insert pass by reusing or seeding a currency first.
7. Insert trigger
7.1. Validations
| column | validation_function |
|---|---|
| pair_code | ores_refdata_validate_currency_pair_fn |
| business_day_convention | ores_refdata_validate_business_day_convention_type_fn |
| change_reason_code | ores_dq_validate_change_reason_fn |
8. C++
8.1. Flags
8.2. Repository
8.3. Domain includes
#include <chrono> #include <optional> #include <string>
8.4. Entity includes
#include <optional> #include <string> #include "sqlgen/Timestamp.hpp"
8.5. Conventions
8.6. Table display
| column | header |
|---|---|
| pair_code | Pair |
| pip_factor | Pip Factor |
| tick_size | Tick Size |
| decimal_places | Decimal Places |
| business_day_convention | Business Day Convention |
| spot_relative | Spot Relative |
| end_of_month | End Of Month |
| modified_by | Modified By |
| version | Version |
8.7. Presentation
8.7.1. Columns
| enum_name | field | header | type | width | is_badge | badge_key | formatter | formatter_include | tooltip |
|---|---|---|---|---|---|---|---|---|---|
| PairCode | pair_code | Pair | string | 100 | The currency pair these quoting and date conventions apply to. | ||||
| PipFactor | pip_factor | Pip Factor | double | 90 | Converts a pip count into an absolute rate move. | ||||
| TickSize | tick_size | Tick Size | double | 90 | Minimum rate increment allowed when quoting or trading this pair. | ||||
| DecimalPlaces | decimal_places | Decimal Places | int | 100 | Number of decimal places used when displaying or rounding rates for this pair. | ||||
| BusinessDayConvention | business_day_convention | Business Day Convention | string | 150 | true | currency_pair_convention_business_day_convention | Rule for adjusting a settlement date that falls on a non-business day. | ||
| SpotRelative | spot_relative | Spot Relative | bool | 100 | true | currency_pair_convention_spot_relative | boolYesNoLabel | Whether forward value dates are calculated relative to the spot date. | |
| EndOfMonth | end_of_month | End Of Month | bool | 100 | true | currency_pair_convention_end_of_month | boolYesNoLabel | Whether this pair follows the end-of-month forward date rule. | |
| Version | version | Version | int | 70 | |||||
| ModifiedBy | modified_by | Modified By | string | auto | |||||
| RecordedAt | recorded_at | Recorded At | timestamp | auto |
8.7.2. Icon columns
Composites base+quote flags into the PairCode column's decoration,
splitting the combined pair_code string (e.g. "EUR/USD") since this
entity has no separate base/quote fields of its own.
| column | accessor | field1 | is_pair |
|---|---|---|---|
| PairCode | currency_flag_icon_from_pair_code | pair_code | true |
8.7.3. Related entity shortcuts
| signal | icon | label | tooltip |
|---|---|---|---|
| Calendars | CalendarClock | Calendars | Open Calendars list |
8.7.4. Detail fields
| field | label | widget | type | is_key | is_required | placeholder | combo_values | badge_key | flag_source | combo_fetch | combo_fetch_include | tooltip |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| pair_code | Pair Code | pairCodeCombo | flagged_combo | true | true | e.g. EUR/USD | currency_pair | fetch_currency_pair_codes | The currency pair these quoting and date conventions apply to (e.g. EUR/USD). | |||
| pip_factor | Pip Factor | pipFactorEdit | line_edit | true | e.g. 0.0001 | Converts a pip count into an absolute rate move (0.0001 for most pairs, 0.01 for JPY crosses). | ||||||
| tick_size | Tick Size | tickSizeEdit | line_edit | true | e.g. 0.1 | Minimum rate increment allowed when quoting or trading this pair, expressed in pips. | ||||||
| decimal_places | Decimal Places | decimalPlacesSpinBox | spin_box | true | Number of decimal places used when displaying or rounding rates for this pair. | |||||||
| business_day_convention | Business Day Convention | businessDayConventionCombo | static_combo | Following,ModifiedFollowing,Preceding,ModifiedPreceding,Unadjusted,HalfMonthModifiedFollowing,Nearest | currency_pair_convention_business_day_convention | Rule for adjusting a settlement date that falls on a non-business day (e.g. rolling forward to the next good business day). | ||||||
| spot_relative | Spot Relative | spotRelativeCheckBox | check_box | Whether forward value dates for this pair are calculated relative to the spot date, rather than directly from the trade date. | ||||||||
| end_of_month | End Of Month | endOfMonthCheckBox | check_box | Whether this pair follows the end-of-month rule: if the spot date falls on the last business day of a month, forward dates preserve month-end alignment. |
9. See also
- ores.refdata — component group overview.
- Currency pair support in reference data — parent story.
- ores.refdata.currency_pair — owning identity entity.