Sensitivity testing

Use sensitivity testing when you want to run a uniform grid of underlying and volatility shocks across the submitted portfolio.

This is done through the stress_sensitivities object on POST /portfolios. It is useful for broad what-if analysis and sensitivity surfaces.

Overview

Sensitivity testing uses two arrays:

  • underlying_shocks
  • volatility_shocks

These arrays define a shock grid that is applied across the submitted positions. They do not map to product classifications such as Energy, Crude Oil, or a named underlying.

How It Works

Each value in underlying_shocks is paired with the value at the same index in volatility_shocks.

For example:

{
  "underlying_shocks": [-0.2, -0.1, -0.05, -0.01, 0.01, 0.05, 0.1, 0.2],
  "volatility_shocks": [0, 0, 0, 0, 0, 0, 0, 0]
}

describes eight shock points. Each point is one combined underlying-and-volatility move in the grid.

This means the arrays answer the question:

What combined shocks should be evaluated?

not:

Which sectors or underlyings should receive different shocks?

Shock arrays

The two arrays should be understood as paired axes:

  • underlying_shocks[i] is the underlying move at index i
  • volatility_shocks[i] is the volatility move at index i

So if index 0 is:

{
  "underlying_shock": -0.2,
  "volatility_shock": 0
}

that represents one stress point in the sensitivity grid.

If you want eight sensitivity points, provide eight paired values.

Example request

{
  "calculation_type": "analytics",
  "portfolio": [
    {
      "account_code": "Account 001",
      "exchange_code": "NYMEX",
      "contract_code": "LO",
      "contract_type": "CALL",
      "contract_expiry": "202512",
      "contract_strike": "50.1",
      "net_position": "-1000"
    }
  ],
  "stress_sensitivities": {
    "underlying_shocks": [-0.2, -0.1, -0.05, -0.01, 0.01, 0.05, 0.1, 0.2],
    "volatility_shocks": [0, 0, 0, 0, 0, 0, 0, 0]
  }
}

This asks the API to evaluate the submitted position across the same eight shock points.

When to use stress testing instead

Do not use stress_sensitivities when your requirement is:

  • shock Energy differently from Metals
  • shock Crude Oil differently from the rest of Energy
  • shock a specific underlying differently from its broader category
  • shock one expiry differently from other expiries on the same underlying

Those are scenario-definition problems, not sensitivity-grid problems.

For those cases, use the stress scenario API:

Was this page helpful?