> ## Documentation Index
> Fetch the complete documentation index at: https://docs.creditbenchmark.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Metrics and Rating Scales

> How the metric and rating_scale parameters control which credit risk values and response field names the Credit Benchmark Analytics API returns.

Two request fields control the credit view returned by analytic routes:

* **`metric`** — whose credit view to measure.
* **`rating_scale`** — which rating labels to use for PD values.

They are independent. Changing one does not automatically change the other.

For scope behavior, see [Scope and empty results](/api-reference/analytics-scope-and-empty-results). For route selection, see [Choosing a route](/api-reference/analytics-endpoints).

## Metric

`metric` selects consensus or contributor-specific output.

| Value      | Meaning                                                                     | Typical user          |
| ---------- | --------------------------------------------------------------------------- | --------------------- |
| `CCR`      | Credit Benchmark consensus view                                             | Any entitled API user |
| `MyRating` | Requesting contributor's rating view, with ex-me comparison where supported | Contributor users     |

`CCR` is the default.

`MyRating` requires contributor entitlement. It uses only the requesting contributor's submitted ratings and the ex-me benchmark. It does not expose another contributor's individual ratings.

<Warning>
  When you select `metric: "MyRating"`, the analytic is restricted to entities in your requested `scope` **that your bank has rated** for the requested date window. If your bank has not rated any entities in the requested scope, the route returns an empty success response.
</Warning>

## Rating scale

`rating_scale` selects the label set used to describe PD values.

| Value     | Description                                                            |
| --------- | ---------------------------------------------------------------------- |
| `CB21`    | Credit Benchmark 21-notch scale (`aaa`, `aa+`, `aa`, `aa-`, and so on) |
| `CB7`     | Coarser Credit Benchmark scale with fewer buckets                      |
| `MyScale` | Requesting contributor's configured master scale                       |

PD fields stay numeric. `rating_scale` only changes the rating label or bucket key used alongside them.

`MyScale` is common with `MyRating`, but scale selection is separate from metric selection where your entitlement allows it.

## Response by endpoint and metric

`metric` changes the field names returned by each route. `getdata` is not a metric route and always returns consensus fields.

<Tabs>
  <Tab title="getdata">
    `getdata` does not accept `metric`. It always returns row-level consensus fields for each entity and date in your scope. Field names such as `CB_CCR` and `CB_CCR_PD` describe the Credit Benchmark consensus view.

    ```json theme={null}
    {
      "CB_ID": ["CB0000022706"],
      "CB_Legal_Name": ["Example Bank PLC"],
      "CB_Effective_Date_ID": [20250131],
      "CB_CCR": ["bbb+"],
      "CB_CCR_100_PDMid": [0.0040]
    }
    ```
  </Tab>

  <Tab title="aggregatetrend">
    `aggregatetrend` returns one aggregate row per date in the lookback window. Changing `metric` switches the aggregate field names and, for `MyRating`, adds a client versus ex-me comparison.

    **CCR** returns consensus aggregate fields. `AGG_EntityCount` is the number of scoped entities with consensus data at each date.

    ```json theme={null}
    {
      "CB_Effective_Date_ID": [20240131, 20240229],
      "AGG_CCRPD_log": [-5.4968, -5.5215],
      "AGG_CCR": ["bbb+", "bbb+"],
      "AGG_CCRPD": [0.0041, 0.0040],
      "AGG_CCRPD_index": [102.5, 100.0],
      "AGG_EntityCount": [3, 3]
    }
    ```

    **MyRating** returns your bank's aggregate rating and PD alongside the ex-me benchmark for the same contributor-covered subset. `AGG_ClientEntityCount` may be lower than the number of entities in your scope if your bank does not rate all of them.

    ```json theme={null}
    {
      "CB_Effective_Date_ID": [20240131, 20240229],
      "AGG_ClientRating": ["4.2", "4.2"],
      "AGG_ClientRatingNotch": [12, 12],
      "AGG_ClientPD_log": [-5.5994, -5.5730],
      "AGG_ClientPD": [0.0037, 0.0038],
      "AGG_ClientPD_index": [97.4, 100.0],
      "AGG_ClientEntityCount": [2, 2],
      "AGG_ExMeRating": ["4.3", "4.3"],
      "AGG_ExMeRatingNotch": [13, 13],
      "AGG_ExMePD_log": [-5.4262, -5.4037],
      "AGG_ExMePD": [0.0044, 0.0045],
      "AGG_ExMePD_index": [97.8, 100.0],
      "AGG_ExMeEntityCount": [2, 2]
    }
    ```
  </Tab>

  <Tab title="creditbreakdown">
    `creditbreakdown` returns the latest aggregate credit summary for each value of `facet_column`, such as sector or country. `metric` controls whether you see consensus aggregates or your bank's view compared with ex-me.

    **CCR** returns one aggregate rating and PD per facet group, plus an entity count for entities with consensus data in that group.

    ```json theme={null}
    {
      "CB_Sector": ["Banks", "Industrials"],
      "AGG_CCR": ["bbb+", "a-"],
      "AGG_CCRPD": [0.0040, 0.0018],
      "AGG_EntityCount": [12, 8],
      "AGG_Upgrades": [2, 1],
      "AGG_Downgrades": [1, 0],
      "AGG_NetUpMinusDown": [1, 1]
    }
    ```

    **MyRating** adds client and ex-me aggregates for the contributor-covered entities in each group. It can also return notch-comparison fields such as `AGG_NotchDifference` and `AGG_NotchDiffAggressive`.

    ```json theme={null}
    {
      "CB_Sector": ["Banks"],
      "AGG_ClientRating": ["4.2"],
      "AGG_ClientPD": [0.0037],
      "AGG_ClientEntityCount": [5],
      "AGG_ExMeRating": ["4.3"],
      "AGG_ExMePD": [0.0044],
      "AGG_ExMeEntityCount": [5],
      "AGG_NotchDifference": [1],
      "AGG_NotchDiffAggressive": [1],
      "AGG_NotchDiffConsistent": [4],
      "AGG_NotchDiffConservative": [0]
    }
    ```
  </Tab>

  <Tab title="entityratingchange">
    `entityratingchange` returns one row per entity with current and lookback rating and PD values. Consensus change fields are always present. `MyRating` adds your bank's rating-change fields where contributor data exists.

    **CCR** returns consensus rating and PD values at the effective date and at the lookback date, plus change fields such as `CB_CCR_Change` and `CB_CCR_PD_Change`.

    ```json theme={null}
    {
      "CB_ID": ["CB0000022706"],
      "CB_Legal_Name": ["Example Bank PLC"],
      "CB_CCR": ["bbb+"],
      "CB_CCR_6M": ["bbb"],
      "CB_CCR_PD": [0.0040],
      "CB_CCR_PD_6M": [0.0048],
      "CB_CCR_Change": [-1],
      "CB_CCR_PD_Change": [-0.0008],
      "CB_CCR_Change_With_OCI": [-1]
    }
    ```

    **MyRating** keeps the consensus change fields and adds client fields such as `ClientRating`, `ClientRating_6M`, and `ClientRating_Change` for entities your bank rates.

    ```json theme={null}
    {
      "CB_ID": ["CB0000022706"],
      "CB_Legal_Name": ["Example Bank PLC"],
      "CB_CCR": ["bbb+"],
      "CB_CCR_6M": ["bbb"],
      "CB_CCR_PD": [0.0040],
      "CB_CCR_PD_6M": [0.0048],
      "CB_CCR_Change": [-1],
      "CB_CCR_PD_Change": [-0.0008],
      "CB_CCR_Change_With_OCI": [-1],
      "ClientRating": ["4.2"],
      "ClientRating_6M": ["4.3"],
      "ClientPD": [0.0037],
      "ClientPD_6M": [0.0041],
      "ClientRating_Change": [-1],
      "ClientRating_Change_With_OCI": [-1]
    }
    ```
  </Tab>

  <Tab title="ratingdistribution">
    `ratingdistribution` returns the share of scoped entities in each rating bucket. The response structure changes more with `metric` than most routes: `CCR` uses one series, while `MyRating` splits the result into two.

    **CCR** returns a single `ccr` object. Rating bucket keys such as `bbb+` and `a-` hold the share of entities in each bucket.

    ```json theme={null}
    {
      "ccr": {
        "CB_Effective_Date_ID": [20250131],
        "bbb+": [0.60],
        "a-": [0.40],
        "AGG_EntityCount": [5]
      }
    }
    ```

    **MyRating** returns separate `my_bank` and `ex_me` objects for the contributor-covered subset. Each series uses your scale's rating labels as bucket keys.

    ```json theme={null}
    {
      "my_bank": {
        "CB_Effective_Date_ID": [20250131],
        "4.2": [0.60],
        "4.3": [0.40],
        "AGG_EntityCount": [5]
      },
      "ex_me": {
        "CB_Effective_Date_ID": [20250131],
        "4.2": [0.20],
        "4.3": [0.80],
        "AGG_EntityCount": [5]
      }
    }
    ```
  </Tab>
</Tabs>

## Rating labels by scale

The same PD can map to different labels depending on the scale you request.

<AccordionGroup>
  <Accordion title="The same PD is labelled on the CB21 scale.">
    ```json theme={null}
    {
      "metric": "CCR",
      "rating_scale": "CB21"
    }
    ```

    ```json theme={null}
    {
      "AGG_CCR": ["bbb+"],
      "AGG_CCRPD": [0.0040],
      "AGG_CCRPD_log": [-5.5215],
      "AGG_CCRPD_index": [100.0]
    }
    ```
  </Accordion>

  <Accordion title="The same PD is labelled on your configured MyScale.">
    ```json theme={null}
    {
      "metric": "CCR",
      "rating_scale": "MyScale"
    }
    ```

    ```json theme={null}
    {
      "AGG_CCR": ["4.2"],
      "AGG_CCRPD": [0.0040],
      "AGG_CCRPD_log": [-5.5215],
      "AGG_CCRPD_index": [100.0]
    }
    ```

    The exact `MyScale` label depends on your bank's configured scale.
  </Accordion>
</AccordionGroup>

## What rating scale does not do

* Change which entities are in `scope`
* Grant contributor-only access
* Expose another bank's ratings
* Change numeric PD values
* Make `CCR` and `MyRating` entity counts directly comparable
