Skip to main content

Tenor rules and maps


What they do​

A curve can have hundreds of contracts: days, months, quarters, seasons and years, often several years out. The system you send to may want only some of them, and may know them by different ids: an ETRM that books ICE futures calls January 2027 F27, not M02 or 2027M01.

  • Tenor rules belong to a group. They choose which contracts of each of its curves are sent.
  • Tenor maps belong to a system. They turn the curve's tenor ids into the ones the system uses. A group chooses one of its system's maps.

With no rules and no map a group sends every contract with its own tenor id, as before. The rules apply to curves and to options (each tenor of the options, with all its strikes); timeseries are sent as they are. They are the second of the steps from an item to what is sent, and Test the transformation on the group's Transform tab shows them on a real item.


The rules of a group​

Open the group and its Tenors tab. The tab shows, for an example curve with daily, monthly, quarterly, seasonal and yearly contracts, what a run on the ondate you choose would send, and why each other contract is left out.

The Tenors tab of a group

The rules are applied in this order, and a contract has to pass them all:

RuleWhat it does
Tenor typesSend only these types, such as months (M), quarters (Q), seasons (S) and years (Y). For each type, First limits it to that many contracts (blank for all), after skipping the first few (After skipping). The contracts are counted in delivery order, so months first 12 after skipping 1 is the second to the thirteenth month. With no types every type is sent.
Only theseTenor codes, separated by commas or spaces. A contract is sent only when its relative tenor (M01, Q02) or its absolute tenor (2027M01, 2027Q01) matches one of them. An option tenor has both too.
Never theseTenor codes in the same form. A contract that matches one is not sent.
Months aheadOnly contracts that start within this many months of the ondate. On 2026-11-25, 12 months ahead keeps the contracts that start before 2027-11-25.
Starting on or after, Starting beforeOnly contracts whose delivery starts in these dates.
Tenor mapThe system's map the ids are sent with, or none.

A tenor code can be:

CodeMatches
M01, 2027Q01That tenor.
M01-M06The tenors with that prefix and a number in the range: M01 to M06.
Q*, 2027*, *S0** matches anything: every quarter, everything in 2027, every season.

The rules are saved in the group's integration.tenors (see the reference). A run prints them at the start, such as Tenor rules: types M x12 Q x4, tenor map ICE codes.

caution

A curve with none of its contracts left after the rules fails, with the message None of the curve's 43 contracts match the group's tenor rules (options: None of the options' 12 tenors match the group's tenor rules), so that a rule that is too tight shows in the report and the alert instead of sending nothing quietly.


The maps of a system​

Open the system's System setup tab. The Tenor maps card lists its maps, what each is made of, an example and the groups that use it.

The tenor maps of a system

New tenor map opens the editor:

Editing a tenor map

FieldWhat it is
NameHow the groups choose it. Renaming a map changes it in the groups that use it.
Start fromA standard style, or none.
PatternsHow each type of tenor is written, made of the tokens below. Blank uses the standard's; the box shows it.
Exact idsOne per line, tenor=id, for the odd one out, such as M01=FRONT or 2027Y=CAL-27. The tenor is relative or absolute. These win over the patterns.
A tenor the map has no id forSend it with its own tenor id, or do not send it.

The example at the bottom shows the ids for today's contracts as you type.

The standard styles​

StyleJanuary 2027Q1 2027Summer 20272027Gas year 2027
ICEF27Q127SUM27CAL27GY27
NYMEX / CMEF7Q17SUM7CAL7GY7
Month namesJAN27Q127SUM27CAL27GY27
Month letters, 4-digit yearF2027Q12027SUM2027CAL2027GY2027
Month names, 4-digit yearJAN2027Q12027SUM2027CAL2027GY2027

The month letters are the futures codes F G H J K M N Q U V X Z, January to December. Half years are H1 and H2 with the year, such as H127. The standards have no ids for days, weeks and sub-daily tenors: give them a pattern, or they keep their own ids (or are not sent, if the map says so).

Tokens​

TokenBecomesJanuary 2027
{L}Month letterF
{MON}Month nameJAN
{MM}, {M}Month number01, 1
{YYYY}, {YY}, {Y}Year2027, 27, 7
{Q}Quarter1
{H}Half year1
{SEA}Season: SUM (April to September) or WINWIN
{DD}Day of the month01
{WW}Week number, from the absolute tenor
{T}The relative tenorM02
{A}The absolute tenor2027M01

Everything else in a pattern is kept as it is, so {MON}-{YYYY} gives JAN-2027. The tokens are worked out from the contract's delivery start, so a season named after its first month (WIN for October to March) has the year it starts in.

The maps are saved in the system object's tenorMaps (see the reference). A map can be deleted only when no group uses it. Systems set up before the upgrade to systems have no maps; their groups can still use the rules.


What each system sends​

SystemWith rulesWith a map
REST API, webhook, OAuth API, queue, Event Grid, blob, Data Lake, Azure Files, Power BIOnly the kept contracts, and the options of the kept tenors.tenor is the mapped id, and odslTenor the curve's own, in JSON messages. CSV files and templates have the mapped id in tenor. See the content of the messages.
MoleculeOnly the kept contracts become marks.No effect: Molecule takes each mark by its delivery date.
Custom systemsRead the kept contracts with intContracts(item) instead of item.data.contracts, and the kept option tenors with intOptionTenors(item) instead of item.data.tenors.Each kept contract has tenorId; intTenorId(c) gives the mapped id or the curve's own. The ids of the option tenors are intOptionTenorIds(item), in the same order.

The rules and the map work the same way in every run, whether scheduled, sent as items change, sent again as a correction or run for past dates.