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 float |
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 any integer from 1 to 60. More info here. |
sampling integer |
optional, default is 5 Frequency of historical data sampling. Use 1 for daily, 5 for weekly (non-overlapping). If horizon is less than sampling, the API uses the horizon value as the sampling. |
aggregation string |
optional, default is position (no aggregation) Groups the securities 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. |
volatility_half_life integer |
optional, default is 2 Volatility half life in months: 0 (no decay), 1, 2, 6, 12, 24 or 48. |
correlation_half_life integer |
optional, default is 6 Correlation half life in months: 0 (no decay), 1, 2, 6, 12, 24 or 48. |
confidence string |
optional, default is 95% Confidence level for CVaR calculation. Accepts: 1_sigma, 2_sigma, 3_sigma, 85%, 90%, 95%, 97%, 97.5% or 99%. More info here. |
posterior_model string |
optional, default is entropy The method that calculates the posterior probabilities of the scenarios: entropy, kernel or crisp. See Posterior model. |
use_simulations boolean |
optional, default is true When false, the engine does not run the Monte Carlo simulations. Set it to false only when you do not need the measures that come from the simulations, such as var and cvar. |
model string |
optional, default is v1 The calculation engine: v1 or v2. See Calculation model. |
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"
},
...
]
}
}
The results array has one object for each of these measures: nlv, expected_volatility, expected_return, liquidity, var, cvar, notional_var, notional_cvar, net_exposure, gross_exposure, dividend_yield, delta, gamma, theta, vega, duration, effective_duration, macaulay_duration, modified_duration, dv01_pre, dv01_cupom, dv01_ipca, cs01, dv01, average_life, average_life_pmr_cmn, average_life_inrfb_1585 and rolled_average_life.