Skip to content

Properties


Calculates the overall portfolio properties with a single API call. Sensitivities, exposures and risk are aggregated from individual securities to a portfolio level:

HTTP Request

POST /calculations/properties

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. Changing the base currency automatically introduces new currency risks. See supported currencies here.
nlv file optional, default is null (calculated) The net liquidating value (NAV) of the portfolio. If not supplied, the API calculates it from all cash securities. Securities traded on margin are assumed to have NLV zero. Providing an NLV reconciles the margin.
horizon integer optional, default is 5 Simulation horizon for risk factor shocks. Accepts: 1, 5, 20, or 60. More info here.
sampling integer optional, default is 1 Frequency of historical data sampling. Use 1 for daily, 5 for weekly (non-overlapping).
aggregation string optional, default is position (no aggregation) Aggregates security MCTR’s by criteria: custom, position, country, sector, gics_sector, market_capitalization, liquidity, implied_rating, duration, security_type, security_type_refined, dividend_yield, exposure, currency, fixed_income, total_esg. More info here.
projection array optional, default is ["IND:SPX"] Array of securities to be used as a top-down factor model. Maximum: 10 elements.
volatility_half_life integer optional, default is 2 Volatility half life in months: 0 (no decay), 2, 6, 12, 24, or 48.
correlation_half_life integer optional, default is 6 Correlation half life in months: 0 (no decay), 2, 6, 12, 24, or 48.
confidence string optional, default is 95% Confidence level for CVaR calculation. Accepts: 1sigma, 2sigma, 3sigma, 85%, 90%, 95%, 97%, or 99%. More info here.

To calculate the properties, run the following:

curl https://api.everysk.com/v2/calculations/properties \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -d '{
        "securities": [
          {
            "id": "id1",
            "symbol": "AAPL",
            "quantity": 1000.0
          },
          {
            "id": "id2",
            "symbol": "SIE:XETR",
            "quantity": 750.0
          }
        ],
        "date": "20210622"
      }' \
  -X POST

The above call returns the following JSON object:

{
  "properties": {
    "unmapped_tickers": [],
    "results": [
      {
        "value": 0.04480515690789044,
        "measure": "expected_return"
      },
      {
        "value": 0.18968077675311104,
        "measure": "expected_volatility"
      },
      {
        "value": -0.042711478991844576,
        "measure": "var"
      },
      {
        "value": -0.0528583774329209,
        "measure": "cvar"
      },
      {
        "value": 1.0,
        "measure": "net_exposure"
      },
      {
        "value": 1.0,
        "measure": "gross_exposure"
      },
      {
        "value": 0.0013916717517594335,
        "measure": "liquidity"
      },
      {
        "value": 256401.00149999995,
        "measure": "nlv"
      },
      {
        "value": 0.0,
        "measure": "delta"
      },
      {
        "value": 0.0,
        "measure": "gamma"
      },
      {
        "value": 0.0,
        "measure": "theta"
      },
      {
        "value": 0.0,
        "measure": "vega"
      },
      {
        "value": 0.0,
        "measure": "duration"
      },
      {
        "value": 0.0,
        "measure": "effective_duration"
      },
      {
        "value": 0.0,
        "measure": "macaulay_duration"
      },
      {
        "value": 0.0,
        "measure": "modified_duration"
      },
      {
        "value": 0.0,
        "measure": "cs01"
      },
      {
        "value": 0.0,
        "measure": "dv01"
      },
      ...
    ]
  }
}