Days to Unwind¶
Estimates the number of days required to fully liquidate each position in the portfolio, given its size relative to the average daily trading volume (ADTV) and a target participation rate.
HTTP Request
POST /calculations/days_to_unwind
HTTP Parameters
| Parameter | Description |
|---|---|
portfolio_id string |
optional The ID of an existing portfolio. When provided, the calculation uses 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. |
base_currency string |
optional, default is USD 3-letter ISO 4217 currency code. |
nlv float |
optional, default is null (calculated) Net liquidating value (NAV) of the portfolio. |
days array |
REQUIRED An array of integer day thresholds used to compute the percentage of the portfolio that can be unwound within each threshold (e.g. [1, 5, 10, 20]). |
liquidity_terms object |
optional An object defining ADTV and participation rate parameters per security group. Defaults to {"default": {"adtv_days": 20, "participation_rate": 0.2}}. Override by passing custom keys matching security identifiers or instrument classes. |
filter string |
optional, default is null Filter expression to select a subset of securities for display. See Filter Expression. |
To calculate the days to unwind, run the following:
curl https://api.everysk.com/v2/calculations/days_to_unwind \
-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
}
],
"days": [1, 5, 10, 20],
"date": "20210622"
}' \
-X POST
The above call returns the following JSON object:
{
"days_to_unwind": {
"unmapped_tickers": [],
"results": {
"id1": {
"dtu": 3,
"adtv": 75000000.0,
"buckets": [
{"days": 1, "value": 0.33},
{"days": 5, "value": 1.0},
{"days": 10, "value": 1.0},
{"days": 20, "value": 1.0},
{"days": -1, "value": 0.0}
]
},
"id2": {
"dtu": 1,
"adtv": 12000000.0,
"buckets": [
{"days": 1, "value": 1.0},
{"days": 5, "value": 1.0},
{"days": 10, "value": 1.0},
{"days": 20, "value": 1.0},
{"days": -1, "value": 0.0}
]
}
}
}
}