Returns status information about the user currently logged in (token).
{- "name": "Account Name",
- "userid": 91,
- "email": "account.name@test.com",
- "organisation": "MyOrg",
- "credits_consumed": 50000,
- "subscriptions": [
- {
- "paidCredits": 100000,
- "period_start": "1970-01-01",
- "period_end": "2099-12-31",
- "product_name": "Trial"
}
], - "credits_remaining": 50000,
- "credits_total": 100000
}Obtains the cache status for this instrument. If a timeframe is specified, returns the historical data associated with this instrument and timeframe
Note that this endpoint will not return anything other than user inputted data. MantaRisk does not provide an endpoint to obtain historical prices for its own pricing data.
The history endpoint allows a user of the API to inject and control its own data into the MantaRisk platform in case 1) the instrument coverage of the platform is not sufficient (e.g. missing instruments) or 2) to input a portfolio's historical performance for further analysis through the platform's analytics.
| instrument_code required | string |
| timeframeid | integer 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes) |
| start_date | string <date-time> start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z |
| currency | string <string> Example: currency=CHF if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency. |
{- "instrument": {
- "classification": {
- "sector": "Information Technology",
- "primary_country": "United States"
}, - "name": "Apple Inc",
- "print_name": "[AAPL] Apple Inc (Common Stock)",
- "currency": "USD",
- "margin_data": {
- "deposit_factor": 1
}, - "fee_data": {
- "fixed_commission": 0,
- "variable_commission": 0,
- "spread": 0
}, - "exchange": {
- "mic_code": "XNGS",
- "name": "NASDAQ",
- "priority": 1,
- "country": "United States",
- "timezone": "America/New_York",
- "exchange_code": "UW",
- "country_iso": "US"
}, - "apiid": 102,
- "identifiers": {
- "symbol": "AAPL"
}, - "asset_type": "Common Stock",
- "asset_class": "Equity",
- "instrument_code": "AAPL_XNGS"
}, - "historyStatus": [
- {
- "timeframeid": 4,
- "timeframe_name": "15 Minutes",
- "last_updated": "N/A",
- "n_records": 0,
- "fill_from": "2024-02-21T07:58:54Z"
}, - {
- "timeframeid": 3,
- "timeframe_name": "1 Hour",
- "last_updated": "N/A",
- "n_records": 0,
- "fill_from": "2024-02-21T07:58:55Z"
}, - {
- "timeframeid": 1,
- "timeframe_name": "Day",
- "last_updated": "2025-02-19T13:58:11Z",
- "n_records": 1,
- "fill_from": "2023-10-27T11:20:17Z"
}
]
}Update the historical cache for this instrument / timeframe. Open, high, low, close and volume are all assumed to be adjusted for dividends and splits where relevant. For fixed income instruments the historical data is assumed to be the "clean" data i.e. without interest payments, these are specified in the instrument object.
This endpoint is for inputting user data in cases where MantaRisk does not cover a specific instrument or if the pricing data is controlled by the user (e.g. portfolio's performance). The pricing data must be adjusted for both dividends and splits.
The history endpoint allows a user of the API to inject and control its own data into the MantaRisk platform in case 1) the instrument coverage of the platform is not sufficient (e.g. missing instruments) or 2) to input a portfolio's historical performance for further analysis through the platform's analytics.
Historical data
instrument_equity (object) or instrument_fixed_income (object) or instrument_derivative (object) or instrument_generic (object) (instrument) | |
| timeframe_id | integer Enum: 0 1 2 3 4 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes) - denotes the granularity of the time series (usually daily candles i.e. 1) |
Array of objects (ohlc) |
{- "instrument": {
- "instrument_code": "AAPL_XNGS",
- "asset_type": "Common Stock",
- "currency": "USD",
- "name": "Apple Inc",
- "identifiers": {
- "symbol": "AAPL",
- "isin": "US0378331005",
- "figi": "BBG000B9Y5X2"
}, - "exchange": {
- "mic_code": "XNGS"
}, - "classification": {
- "sector": "Information Technology",
- "industry": "Consumer Electronics",
- "primary_country": "United States"
}, - "margin_data": {
- "deposit_factor": 1
}
}, - "timeframe_id": 1,
- "history": [
- {
- "datetime": "2023-10-27T11:20:17Z",
- "open": 100,
- "high": 120.1,
- "low": 99.2,
- "close": 111.1,
- "volume": 231654
}
]
}Returns the list of the pricing data providers currently available on this account.
The "User Feed" API denotes the API id which must be used to retrieve user inputted pricing data.
[- {
- "apiid": 91,
- "api_name": "User Feed"
}, - {
- "apiid": 8,
- "api_name": "TwelveData"
}
]Allows a user to search the instruments available within the platform. This includes user fed instruments as well as the instrument coverage provided directly by MantaRisk. The results are ordered from the most likely primary exchange to the least.
| searchstring | string Name or symbol of the instrument |
| symbol | string Example: symbol=AAPL Symbol ticker of the instrument e.g. AAPL, EUR/USD, ... |
| mic_code | string Example: mic_code=XNGS Market Identifier Code (MIC) under ISO 10383 standard |
| isin | string Example: isin=US0378331005 International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security |
| currency | string Example: currency=USD Currency of the instrument - helps filtering if there are multiple results |
[- {
- "classification": {
- "sector": "Information Technology",
- "industry": "Consumer Electronics",
- "primary_country": "United States"
}, - "name": "Apple Inc",
- "print_name": "[AAPL] Apple Inc (Common Stock)",
- "currency": "USD",
- "margin_data": {
- "deposit_factor": 1
}, - "fee_data": {
- "fixed_commission": 0,
- "variable_commission": 0,
- "spread": 0
}, - "exchange": {
- "mic_code": "XNGS",
- "name": "NASDAQ",
- "priority": 1,
- "country": "United States",
- "timezone": "America/New_York",
- "exchange_code": "UW",
- "country_iso": "US"
}, - "apiid": 8,
- "identifiers": {
- "symbol": "AAPL",
- "isin": "US0378331005",
- "figi": "BBG000B9Y5X2"
}, - "asset_type": "Common Stock",
- "asset_class": "Equity",
- "instrument_code": "AAPL_XNGS"
}
]Allows a user to confirm coverage for isin / currency pairs. This endpoint returns the best matching instrument, looking at exchange priority and also data quality. The results should be stored by the user and re-used with the rest of the API.
| method required | string Value: "ISIN_CURRENCY" ISIN_CURRENCY, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
|
| format_input | string Enum: "JSON" "CSV" Format of the data passed in the body of this call. Default is JSON |
| format_output | string Enum: "JSON" "CSV" Format of the response from this endpoint. Default is JSON |
Dependent on chosen method
[- {
- "isin": "US0378331005",
- "currency": "USD"
}, - {
- "isin": "US4592001014",
- "currency": "USD"
}
][- {
- "coverage_status": "OK",
- "input": {
- "isin": "US4592001014",
- "currency": "USD"
}, - "history_start": "2019-05-24",
- "history_end": "2025-05-23",
- "instrument": {
- "classification": {
- "sector": "Information Technology",
- "industry": "IT Services",
- "primary_country": "USA"
}, - "name": "International Business Machines",
- "print_name": "[IBM] International Business Machines (Common Stock)",
- "currency": "USD",
- "exchange": {
- "mic_code": "XNYS",
- "name": "NYSE",
- "priority": 1,
- "exchange_code": "US",
- "country_iso": "USA"
}, - "apiid": 7,
- "identifiers": {
- "symbol": "IBM",
- "isin": "US4592001014",
- "figi": "BBG000BLNNH6"
}, - "asset_type": "Common Stock",
- "asset_class": "Equity",
- "instrument_code": "IBM.US",
- "margin_data": {
- "deposit_factor": 1
}, - "fee_data": {
- "fixed_commission": 0,
- "variable_commission": 0,
- "spread": 0
}
}
}
]| client_reference | string client side unique identifier for the portfolio |
| all_data | boolean if true, delete all portfolios associated with this account. Use with caution |
This endpoint is used to notifies MantaRisk of a new portfolio or a change in an existing portfolio. This allows MantaRisk to cache historical data and perform costly computations ahead of time. This endpoint should be called before any analysis is run when:
Please ensure the wishlist is populated. The wishlist is the instrument universe you would like MantaRisk to consider when looking at your portfolio. An empty wishlist means you desire an empty portfolio. A wishlist with more instruments than currently open positions indicates you are looking at investing in other assets. A wishlist smaller than currently open positions means you are looking at divesting etc.
Note: this endpoint may time out here in swagger. The portfolio is however still being loaded in the background. There is no need to call this endpoint again. Please use GET /portfolio to confirm the loading status.
| client_reference required | string client side unique identifier for the portfolio |
Composition of the portfolio
required | object (capital) |
required | Array of objects (wish) |
Array of objects (position) |
{- "capital": {
- "available": 0.1,
- "currency": "USD",
- "funds": 0.1,
- "equity": 0.1,
- "print_equity": "string",
- "print_funds": "string",
- "print_available": "string"
}, - "wishlist": [
- {
- "instrument": {
- "instrument_code": "TSLA_XNGS",
- "apiid": 8
}, - "direction": "Long"
}
], - "positions": [
- {
- "instrument_code": "TSLA_XNGS",
- "apiid": 8,
- "date_open": "2024-01-03T15:43:45Z",
- "level": 240,
- "size": 100,
- "direction": "Long",
- "date_close": "2024-12-09T17:12:34Z",
- "close": 395.1
}
]
}This method provides the status of one or more portfolios, showing their capital, composition and, importantly, their data load status. Attempting to analyse a portfolio whose data has not yet been fully loaded may lead to a timeout. It is best practice to check the data load state of a portfolio before triggering an analysis. Returns:
| client_reference | string client side unique identifier for the portfolio |
[- {
- "capital": {
- "currency": "USD",
- "funds": 100000,
- "available": 100000,
- "equity": 100000
}, - "wishlist": [
- {
- "instrument": {
- "instrument_code": "TSLA_XNGS",
- "apiid": 8
}, - "direction": "Long"
}
], - "positions": [
- {
- "size": 100,
- "level": 240,
- "close": "395.1",
- "limit": 0,
- "stop": 0,
- "direction": "Long",
- "date_close": "2024-12-09T17:12:34Z",
- "date_open": "2024-01-03T15:43:45Z",
- "instrument_code": "TSLA_XNGS",
- "apiid": 8
}
], - "data_load": "100%",
- "client_reference": "TEST"
}
]List of geographies which can be used as strategy constraints. Use the id as parameter in the constraint_generic schema
[- {
- "name": "Argentina",
- "type": "geographic",
- "id": "ARGT_ARCX_8",
- "description": ""
}, - {
- "name": "Asia ex Japan",
- "type": "geographic",
- "id": "AAXJ_XNMS_8",
- "description": ""
}, - {
- "name": "Australia",
- "type": "geographic",
- "id": "EWA_ARCX_8",
- "description": ""
}, - {
- "name": "Austria",
- "type": "geographic",
- "id": "EWO_ARCX_8",
- "description": ""
}, - {
- "name": "Belgium",
- "type": "geographic",
- "id": "EWK_ARCX_8",
- "description": ""
}, - {
- "name": "Brazil",
- "type": "geographic",
- "id": "EWZ_ARCX_8",
- "description": ""
}, - {
- "name": "Canada",
- "type": "geographic",
- "id": "EWC_ARCX_8",
- "description": ""
}, - {
- "name": "China",
- "type": "geographic",
- "id": "CNYA_BATS_8",
- "description": ""
}, - {
- "name": "Denmark",
- "type": "geographic",
- "id": "EDEN_BATS_8",
- "description": ""
}, - {
- "name": "Europe",
- "type": "geographic",
- "id": "IEUR_ARCX_8",
- "description": ""
}, - {
- "name": "Finland",
- "type": "geographic",
- "id": "EFNL_BATS_8",
- "description": ""
}, - {
- "name": "France",
- "type": "geographic",
- "id": "EWQ_ARCX_8",
- "description": ""
}, - {
- "name": "Germany",
- "type": "geographic",
- "id": "EXS1_XFRA_8",
- "description": ""
}, - {
- "name": "India",
- "type": "geographic",
- "id": "INDA_BATS_8",
- "description": ""
}, - {
- "name": "Indonesia",
- "type": "geographic",
- "id": "EIDO_ARCX_8",
- "description": ""
}, - {
- "name": "Ireland",
- "type": "geographic",
- "id": "EIRL_ARCX_8",
- "description": ""
}, - {
- "name": "Italy",
- "type": "geographic",
- "id": "EWI_ARCX_8",
- "description": ""
}, - {
- "name": "Japan",
- "type": "geographic",
- "id": "EWJ_ARCX_8",
- "description": ""
}, - {
- "name": "Latin America",
- "type": "geographic",
- "id": "ILF_ARCX_8",
- "description": ""
}, - {
- "name": "Mexico",
- "type": "geographic",
- "id": "EWW_ARCX_8",
- "description": ""
}, - {
- "name": "Netherlands",
- "type": "geographic",
- "id": "EWN_ARCX_8",
- "description": ""
}, - {
- "name": "Norway",
- "type": "geographic",
- "id": "ENOR_BATS_8",
- "description": ""
}, - {
- "name": "Poland",
- "type": "geographic",
- "id": "EPOL_ARCX_8",
- "description": ""
}, - {
- "name": "Saudi Arabia",
- "type": "geographic",
- "id": "KSA_ARCX_8",
- "description": ""
}, - {
- "name": "South Africa",
- "type": "geographic",
- "id": "EZA_ARCX_8",
- "description": ""
}, - {
- "name": "South Korea",
- "type": "geographic",
- "id": "EWY_ARCX_8",
- "description": ""
}, - {
- "name": "Spain",
- "type": "geographic",
- "id": "EWP_ARCX_8",
- "description": ""
}, - {
- "name": "Sweden",
- "type": "geographic",
- "id": "EWD_ARCX_8",
- "description": ""
}, - {
- "name": "Switzerland",
- "type": "geographic",
- "id": "CSSMI_XSWX_8",
- "description": ""
}, - {
- "name": "Taiwan",
- "type": "geographic",
- "id": "EWT_ARCX_8",
- "description": ""
}, - {
- "name": "Thailand",
- "type": "geographic",
- "id": "THD_ARCX_8",
- "description": ""
}, - {
- "name": "United Kingdom",
- "type": "geographic",
- "id": "ISF_XLON_8",
- "description": ""
}, - {
- "name": "United States",
- "type": "geographic",
- "id": "IVV_ARCX_8",
- "description": ""
}, - {
- "name": "World",
- "type": "geographic",
- "id": "SWDA_XLON_8",
- "description": ""
}
]List of sectors which can be used as strategy constraints. Use the id as parameter in the constraint_generic schema
[- {
- "name": "Consumer Discretionary",
- "type": "sector",
- "id": "RXI_ARCX_8",
- "description": ""
}, - {
- "name": "Consumer Staples",
- "type": "sector",
- "id": "KXI_ARCX_8",
- "description": ""
}, - {
- "name": "Energy",
- "type": "sector",
- "id": "IXC_ARCX_8",
- "description": ""
}, - {
- "name": "Financials",
- "type": "sector",
- "id": "IXG_ARCX_8",
- "description": ""
}, - {
- "name": "Health Care",
- "type": "sector",
- "id": "IXJ_ARCX_8",
- "description": ""
}, - {
- "name": "Industrials",
- "type": "sector",
- "id": "EXI_ARCX_8",
- "description": ""
}, - {
- "name": "Materials",
- "type": "sector",
- "id": "MXI_ARCX_8",
- "description": ""
}, - {
- "name": "Real Estate",
- "type": "sector",
- "id": "REET_ARCX_8",
- "description": ""
}, - {
- "name": "Technology",
- "type": "sector",
- "id": "IXN_ARCX_8",
- "description": ""
}, - {
- "name": "Telecommunication Services",
- "type": "sector",
- "id": "IXP_ARCX_8",
- "description": ""
}, - {
- "name": "Utilities",
- "type": "sector",
- "id": "JXI_ARCX_8",
- "description": ""
}
]List of currencies which can be used as strategy constraints. Use the id as parameter in the constraint_generic schema
[- {
- "name": "ARS",
- "type": "currency",
- "id": "ARS",
- "description": "Argentine Peso"
}, - {
- "name": "AUD",
- "type": "currency",
- "id": "AUD",
- "description": "Australian Dollar"
}, - {
- "name": "BRL",
- "type": "currency",
- "id": "BRL",
- "description": "Brazilian Real"
}, - {
- "name": "BTC",
- "type": "crypto",
- "id": "BTC",
- "description": ""
}, - {
- "name": "CAD",
- "type": "currency",
- "id": "CAD",
- "description": "Canadian Dollar"
}, - {
- "name": "CHF",
- "type": "currency",
- "id": "CHF",
- "description": "Swiss Franc"
}, - {
- "name": "CNY",
- "type": "currency",
- "id": "CNY",
- "description": "Chinese Yuan"
}, - {
- "name": "ETH",
- "type": "crypto",
- "id": "ETH",
- "description": ""
}, - {
- "name": "EUR",
- "type": "currency",
- "id": "EUR",
- "description": "Euro"
}, - {
- "name": "GBP",
- "type": "currency",
- "id": "GBP",
- "description": "British Pound"
}, - {
- "name": "ILS",
- "type": "currency",
- "id": "ILS",
- "description": "Israeli New Shekel"
}, - {
- "name": "JPY",
- "type": "currency",
- "id": "JPY",
- "description": "Japanese Yen"
}, - {
- "name": "KRW",
- "type": "currency",
- "id": "KRW",
- "description": "South Korean Won"
}, - {
- "name": "MXN",
- "type": "currency",
- "id": "MXN",
- "description": "Mexican Peso"
}, - {
- "name": "NOK",
- "type": "currency",
- "id": "NOK",
- "description": "Norwegian Krone"
}, - {
- "name": "NZD",
- "type": "currency",
- "id": "NZD",
- "description": "New Zealand Dollar"
}, - {
- "name": "SEK",
- "type": "currency",
- "id": "SEK",
- "description": "Swedish Krona"
}, - {
- "name": "SGD",
- "type": "currency",
- "id": "SGD",
- "description": "Singapore Dollar"
}, - {
- "name": "TWD",
- "type": "currency",
- "id": "TWD",
- "description": "New Taiwan Dollar"
}, - {
- "name": "USD",
- "type": "currency",
- "id": "USD",
- "description": "US Dollar"
}, - {
- "name": "ZAR",
- "type": "currency",
- "id": "ZAR",
- "description": "South African Rand"
}
]List of asset classes which can be used as strategy constraints. Use the id as parameter in the constraint_generic schema
[- {
- "name": "Commodity",
- "type": "assetclass",
- "id": "Commodity",
- "description": ""
}, - {
- "name": "Crypto",
- "type": "assetclass",
- "id": "Crypto",
- "description": ""
}, - {
- "name": "Derivative",
- "type": "assetclass",
- "id": "Derivative",
- "description": ""
}, - {
- "name": "Equity",
- "type": "assetclass",
- "id": "Equity",
- "description": ""
}, - {
- "name": "FixedIncome",
- "type": "assetclass",
- "id": "FixedIncome",
- "description": ""
}, - {
- "name": "Forex",
- "type": "assetclass",
- "id": "Forex",
- "description": ""
}, - {
- "name": "Fund",
- "type": "assetclass",
- "id": "Fund",
- "description": ""
}, - {
- "name": "Index",
- "type": "assetclass",
- "id": "Index",
- "description": ""
}
]List of risk management / portfolio optimisation rules can be used to build a risk management strategy. Use the rule_id within the strategy schema
[- {
- "rule_id": 1,
- "category_id": 1,
- "name": "Level - Distance to Market Price",
- "description": "This rule ensures the order's entry price is not so far out that the trade is unlikely to execute within the given timeframe. This allows your capital to be put to better use on orders which are more likely to execute.\nThis also prevents orders to be placed so far ahead that the context of the market conditions when the order execute are completely different from the market conditions when the order was placed.\nThis rule will default the order's entry level to the existing market price if no level is provided.",
- "category": "Level",
- "parameters": [ ]
}, - {
- "rule_id": 2,
- "category_id": 4,
- "name": "Size - Capital at Risk (5)",
- "description": "Ensures the order size is set such that the total risk taken on a single position does not exceed a given percentage of your funds.\n\nFunds are defined as the total value of your brokerage account prior to and excluding any open position.\n\nThis rule will default the size of the order to the given percentage if no size has been specified.\n\nImportant Note: the size provided is effectively the risk taken on a position as a percentage of the account value. This may lead to sizes that are larger than the funds available on the account. This is valid if you are using leveraged instruments (e.g. CFDs) but not if you are buying the stock outright. If this is an issue, consider using the Size - Capital Invested rule instead.\n\nParameters\n- Percentage at Risk: specify the maximum percentage of your funds which should be at risk on any given order. A value of 2 corresponds to 2%. The value must be >= 0.1 and <= 20.",
- "category": "Size",
- "parameters": [
- {
- "name": "Percentage at Risk",
- "description": "The maximum percentage of capital on any given order. A value of 2 corresponds to 2%. The value must be >= 0.1 and <= 20",
- "value": "5",
- "key": "Percentage"
}
]
}, - {
- "rule_id": 3,
- "category_id": 2,
- "name": "Stop - ATR Based (1, 40)",
- "description": "Ensures the order is not stopped out due to volatility (as opposed to a genuine market movement). Validates that the stop is placed further than a minimum distance from the entry level. The distance is calculated as a factor of the ATR value on that day.\nIf no stop has been specified. This rule will default the stop to the given ATR factor.\n\nParameters\n- ATR Factor: number of ATRs to use to set the stop. This value can only be >= 1.",
- "category": "Stop",
- "parameters": [
- {
- "name": "ATR Factor",
- "description": "Number of ATRs to use to set the stop. This value must be >= 1",
- "value": "1",
- "key": "ATRFactor"
}, - {
- "name": "Lookback Period",
- "description": "Number of candles of backward history on which to perform the analysis",
- "value": "40",
- "key": "Period"
}
]
}, - {
- "rule_id": 4,
- "category_id": 0,
- "name": "Direction - Not Overextended (30, 70)",
- "description": "At its core, this rule validates that the order is not placed when a stock is overextended (overbought in the case of a Long, oversold in the case of a short). The rule relies on the RSI indicator as its key metric and look at historical pricing data to determine statistically relevant levels for the RSI including whether it is a reliable indicator or not. This rule also provides contextual information on historical RSI levels at which the price has changed direction.",
- "category": "Type",
- "parameters": [
- {
- "name": "RSI Upper Limit",
- "description": "RSI value above which it would be unwise to place a long order",
- "value": "30",
- "key": "RSIUpLimit"
}, - {
- "name": "RSI Lower Limit",
- "description": "RSI value below which it would be unwise to place a short order",
- "value": "70",
- "key": "RSIDownLimit"
}
]
}, - {
- "rule_id": 5,
- "category_id": 3,
- "name": "Limit - At Resistance",
- "description": "Ensures the limit of an order is set close to the closest resistance level for the instrument under consideration. The price of the instrument is likely to reverse at this level. \n\nThis rule defaults the limit of the order to the closest resistance level when no limit has been specified on the order.\n\nThis rule also provides contextual information around the minor and major resistance levels seen for this particular instrument.",
- "category": "Limit",
- "parameters": [ ]
}, - {
- "rule_id": 6,
- "category_id": 5,
- "name": "Risk Reward Ratio (1)",
- "description": "Ensures that the risk reward ratio of the order is above a given threshold. We suggest this is included in any risk management strategy.\n\nParameters\n- Reward: defaulted to 1. Can be any value >= 0.5",
- "category": "Generic",
- "parameters": [
- {
- "name": "Minimum Risk Reward Ratio",
- "description": "Proportion of reward given risk taken. Any value >= 0.5",
- "value": "1",
- "key": "RewardRatio"
}
]
}, - {
- "rule_id": 7,
- "category_id": 0,
- "name": "Direction - Follow The Supertrend (3, 10, SMA)",
- "description": "Validate that the order's direction is aligned to the SuperTrend indicator i.e. a long order is not placed when the SuperTrend is indicating a down trend.",
- "category": "Type",
- "parameters": [
- {
- "name": "ATR Factor",
- "description": "Number of ATRs to use to set the stop. This value must be >= 1",
- "value": "3",
- "key": "ATRFactor"
}, - {
- "name": "Lookback Period",
- "description": "Number of candles of backward history on which to perform the analysis",
- "value": "10",
- "key": "Period"
}, - {
- "name": "Method",
- "description": "SMA (Simple Moving Average), EMA (Exponential Moving Average) or Smoothed (Wilder's Smoothing Method)",
- "value": "SMA",
- "key": "Method"
}
]
}, - {
- "rule_id": 8,
- "category_id": 5,
- "name": "Backtest Over 200 Candles",
- "description": "Performs a statistical analysis of the order based on the last n candles and taking into account the chosen risk management strategy. Provides an indication of probability of sucess and duration of the trade.\n\nParameters\n- Lookback Period: number of candles of backward history on which to perform the analysis. Can be any value between 7 and 500 inclusive.",
- "category": "Generic",
- "parameters": [
- {
- "name": "Lookback Period",
- "description": "Number of candles of backward history on which to perform the analysis",
- "value": "200",
- "key": "Period"
}
]
}, - {
- "rule_id": 9,
- "category_id": 0,
- "name": "Direction - No Short",
- "description": "Markets have a tendency to go up. Corrections are generally short in duration and therefore harder to trade. This rule computes the time the selected instrument spent going up versus down and prevents you from entering a Short if the market has an upward bias.",
- "category": "Type",
- "parameters": [ ]
}, - {
- "rule_id": 10,
- "category_id": 2,
- "name": "Stop - At Support",
- "description": "Ensures the stop is beyond the closest support level. Support levels tend to act as magnet for a stock's price. There is a higher chance of being unduly stopped out if a stop loss is placed before a support level.",
- "category": "Stop",
- "parameters": [ ]
}, - {
- "rule_id": 11,
- "category_id": 5,
- "name": "Minimum Timeframe (4)",
- "description": "A trader's style might not work on all timeframes. This rule ensures a trader does not trade on timeframes which are too small for his style.",
- "category": "Generic",
- "parameters": [
- {
- "name": "Timeframe",
- "description": "Timeframe as an integer: 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes)",
- "value": "4",
- "key": "Timeframe"
}
]
}, - {
- "rule_id": 12,
- "category_id": 9,
- "name": "Portfolio - Min Risk (CVaR) (false, 5)",
- "description": "Conditional Value-at-Risk (CVaR) optimization is a risk management technique used to minimize the potential for large losses in a portfolio of investments.",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}
]
}, - {
- "rule_id": 13,
- "category_id": 4,
- "name": "Size - Capital Invested (5)",
- "description": "Ensures the order size is set such that the value invested does not exceed a given percentage of the funds.\n\nFunds are defined as the total value of your brokerage account prior to and excluding any open position.\n\nValue invested is equal to the stock price multiplied by the size.\n\nThis rule should be used when the instrument is bought outright. See the \"Size - Capital at Risk\" rule if you are trading leveraged instruments and / or only care about the value at risk",
- "category": "Size",
- "parameters": [
- {
- "name": "Percentage at Risk",
- "description": "The maximum percentage of capital on any given order. A value of 2 corresponds to 2%. The value must be >= 0.1 and <= 20",
- "value": "5",
- "key": "Percentage"
}
]
}, - {
- "rule_id": 14,
- "category_id": 9,
- "name": "Portfolio - Equal Weight (false, 5)",
- "description": "Allocates the same proportion of funds to each instrument in the portfolio",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}
]
}, - {
- "rule_id": 15,
- "category_id": 9,
- "name": "Portfolio - Diversified Min Risk (false, 5)",
- "description": "Maximize the diversification of a portfolio by selecting assets with low risk correlations",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}
]
}, - {
- "rule_id": 16,
- "category_id": 9,
- "name": "Portfolio - Max Sharpe (false, 5)",
- "description": "Maximization of Sharpe ratio, highest expected excess rate of return relative to the amount of risk",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}
]
}, - {
- "rule_id": 17,
- "category_id": 9,
- "name": "Portfolio - Volatility (false, 5)",
- "description": "The constituent weights are proportional to their volatility, meaning that an instrument with a higher volatility will also have a higher weight in the portfolio. The main difference between ATR and Volatility is that ATR considers the true prive range (daily highs / lows) whereas Volatility operates based on closing prices.",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}
]
}, - {
- "rule_id": 18,
- "category_id": 9,
- "name": "Portfolio - Risk Parity (false, 5)",
- "description": "Risk parity optimization is an investment strategy that allocates assets based on their risk contributions rather than their expected returns. This means that assets with higher volatilities will receive lower allocations than assets with lower volatilities. This can help to reduce the overall risk of the portfolio while still maintaining the potential for high returns. Empirically, risk parity portfolios have often shown higher Sharpe ratios, but it's not the primary goal of a risk parity optimization.",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}
]
}, - {
- "rule_id": 19,
- "category_id": 9,
- "name": "Portfolio - ATR (false, 5)",
- "description": "The constituent weights are proportional to their Average True Range (ATR), meaning that an instrument with a higher ATR will also have a higher weight in the portfolio. The main difference between ATR and Volatility is that ATR considers the true prive range (daily highs / lows) whereas Volatility operates based on closing prices.",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}
]
}, - {
- "rule_id": 20,
- "category_id": 9,
- "name": "Portfolio - Max Diversification (false, 5)",
- "description": "Maximizes the diversification of the portfolio according to Choueifaty and Coignard",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}
]
}, - {
- "rule_id": 21,
- "category_id": 9,
- "name": "Portfolio - Min Tracking Error (false, 5, null)",
- "description": "Minimizes the tracking error between this portfolio and a benchmark portfolio",
- "category": "Portfolio",
- "parameters": [
- {
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false.",
- "value": "false",
- "key": "IncludeStopLimit"
}, - {
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%.",
- "value": "5",
- "key": "RebalanceTrigger"
}, - {
- "name": "Benchmark (Portfolio)",
- "description": "Client reference to the portfolio to use as a benchmark.",
- "value": null,
- "key": "Benchmark"
}
]
}
]This method provides the detail of one or more strategies. Strategies are created using MantaRisk's UI.
If a strategyid is provided, the query will return the detail of the specified strategy alongside any analysis that was carried on it.
If a strategyid is not provided, the query will return the detail of all strategies but will not provide their associated analysis even if these are presetn in the system.
| strategy_id | integer optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid |
[- {
- "strategy": {
- "name": "Default Risk Strategy",
- "strategy_id": 100,
- "rules": [
- {
- "description": "Validate that the order is not placed when the RSI is indicating an overextension. This rule also provides contextual information on historical RSI levels at which the price has changed direction.\n\nParameters\n- Limit Up: limit above which it would be unwise to place a long order. Default is 70. The value must be between 50 and 100.\n- Limit Down: limit below which it would be unwise to place a short order. Default is 30. The value must be between 50 and 0.",
- "category": "Type",
- "score": "+ 0",
- "rule_id": 4,
- "rule_name": "Direction - Not Overextended (50, 50)",
- "parameters": [
- {
- "value": "50",
- "key": "RSIUpLimit",
- "name": "RSI Upper Limit",
- "description": "RSI value above which it would be unwise to place a long order"
}, - {
- "value": "50",
- "key": "RSIDownLimit",
- "name": "RSI Lower Limit",
- "description": "RSI value below which it would be unwise to place a short order"
}
], - "search_string": "direction - not overextended (50, 50)"
}
]
}, - "status": "NotRun",
- "percentage_complete": 0,
- "last_updated": "N/A",
- "performance_delta": 0,
- "performance_benchmark": 0,
- "performance_new": 0,
- "recovery_days_new": 0,
- "drawdown_delta": 0,
- "cvar_delta": 0,
- "cvar_new": 0,
- "drawdown_new": 0,
- "print_cvar_new": "+0%",
- "print_cvar_delta": "+0%",
- "cvar_benchmark": 0,
- "print_performance_benchmark": "+0%",
- "drawdown_benchmark": 0,
- "print_drawdown_new": "+0%",
- "print_cvar_benchmark": "+0%",
- "recovery_days_delta": 0,
- "print_percentage_complete": "0%",
- "print_performance_delta": "+0%",
- "recovery_days_benchmark": 0,
- "print_performance_new": "+0%",
- "print_drawdown_delta": "+0%",
- "print_drawdown_benchmark": "+0%"
}
]Optimisation strategy
| name required | string User assigned name of the strategy |
| strategy_id | integer MantaRisk's internal id for the strategy. This is used to uniquely identify the risk management strategy in other calls and is populated by MantaRisk only. Not needed to save a Strategy object. |
required | Array of objects |
{- "name": "Example Strategy",
- "rules": [
- {
- "constraints": [
- {
- "parameter": "Crypto",
- "lower_bound": 0,
- "upper_bound": 1,
- "type": "AssetClassConstraint"
}, - {
- "parameter": "EUR",
- "name": "Currency",
- "lower_bound": 0,
- "upper_bound": 1,
- "type": "CurrencyConstraint"
}, - {
- "parameter": "EWA_ARCX_8",
- "constraint_id": 131,
- "lower_bound": 0,
- "upper_bound": 0.15,
- "type": "GeographyConstraint"
}, - {
- "parameter": "KXI_ARCX_8",
- "lower_bound": 0,
- "upper_bound": 0.15,
- "type": "SectorConstraint"
}, - {
- "instrument": {
- "instrument_code": "VFC_XNYS",
- "apiid": 8
}, - "lower_bound": 0,
- "upper_bound": 0.15,
- "type": "InstrumentConstraint"
}
], - "rule_id": 21,
- "parameters": [
- {
- "value": "false",
- "key": "IncludeStopLimit",
- "name": "Include Stop/Limit",
- "description": "If true, the tactical risk management also manages the stops and limits of each orders. Default is false."
}, - {
- "value": "2.0",
- "key": "RebalanceTrigger",
- "name": "Size Rebalance Trigger",
- "description": "Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%."
}, - {
- "value": "Demo Portfolio",
- "key": "Benchmark",
- "name": "Unique Key",
- "description": "Instrument unique key"
}
]
}
]
}{- "strategy_id": 243
}Returns the following analytics for the given price curve:
This endpoint can be used with any instruments including price curves you have entered through the PUT /history endpoint.
This endpoint can be used to caculate analytics for a portfolio whose performance history has been entered through the PUT /history endpoint. A /portfolio/analytics endpoint is also offered to analyse a portfolio composition has opposed to the portfolio performance history.
A time serie can be loaded in the platform using the PUT /history endpoint. Its instrument_code (provided by you in the previous endpoint) and your user apiid (see GET /api) can then be used here.
| instrument_code required | string Example: instrument_code=AAPL_XNGS Can be found using the GET /history or GET/history/instrument endpoints |
| apiid required | integer Example: apiid=8 Can be found using the GET /history or GET/history/instrument endpoints |
{- "risk": {
- "var": {
- "0.975": {
- "week": {
- "value": -0.07102955153888568,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 7.1% over one week"
}, - "month": {
- "value": -0.1179733209108913,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 11.8% over one month"
}, - "day": {
- "value": -0.03730494635955439,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 3.73% over one day"
}
}, - "0.9": {
- "week": {
- "value": -0.042856113132109575,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 4.29% over one week"
}, - "month": {
- "value": -0.08247328155603029,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 8.25% over one month"
}, - "day": {
- "value": -0.019992230328788274,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 2.0% over one day"
}
}, - "0.95": {
- "week": {
- "value": -0.05715886590737207,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 5.72% over one week"
}, - "month": {
- "value": -0.10160115563165717,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 10.16% over one month"
}, - "day": {
- "value": -0.029249400502625922,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 2.92% over one day"
}
}
}, - "cvar": {
- "0.975": {
- "week": {
- "value": -0.09808842198954373,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one week is 9.81%."
}, - "month": {
- "value": -0.1406991349252639,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one month is 14.07%."
}, - "day": {
- "value": -0.047892245726036654,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one day is 4.79%."
}
}, - "0.9": {
- "week": {
- "value": -0.06550228121972783,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one week is 6.55%."
}, - "month": {
- "value": -0.10791351379926839,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one month is 10.79%."
}, - "day": {
- "value": -0.03222938972258358,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one day is 3.22%."
}
}, - "0.95": {
- "week": {
- "value": -0.08096414118541911,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one week is 8.1%."
}, - "month": {
- "value": -0.12426341257391267,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one month is 12.43%."
}, - "day": {
- "value": -0.040291417169682396,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one day is 4.03%."
}
}
}, - "volatility": {
- "week": {
- "value": 0.039562140430553616,
- "commentary": "The weekly volatility of the instrument is 3.96%"
}, - "month": {
- "value": 0.07801305943412255,
- "commentary": "The monthly volatility of the instrument is 7.8%"
}, - "day": {
- "value": 0.018268061287264947,
- "commentary": "The daily volatility of the instrument is 1.83%"
}
}
}, - "exposure": [
- {
- "beta": 0.11394816713283668,
- "factor_focus": "USA",
- "factor_type": "geographic",
- "factor_name": "United States"
}, - {
- "beta": 0.8289048342128765,
- "factor_focus": "Technology",
- "factor_type": "sector",
- "factor_name": "Technology"
}
], - "expected_returns": {
- "equally_weighted_factor_model": {
- "week": 0.003067532372654298,
- "month": 0.012734022071871751,
- "day": 0.0006244866095818968
}, - "exponentially_weighted_factor_model": {
- "week": 0.008647952485722062,
- "month": 0.017128773619049967,
- "day": 0.0019369753830125503
}, - "exponentially_weighted_sample": {
- "week": -0.002423258032908814,
- "month": -0.0011595598024443728,
- "day": -0.0011732669255640313
}, - "equally_weighted_sample": {
- "week": 0.004513965820371744,
- "month": 0.018428353254181355,
- "day": 0.0009090272195341441
}
}, - "average_returns": {
- "week": 0.004513965820371744,
- "month": 0.018428353254181355,
- "day": 0.0009090272195341441
}, - "regression": {
- "idiosyncratic_risk": {
- "week": 0.03779001669795194,
- "month": 0.0604483452139971,
- "day": 0.01346144020396151
}, - "r_squared": 0.5950584685180215,
- "alpha": 0.04933870103202542
}
}Benchmark a specific instrument (or price curve e.g. portolfio returns) against another instrument / price curve e.g. the S&P 500.
To compare a price curve (e.g. portfolio performance), it must be first entered into MantaRisk using the PUT /history endpoint.
The following analytics are provided:
A time serie can be loaded in the platform using the PUT /history endpoint. Its instrument_code (provided by you in the previous endpoint) and your user apiid (see GET /api) can then be used here.
| instrument_code required | string Example: instrument_code=AAPL_XNGS Can be found using the GET /history or GET/history/instrument endpoints |
| apiid required | integer Example: apiid=8 Can be found using the GET /history or GET/history/instrument endpoints |
| benchmark_instrument_code required | string Example: benchmark_instrument_code=SPY_ARCX Can be found using the GET /history or GET/history/instrument endpoints |
| benchmark_apiid required | integer Example: benchmark_apiid=8 Can be found using the GET /history or GET/history/instrument endpoints |
{- "alpha": 0.04264219015288773,
- "beta": 1.191280546269532,
- "cvar": -0.15796703596908965,
- "idiosyncratic_risk": 0.06367893229116413
}Portfolio optimisation / rebalancing. Given a specific optimisation algorithm, returns the corresponding portfolio composition, tactical analysis and orders to be executed.
Please make sure the portfolio data has been loaded before calling this method by using the GET /portfolio endpoint. An analysis that is started before the portfolio data has been fully loaded will take longer.
| client_reference required | string Unique identifier for the portfolio |
| strategy_id required | integer Unique identifier for the risk management strategy |
| benchmark_client_reference | string For tracking error minimization only, portfolio to track |
{- "orders": [
- {
- "timeframe": "Day",
- "commentary": null,
- "notional": "41,589.37",
- "direction": "Long",
- "print_stop": "N/A",
- "print_level": "Market Order",
- "print_limit": "N/A",
- "timeframe_id": 1,
- "print_size": "120",
- "stop_points": "N/A",
- "limit_points": "N/A",
- "apiid": 8,
- "strategy_id": 119,
- "instrument_code": "AAPL_XNGS",
- "instrument_name": "Apple Inc",
- "level": 192.47,
- "size"": 120,
- "stop": null,
- "limit": null
}
], - "capital": {
- "currency": "USD",
- "funds": 101320,
- "available": 100000,
- "equity": 102343,
- "print_funds": "USD 100,000"
}, - "tactical_analysis": [
- {
- "results": [
- {
- "commentary": "High on 24 Jan 24 01:00 CET RSI=60.93\nHigh on 14 Dec 23 01:00 CET RSI=69.76\nCurrent RSI is 37.07 for timeframe starting 15 Mar 24 01:00 CET\n\n\nOut of 348 such past events, a RSI level at 37.07 has a 47% chance of reversal\n",
- "validated": "PASS",
- "datapoints": [
- {
- "reference": "percentage_reversal",
- "label": "Chance of Reversal",
- "value": 0.46839080459770116,
- "status": "GOOD",
- "priority": "percentage_reversal",
- "value_formatted": "46.8%"
}
], - "simple_commentary": "\n\nOut of 348 such past events, a RSI level at 37.07 has a 47% chance of reversal\n",
- "rule_name": "Direction - Not Overextended (30, 70)",
- "rule_id": 4
}
], - "validated": "PASS",
- "commentary_simple": "Apple Inc [AAPL]\nRisk mgt: PASS\n\n\nOut of 348 such past events, a RSI level at 37.07 has a 47% chance of reversal\n",
- "apiid": 8,
- "instrument_code": "AAPL_XNGS"
}
], - "portfolio_rebalance": {
- "comment": "The portfolio has an monthly expected return of 3.54% with an expected average loss of -20.72% for the 5% worst monthly performances.",
- "components": [
- {
- "weight": 0.4164348932150839,
- "expected_returns": {
- "week": 0.008277105512909746,
- "month": 0.03592424272738949,
- "day": 0.0011762177972685019
}, - "apiid": 8,
- "instrument_code": "AAPL_XNGS"
}, - {
- "weight": 0.30900487455951225,
- "expected_returns": {
- "week": 0.007171449458352068,
- "month": 0.03138011100973603,
- "day": 0.0010132342262755558
}, - "apiid": 8,
- "instrument_code": "TSLA_XNGS"
}, - {
- "weight": 0.2745602322254039,
- "expected_returns": {
- "week": 0.009200184671477039,
- "month": 0.03895042559568708,
- "day": 0.001306295666758904
}, - "apiid": 8,
- "instrument_code": "NVDA_XNGS"
}
], - "analytics": {
- "var": {
- "0.975": {
- "week": {
- "value": -0.09992940965508434,
- "commentary": "There is a 2.5% chance that the portfolio will lose more than 9.99% over one week"
}, - "month": {
- "value": -0.19147429176547098,
- "commentary": "There is a 2.5% chance that the portfolio will lose more than 19.15% over one month"
}, - "day": {
- "value": -0.03929633504920199,
- "commentary": "There is a 2.5% chance that the portfolio will lose more than 3.93% over one day"
}
}
}, - "cvar": {
- "0.9": {
- "week": {
- "value": -0.08593193614782099,
- "commentary": "The expected average loss of the portfolio for the 10.0% worst scenarios over one week is 8.59%."
}, - "month": {
- "value": -0.16422689732737722,
- "commentary": "The expected average loss of the portfolio for the 10.0% worst scenarios over one month is 16.42%."
}, - "day": {
- "value": -0.0342498478297738,
- "commentary": "The expected average loss of the portfolio for the 10.0% worst scenarios over one day is 3.42%."
}
}
}, - "volatility": {
- "week": {
- "value": 0.04946912697200168,
- "commentary": "The volatility of the portfolio is 4.95%"
}, - "month": {
- "value": 0.10621679005196386,
- "commentary": "The volatility of the portfolio is 10.62%"
}, - "day": {
- "value": 0.018879059984072223,
- "commentary": "The volatility of the portfolio is 1.89%"
}
}
}, - "rule_name": "Portfolio - Risk Parity (false, 5)",
- "expected_returns": {
- "week": 0.00818889323060384,
- "month": 0.035350953347070405,
- "day": 0.0011615692894132359
}
}, - "client_reference": "test"
}Starts a portfolio backtest, use the get method endpoint to poll for the response.
| client_reference required | string unique identifier for the portfolio |
| strategy_id required | integer unique identifier for the risk management strategy |
| start_date required | string <date> Example: start_date=2020-01-01 date from which the backtest is run (inclusive) in RFC3339 format |
| end_date required | string <date> Example: end_date=2023-12-30 date until which the backtest is run (inclusive) in RFC3339 format |
Returns the results of a portfolio backtest. Check the status field of the response first. If the status is Complete then the response contains the results. If the status is Started then computations are underway and this call must be made again at a later stage to get the results. If the status is Not Queued then either the Put method has not been called or something went wrong.
| client_reference required | string unique identifier for the portfolio |
| strategy_id required | integer unique identifier for the risk management strategy |
{- "positions": [
- {
- "instrumentName": "VanEck Gold Miners ETF",
- "instrumentCode": "GDX",
- "closeDate": "2021-02-25",
- "openPrice": 27.758,
- "closePrice": 32.039,
- "stop": 0,
- "limit": 1.7976931348623157e+308,
- "costs": 0,
- "openDate": "2020-01-03",
- "pnL": 205.4880000000001,
- "currencyCode": "USD",
- "closed": true
}, - {
- "instrumentName": "Utilities Select Sector SPDR ETF",
- "instrumentCode": "XLU",
- "closeDate": "2020-01-31",
- "openPrice": 56.118,
- "closePrice": 60.937,
- "stop": 0,
- "limit": 1.7976931348623157e+308,
- "costs": 0,
- "openDate": "2020-01-03",
- "pnL": 2862.485999999997,
- "currencyCode": "USD",
- "closed": true
}
], - "yearlyReturn": "29.43%",
- "costs": 0,
- "lowestPnL": -22583.912000000004,
- "portfolioId": 3,
- "strategyId": 88,
- "status": "Completed",
- "pnLSerie": [
- {
- "date": "2020-01-02T00:00:00Z",
- "value": 0
}, - {
- "date": "2020-01-03T00:00:00Z",
- "value": 250.47599999999593
}
], - "nprofitToTotalRatio": "60.26%",
- "avgProfitLossRatio": "184.04%",
- "averageTradeDuration": "243d 22h 58m",
- "pnL": 117986.74799999999
}"Returns the following analytics for the given portfolio as defined by its open positions. If the portfolio passed to this method does not have at least a single open position, this method will not return anything.
Per portfolio component:
At portfolio level:
Portfolios can be entered into MantaRisk using the PUT /portfolio endpoint.
| client_reference required | string unique identifier for the portfolio |
{- "risk": {
- "marginal_contribution_to_risk": { },
- "var": {
- "0.975": {
- "week": {
- "value": -0.10707339152963662,
- "commentary": "There is a 2.5% chance that the portfolio will lose more than 10.71% over one week"
}, - "month": {
- "value": -0.2107045060539059,
- "commentary": "There is a 2.5% chance that the portfolio will lose more than 21.07% over one month"
}, - "day": {
- "value": -0.04695041010095959,
- "commentary": "There is a 2.5% chance that the portfolio will lose more than 4.7% over one day"
}
}, - "0.9": {
- "week": {
- "value": -0.0632570303701115,
- "commentary": "There is a 10.0% chance that the portfolio will lose more than 6.33% over one week"
}, - "month": {
- "value": -0.11841176972605101,
- "commentary": "There is a 10.0% chance that the portfolio will lose more than 11.84% over one month"
}, - "day": {
- "value": -0.024870394257550162,
- "commentary": "There is a 10.0% chance that the portfolio will lose more than 2.49% over one day"
}
}, - "0.95": {
- "week": {
- "value": -0.08617981256045701,
- "commentary": "There is a 5.0% chance that the portfolio will lose more than 8.62% over one week"
}, - "month": {
- "value": -0.16764417208782215,
- "commentary": "There is a 5.0% chance that the portfolio will lose more than 16.76% over one month"
}, - "day": {
- "value": -0.03678515633211733,
- "commentary": "There is a 5.0% chance that the portfolio will lose more than 3.68% over one day"
}
}
}, - "cvar": {
- "0.975": {
- "week": {
- "value": -0.1344782686790503,
- "commentary": "The expected average loss of the portfolio for the 2.5% worst scenarios over one week is 13.45%."
}, - "month": {
- "value": -0.25727628355020216,
- "commentary": "The expected average loss of the portfolio for the 2.5% worst scenarios over one month is 25.73%."
}, - "day": {
- "value": -0.05975606976671128,
- "commentary": "The expected average loss of the portfolio for the 2.5% worst scenarios over one day is 5.98%."
}
}, - "0.9": {
- "week": {
- "value": -0.09472672206015335,
- "commentary": "The expected average loss of the portfolio for the 10.0% worst scenarios over one week is 9.47%."
}, - "month": {
- "value": -0.1809275940554848,
- "commentary": "The expected average loss of the portfolio for the 10.0% worst scenarios over one month is 18.09%."
}, - "day": {
- "value": -0.040514942895158404,
- "commentary": "The expected average loss of the portfolio for the 10.0% worst scenarios over one day is 4.05%."
}
}, - "0.95": {
- "week": {
- "value": -0.11541604087736362,
- "commentary": "The expected average loss of the portfolio for the 5.0% worst scenarios over one week is 11.54%."
}, - "month": {
- "value": -0.22140016485895134,
- "commentary": "The expected average loss of the portfolio for the 5.0% worst scenarios over one month is 22.14%."
}, - "day": {
- "value": -0.05136643418518473,
- "commentary": "The expected average loss of the portfolio for the 5.0% worst scenarios over one day is 5.14%."
}
}
}, - "volatility": {
- "week": {
- "value": 0.05631177111494136,
- "commentary": "The weekly volatility of the portfolio is 5.63%"
}, - "month": {
- "value": 0.12331292184541477,
- "commentary": "The monthly volatility of the portfolio is 12.33%"
}, - "day": {
- "value": 0.02211825681831238,
- "commentary": "The daily volatility of the portfolio is 2.21%"
}
}
}, - "exposure": [
- {
- "beta": 0.038254555705724905,
- "factor_focus": "USA",
- "factor_type": "geographic",
- "factor_name": "United States"
}, - {
- "beta": 0.9102950883422101,
- "factor_focus": "Technology",
- "factor_type": "sector",
- "factor_name": "Technology"
}, - {
- "beta": 0.018889796074751577,
- "factor_focus": "Telecommunication Services",
- "factor_type": "sector",
- "factor_name": "Telecommunication Services"
}, - {
- "beta": 0.30811291948020364,
- "factor_focus": "Consumer Discretionary",
- "factor_type": "sector",
- "factor_name": "Consumer Discretionary"
}
], - "components": [
- {
- "exposure": [
- {
- "factor_type": "sector",
- "factor_name": "Telecommunication Services",
- "factor_focus": "Telecommunication Services",
- "beta": 0.07555918429900631
}, - {
- "factor_type": "sector",
- "factor_name": "Technology",
- "factor_focus": "Technology",
- "beta": 0.907466062020316
}
], - "instrument": {
- "symbol": "MSFT",
- "country": "United States",
- "instrument_code": "MSFT_XNGS",
- "mic": "XNGS",
- "name": "Microsoft Corp",
- "weight": 0.25,
- "exchange": "NASDAQ",
- "currency": "USD",
- "type": "Common Stock",
- "apiid": 8
}, - "risk": {
- "marginal_contribution_to_risk": {
- "volatility": {
- "value": 0.1596887430879109,
- "commentary": "The marginal contribution to the total volatility of the instrument is 15.97%."
}
}, - "var": {
- "0.975": {
- "week": {
- "value": -0.08332771125949882,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 8.33% over one week"
}, - "month": {
- "value": -0.1442296855216471,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 14.42% over one month"
}, - "day": {
- "value": -0.038187284303259586,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 3.82% over one day"
}
}, - "0.9": {
- "week": {
- "value": -0.04445741183800678,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 4.45% over one week"
}, - "month": {
- "value": -0.0652977180437018,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 6.53% over one month"
}, - "day": {
- "value": -0.02017737815466648,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 2.02% over one day"
}
}, - "0.95": {
- "week": {
- "value": -0.06126529137242607,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 6.13% over one week"
}, - "month": {
- "value": -0.10663732573476944,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 10.66% over one month"
}, - "day": {
- "value": -0.02879402050749198,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 2.88% over one day"
}
}
}, - "cvar": {
- "0.975": {
- "week": {
- "value": -0.10332325027110242,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one week is 10.33%."
}, - "month": {
- "value": -0.17755324582051296,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one month is 17.76%."
}, - "day": {
- "value": -0.04792151456440645,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one day is 4.79%."
}
}, - "0.9": {
- "week": {
- "value": -0.07043176522579628,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one week is 7.04%."
}, - "month": {
- "value": -0.11670266335959213,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one month is 11.67%."
}, - "day": {
- "value": -0.03226308048440184,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one day is 3.23%."
}
}, - "0.95": {
- "week": {
- "value": -0.08821113296012494,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one week is 8.82%."
}, - "month": {
- "value": -0.1508346582308118,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one month is 15.08%."
}, - "day": {
- "value": -0.040292755952727514,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one day is 4.03%."
}
}
}, - "volatility": {
- "week": {
- "value": 0.04021667742598522,
- "commentary": "The weekly volatility of the instrument is 4.02%"
}, - "month": {
- "value": 0.07476608313662732,
- "commentary": "The monthly volatility of the instrument is 7.48%"
}, - "day": {
- "value": 0.017849040149692786,
- "commentary": "The daily volatility of the instrument is 1.78%"
}
}
}, - "expected_returns": {
- "week": 0.007248054445546754,
- "month": 0.031372323740396994,
- "day": 0.001038827241726759
}
}, - {
- "exposure": [
- {
- "factor_type": "geographic",
- "factor_name": "United States",
- "factor_focus": "USA",
- "beta": 0.15301822282289962
}, - {
- "factor_type": "sector",
- "factor_name": "Technology",
- "factor_focus": "Technology",
- "beta": 0.8685618168381645
}
], - "instrument": {
- "symbol": "AAPL",
- "country": "United States",
- "instrument_code": "AAPL_XNGS",
- "mic": "XNGS",
- "name": "Apple Inc",
- "weight": 0.25,
- "exchange": "NASDAQ",
- "currency": "USD",
- "type": "Common Stock",
- "apiid": 8
}, - "risk": {
- "marginal_contribution_to_risk": {
- "volatility": {
- "value": 0.16956597023786754,
- "commentary": "The marginal contribution to the total volatility of the instrument is 16.96%."
}
}, - "var": {
- "0.975": {
- "week": {
- "value": -0.08932142014661479,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 8.93% over one week"
}, - "month": {
- "value": -0.1727882655342302,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 17.28% over one month"
}, - "day": {
- "value": -0.03877823893870155,
- "commentary": "There is a 2.5% chance that the instrument will lose more than 3.88% over one day"
}
}, - "0.9": {
- "week": {
- "value": -0.05227374482994123,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 5.23% over one week"
}, - "month": {
- "value": -0.0929588137425525,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 9.3% over one month"
}, - "day": {
- "value": -0.02086877013326059,
- "commentary": "There is a 10.0% chance that the instrument will lose more than 2.09% over one day"
}
}, - "0.95": {
- "week": {
- "value": -0.0739662792979335,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 7.4% over one week"
}, - "month": {
- "value": -0.13383356706717095,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 13.38% over one month"
}, - "day": {
- "value": -0.03097306138735143,
- "commentary": "There is a 5.0% chance that the instrument will lose more than 3.1% over one day"
}
}
}, - "cvar": {
- "0.975": {
- "week": {
- "value": -0.11252014360027437,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one week is 11.25%."
}, - "month": {
- "value": -0.2058565974388572,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one month is 20.59%."
}, - "day": {
- "value": -0.052071129866056234,
- "commentary": "The expected average loss of the instrument for the 2.5% worst scenarios over one day is 5.21%."
}
}, - "0.9": {
- "week": {
- "value": -0.07914566823392123,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one week is 7.91%."
}, - "month": {
- "value": -0.14508649207572202,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one month is 14.51%."
}, - "day": {
- "value": -0.03451452603969978,
- "commentary": "The expected average loss of the instrument for the 10.0% worst scenarios over one day is 3.45%."
}
}, - "0.95": {
- "week": {
- "value": -0.09548785083658927,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one week is 9.55%."
}, - "month": {
- "value": -0.17864782311928715,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one month is 17.86%."
}, - "day": {
- "value": -0.043523458846853116,
- "commentary": "The expected average loss of the instrument for the 5.0% worst scenarios over one day is 4.35%."
}
}
}, - "volatility": {
- "week": {
- "value": 0.04551989348484608,
- "commentary": "The weekly volatility of the instrument is 4.55%"
}, - "month": {
- "value": 0.09550443656852592,
- "commentary": "The monthly volatility of the instrument is 9.55%"
}, - "day": {
- "value": 0.018791238429923723,
- "commentary": "The daily volatility of the instrument is 1.88%"
}
}
}, - "expected_returns": {
- "week": 0.006873510031425437,
- "month": 0.031032530112243616,
- "day": 0.0009695900010222448
}
}
], - "expected_returns": {
- "week": 0.011461298787403745,
- "month": 0.0519269162929833,
- "day": 0.0015991919381769233
}, - "factor_summary": [
- {
- "factor_type": "geographic",
- "beta": 0.038254555705724905
}, - {
- "factor_type": "sector",
- "beta": 1.2372978038971654
}
], - "diversification_ratio": {
- "color": "yellow",
- "value": 1.223852139041164,
- "commentary": "The diversification ratio is medium."
}, - "r_squared": {
- "color": "yellow",
- "value": 0.7304585730509594,
- "commentary": "The R-squared is medium."
}
}This method provides the detail of one or more strategies. Strategies are created using MantaRisk's UI.
If a strategyid is provided, the query will return the detail of the specified strategy alongside any analysis that was carried on it.
If a strategyid is not provided, the query will return the detail of all strategies but will not provide their associated analysis even if these are presetn in the system.
| strategy_id | integer optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid |
[- {
- "strategy": {
- "name": "Default Risk Strategy",
- "strategy_id": 100,
- "rules": [
- {
- "description": "Validate that the order is not placed when the RSI is indicating an overextension. This rule also provides contextual information on historical RSI levels at which the price has changed direction.\n\nParameters\n- Limit Up: limit above which it would be unwise to place a long order. Default is 70. The value must be between 50 and 100.\n- Limit Down: limit below which it would be unwise to place a short order. Default is 30. The value must be between 50 and 0.",
- "category": "Type",
- "score": "+ 0",
- "rule_id": 4,
- "rule_name": "Direction - Not Overextended (50, 50)",
- "parameters": [
- {
- "value": "50",
- "key": "RSIUpLimit",
- "name": "RSI Upper Limit",
- "description": "RSI value above which it would be unwise to place a long order"
}, - {
- "value": "50",
- "key": "RSIDownLimit",
- "name": "RSI Lower Limit",
- "description": "RSI value below which it would be unwise to place a short order"
}
], - "search_string": "direction - not overextended (50, 50)"
}
]
}, - "status": "NotRun",
- "percentage_complete": 0,
- "last_updated": "N/A",
- "performance_delta": 0,
- "performance_benchmark": 0,
- "performance_new": 0,
- "recovery_days_new": 0,
- "drawdown_delta": 0,
- "cvar_delta": 0,
- "cvar_new": 0,
- "drawdown_new": 0,
- "print_cvar_new": "+0%",
- "print_cvar_delta": "+0%",
- "cvar_benchmark": 0,
- "print_performance_benchmark": "+0%",
- "drawdown_benchmark": 0,
- "print_drawdown_new": "+0%",
- "print_cvar_benchmark": "+0%",
- "recovery_days_delta": 0,
- "print_percentage_complete": "0%",
- "print_performance_delta": "+0%",
- "recovery_days_benchmark": 0,
- "print_performance_new": "+0%",
- "print_drawdown_delta": "+0%",
- "print_drawdown_benchmark": "+0%"
}
]Trigger the analysis of the given strategy against all portfolios held within this account. The analysis is run asynchronously. The % completion of the analysis can be obtained through the /strategy GET method.
| strategy_id required | string the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid |
Returns the list of available indexes to perform portfolio attribution analysis against.
[- {
- "name": "France 40",
- "country": "France",
- "symbol": "CAC",
- "currency": "EUR",
- "apiid": 8,
- "instrument_code": "CAC_XPAR"
}, - {
- "name": "Swiss 20",
- "country": "Switzerland",
- "symbol": "CSSMI",
- "currency": "CHF",
- "apiid": 8,
- "instrument_code": "CSSMI_XSWX"
}, - {
- "name": "Germany 40",
- "country": "France",
- "symbol": "DAX",
- "currency": "EUR",
- "apiid": 8,
- "instrument_code": "DAX_XPAR"
}
]Our risk and portfolio attribution methodology employs an enhanced Brinson model to decompose risk and performance across the following dimensions: sectors, asset classes, and domiciles. This detailed analysis provides insights into the following key components:
| client_reference required | string unique identifier for the portfolio |
| index_symbol required | string symbol of the index / ETF / Fund to benchmark against. Please refer to the GET /index endpoint for a list of viable symbols |
| horizon required | string Enum: "day" "month" horizon of the performance attribution analysis. |
| model | string Enum: "BrinsonFachlerEquityAttribution" "HierarchicalMultiAssetClassAttribution" performance attribution model. |
{- "components": [
- {
- "average_returns": {
- "month": 0.00492467204156397,
- "day": 0.00028859474965944697
}, - "instrument": {
- "name": "Coca-Cola Co-The",
- "country": "United States",
- "print_name": "[KO] Coca-Cola Co-The (Common Stock)",
- "symbol": "KO",
- "currency": "USD",
- "instrument_code": "KO_XNYS",
- "fixed_commission": 0,
- "spread_points": 0,
- "variable_commission": 0,
- "apiid": 8,
- "asset_type": "Common Stock",
- "asset_class": "Equity",
- "mic_code": "XNYS"
}, - "marginal_contribution_to_risk": {
- "volatility": {
- "value": 0.04686162312860953,
- "commentary": "The marginal contribution to the total volatility of the instrument is 4.69%."
}
}, - "weight": 0.042624613762404645,
- "error_message": null,
- "is_error": false
}
], - "performance_attribution": {
- "total": {
- "returns": {
- "total": {
- "portfolio": -0.004861988814831017,
- "benchmark": 0.0000310865657946708
}
}, - "weights": {
- "total": {
- "portfolio": 0.3326348244495906,
- "benchmark": 0.9999999999999998
}
}
}, - "asset_class": {
- "performance_attribution": {
- "allocation_effect": {
- "Equity": -4.522242332330773e-21
}, - "interaction_effect": {
- "Equity": 0.009775353187382112
}, - "selection_effect": {
- "Equity": -0.014647682476568981
}, - "fx_effect": null,
- "total_effect": {
- "Equity": -0.004872329289186869
}
}, - "risk_attribution": {
- "portfolio": {
- "marginal_risk_contribution": {
- "Equity": 1
}
}, - "benchmark": {
- "marginal_risk_contribution": {
- "Equity": 1
}
}
}, - "aggregated_weights_returns": {
- "returns": {
- "Equity": {
- "portfolio": -0.014616595910774313,
- "benchmark": 0.00003108656579467115
}
}, - "weights": {
- "Equity": {
- "portfolio": 0.3326348244495906,
- "benchmark": 0.9999999999999998
}
}
}
}, - "geography": {
- "performance_attribution": {
- "allocation_effect": {
- "United States": -0.0034000294755823783
}, - "interaction_effect": {
- "United States": -0.001376072302781025
}, - "selection_effect": {
- "United States": -0.00002772470490675049
}, - "fx_effect": null,
- "total_effect": {
- "United States": -0.004803826483270154
}
}, - "risk_attribution": {
- "portfolio": {
- "marginal_risk_contribution": {
- "United States": 1
}
}, - "benchmark": {
- "marginal_risk_contribution": {
- "United States": 0.00002241521353015514
}
}
}, - "aggregated_weights_returns": {
- "returns": {
- "United States": {
- "portfolio": -0.014616595910774313,
- "benchmark": -0.010396361273554255
}
}, - "weights": {
- "United States": {
- "portfolio": 0.3326348244495906,
- "benchmark": 0.006569470015300675
}
}
}
}, - "instrument": {
- "performance_attribution": {
- "allocation_effect": {
- "PUB_XPAR_8_EUR": -0.00013966975253526865,
- "SU_XPAR_8_EUR": 0.00717960789245065
}, - "interaction_effect": {
- "PUB_XPAR_8_EUR": 0.00014009180439381353,
- "SU_XPAR_8_EUR": -0.007177253646364878
}, - "selection_effect": {
- "PUB_XPAR_8_EUR": -0.00014009180439381353,
- "SU_XPAR_8_EUR": 0.007177253646364878
}, - "fx_effect": null,
- "total_effect": {
- "PUB_XPAR_8_EUR": -0.00013966975253526865,
- "SU_XPAR_8_EUR": 0.007179607892450651
}
}, - "risk_attribution": {
- "portfolio": {
- "marginal_risk_contribution": {
- "KO_XNYS_8_USD": 0.048272396254370284,
- "MSFT_XNGS_8_USD": 0.9517276037456297
}
}, - "benchmark": {
- "marginal_risk_contribution": {
- "SU_XPAR_8_EUR": 0.0938716706903472,
- "PUB_XPAR_8_EUR": 0.010723848096047355
}
}
}, - "aggregated_weights_returns": {
- "returns": {
- "portfolio": {
- "KO_XNYS_8_USD": 0.0013423449101532447,
- "MSFT_XNGS_8_USD": -0.006204333724984262
}, - "benchmark": {
- "SU_XPAR_8_EUR": -0.007177253646364878,
- "PUB_XPAR_8_EUR": 0.00014009180439381353
}
}, - "weights": {
- "portfolio": {
- "KO_XNYS_8_USD": 0.042624613762404645,
- "MSFT_XNGS_8_USD": 0.2900102106871859
}, - "benchmark": {
- "SU_XPAR_8_EUR": 0.07573194483179593,
- "PUB_XPAR_8_EUR": 0.013576663994747903
}
}
}
}, - "sector": {
- "performance_attribution": {
- "allocation_effect": {
- "Communication Services": -0.0003586777021355832,
- "Utilities": 0.00009677642901009992
}, - "interaction_effect": {
- "Communication Services": 0.0003594862358918275,
- "Utilities": -0.00009626106675709161
}, - "selection_effect": {
- "Communication Services": -0.0003594862358918275,
- "Utilities": 0.00009626106675709161
}, - "fx_effect": null,
- "total_effect": {
- "Communication Services": -0.0003586777021355832,
- "Utilities": 0.00009677642901009992
}
}, - "risk_attribution": {
- "portfolio": {
- "marginal_risk_contribution": {
- "Technology": 0.9935704802261911,
- "Consumer Defensive": 0.0064295197738088025
}
}, - "benchmark": {
- "marginal_risk_contribution": {
- "Communication Services": 0.001752453575963133,
- "Utilities": 0.00036547801359421595
}
}
}, - "aggregated_weights_returns": {
- "returns": {
- "Communication Services": {
- "portfolio": 0,
- "benchmark": 0.013821553445385711
}, - "Utilities": {
- "portfolio": 0,
- "benchmark": -0.005806451612903163
}
}, - "weights": {
- "Communication Services": {
- "portfolio": 0,
- "benchmark": 0.02600910507724738
}, - "Utilities": {
- "portfolio": 0,
- "benchmark": 0.01657829483038818
}
}
}
}
}
}Our risk and portfolio attribution methodology employs an enhanced Brinson model to decompose risk and performance across the following dimensions: sectors, asset classes, and domiciles. This detailed analysis provides insights into the following key components:
| client_reference required | string unique identifier for the portfolio |
| benchmark_client_reference required | string client reference of the portfolio to benchmark against |
| horizon required | string Enum: "day" "month" horizon of the performance attribution analysis. |
| model | string Enum: "BrinsonFachlerEquityAttribution" "HierarchicalMultiAssetClassAttribution" performance attribution model. |
{- "components": [
- {
- "average_returns": {
- "month": 0.00492467204156397,
- "day": 0.00028859474965944697
}, - "instrument": {
- "name": "Coca-Cola Co-The",
- "country": "United States",
- "print_name": "[KO] Coca-Cola Co-The (Common Stock)",
- "symbol": "KO",
- "currency": "USD",
- "instrument_code": "KO_XNYS",
- "fixed_commission": 0,
- "spread_points": 0,
- "variable_commission": 0,
- "apiid": 8,
- "asset_type": "Common Stock",
- "asset_class": "Equity",
- "mic_code": "XNYS"
}, - "marginal_contribution_to_risk": {
- "volatility": {
- "value": 0.04686162312860953,
- "commentary": "The marginal contribution to the total volatility of the instrument is 4.69%."
}
}, - "weight": 0.042624613762404645,
- "error_message": null,
- "is_error": false
}
], - "performance_attribution": {
- "total": {
- "returns": {
- "total": {
- "portfolio": -0.004861988814831017,
- "benchmark": 0.0000310865657946708
}
}, - "weights": {
- "total": {
- "portfolio": 0.3326348244495906,
- "benchmark": 0.9999999999999998
}
}
}, - "asset_class": {
- "performance_attribution": {
- "allocation_effect": {
- "Equity": -4.522242332330773e-21
}, - "interaction_effect": {
- "Equity": 0.009775353187382112
}, - "selection_effect": {
- "Equity": -0.014647682476568981
}, - "fx_effect": null,
- "total_effect": {
- "Equity": -0.004872329289186869
}
}, - "risk_attribution": {
- "portfolio": {
- "marginal_risk_contribution": {
- "Equity": 1
}
}, - "benchmark": {
- "marginal_risk_contribution": {
- "Equity": 1
}
}
}, - "aggregated_weights_returns": {
- "returns": {
- "Equity": {
- "portfolio": -0.014616595910774313,
- "benchmark": 0.00003108656579467115
}
}, - "weights": {
- "Equity": {
- "portfolio": 0.3326348244495906,
- "benchmark": 0.9999999999999998
}
}
}
}, - "geography": {
- "performance_attribution": {
- "allocation_effect": {
- "United States": -0.0034000294755823783
}, - "interaction_effect": {
- "United States": -0.001376072302781025
}, - "selection_effect": {
- "United States": -0.00002772470490675049
}, - "fx_effect": null,
- "total_effect": {
- "United States": -0.004803826483270154
}
}, - "risk_attribution": {
- "portfolio": {
- "marginal_risk_contribution": {
- "United States": 1
}
}, - "benchmark": {
- "marginal_risk_contribution": {
- "United States": 0.00002241521353015514
}
}
}, - "aggregated_weights_returns": {
- "returns": {
- "United States": {
- "portfolio": -0.014616595910774313,
- "benchmark": -0.010396361273554255
}
}, - "weights": {
- "United States": {
- "portfolio": 0.3326348244495906,
- "benchmark": 0.006569470015300675
}
}
}
}, - "instrument": {
- "performance_attribution": {
- "allocation_effect": {
- "PUB_XPAR_8_EUR": -0.00013966975253526865,
- "SU_XPAR_8_EUR": 0.00717960789245065
}, - "interaction_effect": {
- "PUB_XPAR_8_EUR": 0.00014009180439381353,
- "SU_XPAR_8_EUR": -0.007177253646364878
}, - "selection_effect": {
- "PUB_XPAR_8_EUR": -0.00014009180439381353,
- "SU_XPAR_8_EUR": 0.007177253646364878
}, - "fx_effect": null,
- "total_effect": {
- "PUB_XPAR_8_EUR": -0.00013966975253526865,
- "SU_XPAR_8_EUR": 0.007179607892450651
}
}, - "risk_attribution": {
- "portfolio": {
- "marginal_risk_contribution": {
- "KO_XNYS_8_USD": 0.048272396254370284,
- "MSFT_XNGS_8_USD": 0.9517276037456297
}
}, - "benchmark": {
- "marginal_risk_contribution": {
- "SU_XPAR_8_EUR": 0.0938716706903472,
- "PUB_XPAR_8_EUR": 0.010723848096047355
}
}
}, - "aggregated_weights_returns": {
- "returns": {
- "portfolio": {
- "KO_XNYS_8_USD": 0.0013423449101532447,
- "MSFT_XNGS_8_USD": -0.006204333724984262
}, - "benchmark": {
- "SU_XPAR_8_EUR": -0.007177253646364878,
- "PUB_XPAR_8_EUR": 0.00014009180439381353
}
}, - "weights": {
- "portfolio": {
- "KO_XNYS_8_USD": 0.042624613762404645,
- "MSFT_XNGS_8_USD": 0.2900102106871859
}, - "benchmark": {
- "SU_XPAR_8_EUR": 0.07573194483179593,
- "PUB_XPAR_8_EUR": 0.013576663994747903
}
}
}
}, - "sector": {
- "performance_attribution": {
- "allocation_effect": {
- "Communication Services": -0.0003586777021355832,
- "Utilities": 0.00009677642901009992
}, - "interaction_effect": {
- "Communication Services": 0.0003594862358918275,
- "Utilities": -0.00009626106675709161
}, - "selection_effect": {
- "Communication Services": -0.0003594862358918275,
- "Utilities": 0.00009626106675709161
}, - "fx_effect": null,
- "total_effect": {
- "Communication Services": -0.0003586777021355832,
- "Utilities": 0.00009677642901009992
}
}, - "risk_attribution": {
- "portfolio": {
- "marginal_risk_contribution": {
- "Technology": 0.9935704802261911,
- "Consumer Defensive": 0.0064295197738088025
}
}, - "benchmark": {
- "marginal_risk_contribution": {
- "Communication Services": 0.001752453575963133,
- "Utilities": 0.00036547801359421595
}
}
}, - "aggregated_weights_returns": {
- "returns": {
- "Communication Services": {
- "portfolio": 0,
- "benchmark": 0.013821553445385711
}, - "Utilities": {
- "portfolio": 0,
- "benchmark": -0.005806451612903163
}
}, - "weights": {
- "Communication Services": {
- "portfolio": 0,
- "benchmark": 0.02600910507724738
}, - "Utilities": {
- "portfolio": 0,
- "benchmark": 0.01657829483038818
}
}
}
}
}
}