Example: Term Conversion

Converts terms of different periodicities into a common basis of days. The rule type offers the option to choose different day count conventions (30/360 German, ACT/ACT).

In this example, we show two patterns in the input data: a pattern for contract A and a pattern for contract B. We filter for contract A using a subview. The day conversion is performed starting from the key date on the field inserted in Period To on the Configuration tab. The result is a range in days.

Input Data

The fields Pattern Key Figure Type and Value are not relevant for the conversion.

Start Date Contract ID Pattern KF Type Period To Cal FreqCode Value
2019-01-01 A MOV 3 6 EUR 90
2019-01-01 A MOV 4 6 EUR 120
2019-01-01 A MOV 5 6 EUR 150
2019-01-01 A MOV 6 6 EUR 180
Start Date Contract ID Pattern KF Type Period To Cal FreqCode Value
2019-01-16 B MOV 2 6 EUR 50
2019-01-16 B MOV 8 6 EUR 150

Flow Modeling Configuration

Rules (Tab)
Rule Description Rule Type State Rule Grouping Rule Ordering Selection
TC Term Conversion Term Conversion Active     CONTRACT = “A”
Rule Line
Line Line Granularity Start Date Day Count Convention Period To Period Unit Period To Conv Period From Conv Period Unit Conv
1 Contract ID Start Date German 30/360 Period Period Unit Period to Converted Period from Converted Period Unit Converted

Key Configuration Description

Field Meaning Notes
Line Identifier of the line Must be unique.
Line Granularity Determines the size of one partition of data Mandatory input that has to be inserted in the Granularity tab of the Signature section.
Start Date Starting date to compute the day count Mandatory input
Day Count Convention Day count convention used to determine the result period

Mandatory input.

The conventions managed by the function are:
  • US 30/360
  • Actual/Actual
  • EU 30/360
  • German 30/360
Period To Parameter to indicate the period to be added to Start Date Mandatory input
Period Unit Period type of input data (for example, monthly or quarterly)

Mandatory input.

The possible values are the following:
  • 4 if Period To is in days
  • 5 if Period To is in weeks
  • 6 if Period To is in months
  • 11 if Period To indicates quarters
  • 12 if Period To indicates half a year
  • 7 if Period To indicates years
Period From Conv Exact day from which the period count starts. Mandatory output
Period To Conv Number of days of the period Mandatory output
Period Unit Conv The system writes the period unit of the result to this field.

Mandatory output.

The function performs the conversion from the number in the field inserted in Period Unit to days (value equal to 4).

Expected Result

Start Date Contract ID Pattern KF Type Period To Cal Freq Code Value Period From Conv Period To Conv Period Unit Converted
2019-01-01 A MOV 3 6 EUR 90 1 90 4
2019-01-01 A MOV 4 6 EUR 120 91 120 4
2019-01-01 A MOV 5 6 EUR 150 121 150 4
2019-01-01 A MOV 6 6 EUR 180 151 180 4