ewrRiskMeasure
Last modified in version : -
Purpose : generic function to retrieve any type of risk figures
Summary
The ewrRiskMeasure function allows to retrieve a number of different risk measures for a list of instruments based on a variety of scenarios and calculation parameters. Three calculation levels exist: “portfolio” level, “contributions” level and “positions” level.
Examples
In these examples the risk measure that the function aims to retrieve is the value at risk (VaR):
=ewrRiskMeasure("var", "portfolio", C11, D11, "EUR", 10, 0.95, "historicalInnovations", TRUE)
This function retrieves the value at risk of a portfolio containing one unique asset whose ID and weight are in cell C11 and D11 respectively. The weight must be equal to 100%. The currency is EUR. The RiskHorizon is 10 days, the CondifenceLevel is 95%, the ScenarioType is historical innovation and Annualized is set to TRUE. These are the default parameters.
=ewrRiskMeasure("var", "portfolio", C11:C50, D11:D50, "EUR", 10, 0.95, "historicalInnovations", TRUE)
This retrieves the value at risk of a portfolio of instruments whose IDs and weights are displayed by C11:C50 and D11:D50 respectively. The weights must sum up to 100%. The currency is EUR. The rest of the parameters are the default ones.
=ewrRiskMeasure("var", "portfolio", {"CHF", "EUR"}, {0.5, 0.5}, "EUR", 10, 0.95, "historicalInnovations", TRUE, 1, TRUE)
The example above can be copied and pasted to Excel and will give an instantaneous result. The function computes the portfolio VaR for a risk horizon of one day and accounting for the positions’ liquidity risk.
=ewrRiskMeasure("var", "contributions", C11:C50, D11:D50, "EUR", 10, 0.95, "historicalInnovations", TRUE, 20, TRUE)
Retrieves the contributions to the portfolio risk of each of the positions for a 20 days risk horizon. C11:C50 stands for the asset IDs of the portfolio and D11:D50 for the weights. The weights must sum up to 100%. The currency is EUR.
Syntax
ewrRiskMeasure(Measure, CaluclationsLevel, AssetIDs[], Weights[], Currency, RiskHorizon, ConfidenceLevel, ScenarioType, Annualized, ScalingHorizon, LiquidityAdjusted)
Argument name | Default | Description |
---|---|---|
Measures | The name of the measure to be returned. | |
CalculationsLevel | The granularity at which the results should be calculated (individual asset, portfolio). | |
AssetIDs | Single or multiple asset identifiers (ISIN, FIGI, currency ISO, Edgelab ID). | |
Weights | Asset weights in the same orders as the specified asset ids and must sum up to 100%. | |
Currency (Optional) | local | The ISO code of the reference currency for deriving the calculation results. Specify “local” to use the instruments native currency where appropriate. It is mandatory to specify a currency when the granularity is “portfolio”. |
RiskHorizon (Optional) | 10 | The time interval over which the risks are estimated (i.e. between now and now + risk-horizon). |
ConfidenceLevel (Optional) | 0.95 | The confidence level for the tail statistics estimators VaR and ES. It is number in percent between 85 and 99 [%]. |
ScenarioType (Optional) | historicalInnovation | How the possible scenarios for the asset prices are computed. |
Annualized (Optional) | true | Whether the result should be expressed as an annualized figure. True or False. |
ScalingHorizon (Optional) | RiskHorizon | |
LiquidityAdjusted (Optional) | false | If true, then risk computations will account for the liquidity risk. |