ewrStressScenario
Last modified in version : -
Purpose : retrieve a specific measure of a portfolio in the context of a specified stress scenario
Summary
The ewrStressScenario function retrieves the profit and loss of a portfolio during a stress scenario event. This function supports only positions and portfolio as calculation levels. Since it is a ewr* function, the output will be expressed in relative terms.
Examples
In these example the chosen stress scenario is the 2007-2009 sub-prime crisis (scenario 3021).
=ewrStressScenario("pnl","portfolio", 3021, C11,D11,"EUR")
Calculates the P&L impact a market stress scenario would have on a portfolio (here one asset) defined by C11 and its corresponding weight defined by D11 that must be equal to 100%. Here, the currency is EUR.
=ewrStressScenario("pnl","portfolio", 3021, C11:C50,D11:D50,"EUR")
Calculates the P&L impact a market stress scenario would have on a portfolio whose instrument IDs are defined by C11:C50 and their corresponding weights are listed in D11:D50 that must sum up to 100%. The currency is still EUR.
=ewrStressScenario("pnl","portfolio", 3021, {"CHF","EUR"},{0.5,0.5},"EUR")
This example can be copied and pasted to Excel and will give an instantaneous result.
Syntax
ewrStressScenario(Measure, CalculationsLevel, ScenarioID, AssetsIDs[], Weights[], Currency)
Argument name | Default | Description |
---|---|---|
Measure | “pnl” (Profit and Loss). | |
CalculationsLevel | The granularity at which the results should be calculated (individual asset, portfolio). | |
ScenarioID | The ID of a pre-defined scenario to serve as the basis for the simulation. | |
AssetsIDs | Single or multiple asset identifiers (ISIN, FIGI, currency ISO, Edgelab ID). | |
Weigths | 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”. |