Skip to content

Sensitivity


Calculates greeks for options and various fixed income sensitivities for fixed income securities. Values can be unitized when “compute_notional” is False, or weighted by the notional exposure of the security when “compute_notional” is True.

HTTP Request

POST /calculations/sensitivity

HTTP Parameters

Parameter Description
portfolio_id string optional The ID of an existing portfolio. When provided, the calculation will use the portfolio's securities, date, base currency, and NLV. The securities parameter is no longer required.
securities array REQUIRED * An array of objects describing the securities in the portfolio. Each object includes a unique id, symbol, quantity, and label. For more details click here.
* Not required if portfolio_id is provided.
date string date optional, default is null (today) Portfolio date in the format: YYYYMMDD. This instructs the API to use the market conditions and security prices prevailing on that date. Historical portfolios are calculated without look ahead. To use today’s conditions, pass null.
base_currency string optional, default is USD 3-letter ISO 4217 currency code. Portfolios can have their base currency changed via the API call. Changing the base currency automatically introduces new currency risks. See supported currencies here.
sensitivity_type string optional, default is delta The type of sensitivity. Accepts: delta, gamma, theta, vega, duration, effective_duration, macaulay_duration, modified_duration, cs01, dv01, average_life, rolled_average_life, or volatility.
compute_notional boolean optional, default is False Determines whether sensitivities should be weighted by notional exposure or unitized.
True: Weight sensitivities by notional exposure.
False: Unitize sensitivities.

To calculate the sensitivity, run the following:

curl https://api.everysk.com/v2/calculations/sensitivity \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -d '{
        "securities": [
          {
            "id": "id1",
            "symbol": "AAPL 20210629 P120 0.905",
            "quantity": 1000.0
          },
          {
            "id": "id2",
            "symbol": "TWTR 20230120 C100.000 4.3",
            "quantity": 750.0
          }
        ],
        "date": "20210622"
      }' \
  -X POST

The above call returns the following JSON object:

{
  "sensitivity": {
    "unmapped_tickers": [],
    "sensitivity_type": "delta",
    "results": {
      "id2": 0.2714842229039089,
      "id1": -0.12767219639181443
    }
  }
}