Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article should help using segmentations in a reporting solution.

Level

Segmentations

Ordering

Selection

Best Practices / Examples

Base Segmentations

Base Segmentations are defined by the data sources and typically have too many segments. Still they can be used in any of the below scenarios by adding a short form of derived segmentation

The base segmentations have their natural ordering defined.

  • Use the very long base segmentation

csamRegRkccy
  • riskCurrency as segmentation for a chart that can only show 6 segments:"segmentation": "

csamRegRkccy<6
  • riskCurrency<6"

Stored (derived) Segmentations

Segmentations designed with the Segmentation Editor and stored in the solution are typically used to group the assets based on one (or multiple) base or derived segmentations.

Info

Don’t use any fixed ordering clause here if you want to use the automatic ordering features of building blocks.

Info

Don’t use maxSegments here if you want the flexibility to adapt this setting in profiles or reportTypes to match the situation.

  • Use segment grouping to shorten a hierarchical base segmentation to level 1 (selecting a level 1 segment will also group all underlying subSegments). Example shown is from sample_gicsL1:

Image Modified

  • Use predicates to group by values from multiple segmentations

Note

Use the in operator in to check for segment equality, even if you check only for 1 value. This due to the fact, that equality (

csamBalAA

assetCategory == ‘Equities’) will not catch the subSegments of a hierarchical source segmentation:

Code Block
{
  "id": "abcd-0016-EquitiesUS",
  "name": { "label": "segment_EquitiesUS" },
  "rule": { "prio": 7, "predicate": "
csamBalAA
assetCategory in ['Equities'] && 
csamRegRkcnty
riskCurrency in ['United States']" }
}
Note

For a negated rule (e.g. not in segmentxyz) you have to use the ! operator as well as parentheses ():

Code Block
languagejson
{
    "id": "bond-2345-all",
    "name": { "label": "segment_Bonds" },
    "rule": { "prio": 1, "predicate": "!(
csamIboxxSect
iboxxSect in ['FX', 'Cash and Cash Equivalents'])" }
}

Profiles

The profiles define the default segmentations to be used for

  • assetBreakdown (for portfolio, fixedIncome & equity)

  • contributionsBreakdowns & attributionBreakdowns

Info

Don’t use any ordering here if you want to use the automatic ordering features of building blocks.

Info

Use the short hand form to define derived segmentations in profiles to modify the underlying segmentations to fit the need in charts & tables:

use the < operator

Code Block
languagejson
"assetBreakdownSegmentations": [
  "
csamRegRkccy<6
riskCurrency<6", 
  "sample_
csamRatingL1<6
creditRatingL1<6", 
  "sample_effectiveDurationBucket", 
  "sample_
csamIboxxSectL1<6
iboxxSectL1<6"
],

Report-level Building Block

Info

A this level no changes to the segmentations are done anymore as this would complicate the configuration

Report Types

In a report type the final parameters to a building block can be defined

normally no ordering needed

normally no selection needed

Code Block
languagejson
"segmentation": "=params.assetBreakdownSegmentations[1]"

Building Blocks

The building blocks partially modify the incoming segmentation to

  • order the output by a figure

  • reduce output given on topBottomN

Info
  • all ordering done only if no incoming ordering clause

  • all ordering descending

Selection is done based on parameter TopBottomN

  • ContributionBlocks

and Attribution-Siblings
  • (CA005

..CA007 and CA005A
  • ..CA007) sort by the first segmentation in barchartFigures or if none by portfolioContribution.

  • CA001 sorts by relativeContribution

  • AB-and AS-blocks sort by mktValuePflCcy